I bought a 1200 lumen light the other day so that I can cycle before and after work when it is still dark. It works really well to light my way, but I also wanted a decent back light. After all, the cars generally come from behind and need to see you.
Instead of simply buying one, I decided to make one by recycling an old bicycle light that I had lying around and use two 1W red LED’s that I have also had for a while and never used.
The first hurdle I had to overcome was to design a power supply capable of delivering at least 350mA and one that could supply 6.4V, enough for two LED’s. I also wanted to use at the most, two 1.2V NiMH batteries.
The next choice I had to make was what controller I wanted to use. I settled on a small, low cost micro controller. I also decided to run the entire circuit off 5V. This would slightly under drive the LED’s, but would safely power the micro without using two power supplies.
For the power supply, I went with the LM2623 which is capable of supplying 2A with an input of as low as 0.8V.
For the micro controller I went with the PIC12F615 which has an internal nMCLR pull up and an internal 4MHz oscillator which keeps the pin count low.
To drive the 1W LED’s, I am using a BD139 transistor. I am driving it just below its limit, but I had a few lying around so just used one. I am using a PWM signal of 1KHz and the LED’s are on for 50ms and then off for 250ms. At the moment I only have one setting but I plan to add more in my next version, different flash rates and solid on.
I use one of the analog inputs to measure the battery voltage. By doing this I can turn on the 3mm LED when the battery voltage goes below 2V. This means that I won’t run the battery’s too flat and damage them.
The battery’s and controller are housed in a plastic box which I have tied neatly under my saddle and the light is attached to my seat post.
At the moment this is my prototype which works, but isn’t 100% complete. I still need to tweak the part of the program that measures the battery voltage and I also want to play around with the current limiting resistor so that I can get the max brightness out of the 1W LED’s. I also have to test how long the circuit will run on two AA battery’s.
I will be testing it tonight at Cape Town’s #moonlightmass to see how it performs. I will also get some pictures or videos and put them in a follow-up post.
If you want the DesignSpark schematic and the micro controller code, use this link.
Greg
Greetings! Did you somehow complete all the options of this site by yourself or you asked for some help?
I used a blogspot theme but done everything else myself