I am power a ds1307 RTC,sd shield, lcd 20x4, a relay, 2 leds, 3 dht-11 temp sensors, and a photo cell. Its seems that when the relay is on and the LCD tries to print, it prints gibberish. Im wondering if all this stuff is too much for the mega to power.
Edit : To summarize : 20mA per I/O pin is safe, and no more than 40mA per I/O pin (not for a long time), but, and that' why I put the links above, no more than 200mA per port (even 100mA max for some of them)
the r1 is 1k not sure of the coil resistance i can measure it went i get home everything is power by the mega's 5v outputs. They relay is a 5v coil and 250v ac contacts.
If you are powered from USB, the 2.0 spec current limits at 500mA. Subtract about 100mA or so for the AVR and support chips, I think. Then whatever your display requires, and the coil. It only needs to cause the voltage to drop a bit to potentially scramble either the AVR or your display.