This is just a prototype that was inspired by the commercial sets of battery operated lights that have a timer function where they switch on for 6 hours and off for 18 hours after being switched on so they come on at the same time very night. It's a nice simple idea that saves the lights running all night on a light sensor. In my version I've got rid of all the cheesy flashing effects and made it as minimalist as possible. It's just a PIC12 microcontroller, a 100nF decoupling capacitor and a 100 ohm resistor in series with a parallel string of LEDs like the ones you get with solar sets or as battery operated strings. This means that you can tuck everything easily into a battery box. As an optional extra you can add a "heartbeat" LED with a 10K series resistor that will blink dimly to show the software is running and give a visible timing reference as It turns on and off alternately on each second. The choice of a 10K resistor is purely to provide a low level visual indication without drawing much current at all. For a brighter light I could use a 1K resistor.
I actually assigned all available port pins as switching outputs, so you could run four strings of LEDs, each with their own 100 ohm resistor if you wanted, Each output is good for about 20mA which is ample to light 50 or so LEDs per circuit at a low level intensity while ensuring good battery life.
At the moment I've written the software to power the LEDs on for 8 hours and off for 16, to allow for a generous on-time and allow for non critical timing accuracy. I'm toying with adding a "work" mode where you can turn the lights on when you get in from work and they will subsequently light half an hour earlier so they are always on when you get home from work.
Battery life should be pretty good with anything from two weeks to a month on a set of 3AA alkalines or rechargeables.
I actually assigned all available port pins as switching outputs, so you could run four strings of LEDs, each with their own 100 ohm resistor if you wanted, Each output is good for about 20mA which is ample to light 50 or so LEDs per circuit at a low level intensity while ensuring good battery life.
At the moment I've written the software to power the LEDs on for 8 hours and off for 16, to allow for a generous on-time and allow for non critical timing accuracy. I'm toying with adding a "work" mode where you can turn the lights on when you get in from work and they will subsequently light half an hour earlier so they are always on when you get home from work.
Battery life should be pretty good with anything from two weeks to a month on a set of 3AA alkalines or rechargeables.
How to make Christmas light balls
Where can I buy these for leds that don't have timers? I am not able to create them myself.
Hi Clive, any chance you followed up on this project with a crystal oscillator. I have been trying to do this for years. There is nothing else on the web that I could find for the battery operated light timer switch. Thanks.
Have it turn on the sprinklers just as your kids come home. Best hide the plugs and whatnot.
Hi Clive, I was thinking of doing this type of thing but just using a micro-controller as a control unit, feeding the base of a transistor for switching the lights on and off. Is this a logical way to approach it? How did this project end up my friend? I couldn't find it on your site.
i got 12 volt power unit at 120 ac i put cooling fan in my big stoplight
i got big stop light i go make flash with realy and 555 timer and 100 watts light bulbs
Hi Clive, I love the stuff that you've done with the little PIC microcontrollers. I'd like to learn how to program & work with them to make LEDs chase & dim. The whole software language thing is a bit baffling, though (I'm much better with hardware than software). Do you have any good suggestions on where to learn the basics of PIC software?