Author Options:

Arduino Light Controller Answered

Hello guys,

I have make a project with Atmega328 that read the sun light to turn on the shop lights and read the voltage ments 5V to voltage the system and 12v to voltage the lights.so the problem is i want the system work 24/7 and if i let it work 5+ hours it lag and i have to restart it all time.any1 have any idea why that happen?I noticed the tension is not steady,can this be the problem?i have attach some photo and one video of the system that i have make.Thanks for your time to read my problem.


Well, you have no diode on the relay coil, if that switches on, then off, the spikes from the relay will either kill your board, if you are unlucky, or just reset it.

Then too, if your main power is only browning out briefly, some nice fat electrolytic cap, say 2200uF might help hold up the rails.

What are all the resistors for around the regulator ?

What do you mean by "lag" ?

You're right, wobbly power is likely to upset the circuit.

Post your schematic and lets see what we can do.