Motion activated joule thief led bike light

Joule thief based bike led light installed on a bicycle.

I have been wanting to make something useful with the joule thief circuit design and some 1W star leds that I have. I found an old bicycle light that used a 0.5A 2.5V halogen bulb and two C size (LR14) batteries. It looked like it would be a good candidate to convert to led. I also wanted to create a light that would switch on automatically as the bike moves, and off again with a delay after the bike stops moving. In other words a motion sensor activated light that I would not need to switch on or off. That would improve visibility even in daylight.

 

bike_light

The breadboard version

A basic joule thief circuit can be built with just a transformer, a transistor, one resistor, led and a battery.

joule_thief

I started off by breadboarding the basic joule thief circuit to see if my components would work as I wanted. I had salvaged a ferrite toroid transformer from a dead CF light bulb. These energy saving bulbs have a small amount of electonics in their bulky plastic base, and they usually include a transformer. You just need to carefully crack the plastic cover. I have found that the plastic cover can often be peeled off in pieces by grabbing one edge with long nose pliers and by twisting the pliers and letting the plastic roll over the pliers. This bulb had a 10 mm ferrite toroid with three windings, 3, 15 and 3 turns. I used a 2N3904 transistor (or actually the SMD equivalent MMBT3904) and a 1k ohm base resistor as suggested by Dainaccio in his excellent blog post. The fifteen turns winding is now connected between positive supply and the base resistor (the primary) and one of the 3 turn windings is connected between positive supply and transistor collector (the secondary). The transformer windings have to be connected so that the opposite directions are connected to positive supply. If the 15 turns winding starts on top side of the toroid then the bottom side of the 3 turns winding has to be connected to it. As with joule thief in general, primary winding of the transformer should have an equal or higher number of turns  than the secondary. Transistor emitter connects to negative battery terminal. The led connects in parallel with the transistor, anode to collector and cathode to emitter. This setup produced a fairly bright light with one AA cell and very bright with two cells. This proved that the components and the circuit were up to the task. The measured current draw from two AA cells was 95 to 105 mA.

The switch-on and delayed switch-off circuit is simple.joule_thief_auto_power

When the motion sensor closes circuit for even a split second the capacitor gets a charge, the FET transistor sees a voltage at the gate and starts to conduct. The capacitor slowly discharges through the 10M ohm resistor until the voltage att the gate drops enough and the transistor ceases to conduct. The schematic shows two transistors in parallel, the through hole 2N7000 and the smd 2N7002. Only one of them should be used. This is because I was not sure if the current rating of the small smd transistor (115mA) would be enough for the circuit. The through hole version can take 200mA, so added the option to use either one. It now looks like the 2N7000 can be omitted.

The switch off is a smooth one with the led slowly fading. The voltages at the FET transistor gate are so low that it actually barely turns  fully on.  The transistor operates mostly in the ohmic region, like a voltage controlled resistor. As the gate voltage drops the transistor increasingly limits the current that passes through it. I examined other circuit options to find a way to switch the light off harder, but I found no good alternatives. The  supply voltage is just too low. One possibility is to use a FET that can tolerate lower voltages so that it could be operated partly in saturation mode. I already ordered some BSS138 FET transistors to see if their lover gate threshold voltage would help. The 33μF capacitor and 10M ohm resistor together give an RC time constant value of 330 seconds or 5.5 minutes. After that time the capacitor voltage should have dropped by 63%. Therefore the voltage at the gate should drop from 3V to (1-0.63) * 3V = 1.1V in 5.5 minutes. With breadboarding I observed that  the led faded out totally already after about a minute. You can increase the time proportionally by substituting a higher value capacitor. I actually used 100μF in my final version. The original version faded too fast, and it does not really matter if the led goes totally out only after several minutes. I tested also with just one AA cell, but the low voltage did not work with the switch circuit at all. Even with two AA cells the switch lowers the total voltage that the joule thief part of the circuit will see. That brings down the brightness of the led and also the total current draw from the batteries. Now the measured current draw is down to somewhere between 65 and 75 mA. This are figures as shown by my multimeter, meaning that most likely they are average values.

1W_ledThe 1W star led is a no-brand one from eBay from China. Warm white light, 350 mA max, and claimed output 90-100 lm which I very much doubt. But with the cost of 50 euro cents a piece including postage this will do nicely. I can not measure the output current of the finished circuit accurately, but visually judging by the color temperature and brightness of the led it roughly corresponds to the color that 180 mA would produce. It is not super bright, but then the purpose is to improve visibility and safety.

Designing the circuit board and the mechanics

sensor
Click on the images for a higher resolution

As always, the mechanical design seemed to be the hardest part. I found out that if I used thinner AA size batteries to replace the original C size ones I could still use the same built-in battery connectors. I could even fit in a pcb and the components that I needed in that space.

The next step was to design the motion activated switch as it would take the most space. I found a simple spring solution for a motion activated switch in this blog post by miceuz. The solution is a small metal (conductive) spring that is fixed from one end to the pcb and supply voltage. The other end is free to swing as the bike moves and as it touches the pcb it will close the circuit. I found a suitable long spring from within one of the omnipresent ball point pens. I found it to be a little too stiff, so I added a small screw to the loose end to add some weight to make it swing more. I secured the screw in place with super glue. As I wanted to have the spring on that side of the pcb that does not have copper on it I needed to modify the design a bit. One end of the spring is now soldered to a three pin header and the free end goes through a 10 mm wire loop so that the sensor will catch movements in any direction.

The transformer was the next biggest component and it fitted nicely next to the spring in between the batteries. I added some header pins to the design to hold the AA batteries in place sideways as there is no other support for them. Unfortunately in my initial version I did not make sure that there was enough copper on the board at the pads to hold the pins in place. Some of them got loose quickly. I fixed that in the design below.

bike_light_pcb

The design has the switch part on top left and the joule thief part on top right. The transformer is the six pads on the left. Motion sensor is fixed to the pins on center left (square pads) and the loop at the other end of the spring goes to either of the square pad pairs on center right. I intended to use a salvaged 33μF tantalum capacitor as the delay capacitor (next to the + at top left). It was only after some debugging that I figured out that I had probably damaged the capacitor at some point. It would not hold charge. I replaced it by a 100μF electrolytic, by just soldering its leads to the pcb tracks.

This was my first time designing with DesignSpark PCB. Naturally something had to go wrong. I printed out a mask, exposed the photosensitive pcb, developed, etched and soldered the components and leads. I connected power. It did not work. After some debugging I realised that I had not printed the mask out mirrored as I should have. Actually my first mistake was that I had added the texts to the pcb so that they were not mirrored which lead me not to notice that I should have mirrored the whole thing when printing.  The smd transistors with three legs were now connected incorrectly, other components were ok. I was lucky to have some copper islands available on the board next to the transistors, so I fixed the issue by using these islands as extra pads, rotating the transistors in place and by adding a jumper to connect the island to the right track. Below is the board before the fix.

pcb_with_components

Unfortunately the 1W star led was too big to fit in the bulb opening. Luckily the reflector design was such that the led would give a nice beam of light even if it is just placed in front of the opening. I drilled two small holes to the reflector for screws that hold the star in place. Hot glue could have been an alternative as well.

There is a simple on-off switch at the back of the lamp and I wanted to keep it functional. It now serves as the master off switch. The power leads are connected to the battery holder clips in the center of the case. I drilled holes to the steel clips and soldered the leads.

Joule thief based bike light with motion activated switch, cover opened.

Parts list

Part Origin Cost in eur
Ferrite toroid transformer Salvaged from a dead CF lamp 0.00
MMBT3904 NPN transistor eBay 0.01
1k ohm resistor, 1206 eBay 0.002
1W star led eBay 0.48
Spring Ball point pen 0.00
2N7002 N-channel MOSFET transistor eBay 0.04
100uF electrolytic capacitor eBay 0.04
10M ohm resistor, 1206 eBay 0.002
a quarter of a 100×160 mm photosensitive PCB www.tme.eu 0.70
Total: 1.28

 

Share thisShare on FacebookTweet about this on TwitterShare on Google+Pin on PinterestShare on TumblrEmail this to someone

2 thoughts on “Motion activated joule thief led bike light

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Due to comment spam from robots and from spammers who try to sneak in their links disguised as comments I had to take comment moderation in to use. Comments that have any links will come to me for moderation. Please do not submit your comment twice -- it will appear shortly. Thanks for your understanding. Jari.