Glue stick torch


This is a rather old project I've done around 2005 but was not published on my website until now. The idea of building a torch using a glue stick came to my mind when I realized that an AA battery fits perfectly into the glue stick's plastic case.

To make a complete battery holder there is also the need to make contacts for the positive and negative connections on the battery. The negative contact is made by cutting the plastic worm gear inside the stick, making a hole in it and passing a wire through the hole. The positive contact is made with a metal wire folded on top of the battery and kept in place using a spring. This makes it easy to replace the battery. The wire of the positive contact ends close to the black "knob" on the bottom, so that when turning the knob it makes contact with another wire, resulting in a switch to turn the torch on and off.

Powering two white LEDs

I wanted to use two white LEDs as light source for this torch, but this turned out to be a problem because a white LED requires ~3.6V to operate, while an AA battery is only 1.5V. So I had to come up with some sort of switching step-up circuit to provide 3.6V (or 7.2V if wiring the LEDs in series) from an input voltage that varies from 1.5V down to less than 1V (because battery voltage decreases as the battery discharges).  And the circuit needed to be small enough to fit into the tiny space available into the black knob of the glue stick.
The basic principle of a switching step-up circuit is this:

If the base of the transistor is kept at 0V Vout is just Vin-0.7 (the voltage drop of D1) because the inductor acts as a wire. But if a square wave is applied to the base of the transistor, it acts as a switch opening and closing. When the transistor is closed the inductor is connected to Vin and ground, and the current in it increases linearly with time, while when the switch opens the inductor geneartes a voltage spike to try keeping the current constant. This voltage can be higher than Vin, so it is rectified by D1 and leveled  to a  direct current by C1.
Now, the problem is to find a way to build an oscillator that can work with just 1V and small enough to fit into the glue stick.

Just one transistor

In a time where high-end GPUs reached the score of a billion transistors it is interesting to know that it is possible to build an useful circuit with just one transistor. That's right, here's the schematic of the one-transistor oscillator

The trick here is the Barkhausen's criterion. If a circuit has a closed loop and there is a frequency in the loop gain that has a unity gain and a phase shft of k360°, then it can oscillate. In this circuit the transistor accounts for a 180° phase shift, and a transformer is used to get the other 180° phase shift necessary. Now, if the closed loop gain would be exactly one at some frequency, we would have a sine wave oscillator at that frequency (together with oscillator start-up issues). In this case the circuit was built on purpose with a loop gain greater than one, and this mathematically speaking would mean that the output would diverge to infinity. In practice clamping (or saturation) occurs. The output of the oscillator (whic is the collector of Q1) has a lower bound of zero by design, and the upper bound depends on the load applied. Even with no load the bound would be the transistor's breakdown voltage. To get a (not that much precise) impression of what's happening, see these three lines of Scilab code:

As can be seen, after a start up phase, the circuit generates a rather clean square wave, which is what we need for the task after all. The upper bound of the output voltage in the graph is set on purpose to 7.9V, because it is 7.2 + 0.7, where 7.2 is the voltage drop of two white LEDs in series, and 0.7 is D1's voltage drop.
So the next thing to do is simply to connect two white LEDs at the output:

The nice thing of this circuit is that it will adapt to the load voltage, in this case the LEDs, without requiring resistors or other current limiting components. If you attach one or three LEDs, it will still work, though the current in the LEDs will change.
In fact, the last thing to choose is the output current. In this circuit it depends on many parameters, mainly the output voltage (that we can't change, it's fixed at 7.2V since we've chosen two LEDs), the input voltage (again, fixed at a maximum of 1.5V) and the value of R1.
So, by trial and error, R1 was chosen as 330ohm since it results in these currents:

As can be seen this circuit works very well even at low battery voltages. It is not a good idea to further increase the output current because standard white LEDs have a maximum power dissipation of 100mW which means a maximum current of 27mA

Hacking an inductor into a transformer

So this design meets the low voltage constraint, but there's still something that's not been specified: where to find a suitable transformer?
Transformers like this need to be custom-made for the task, usually by buying a ferrite core and some copper wire. However finding a ferrite core is not easy, especially one small enough for this project, so I found a different solution. The trick is to buy a simple inductor, and take it apart. A 330uH inductor made by "neosid" is a rather common component, and is perfect for this task.

The blue plastic cap can be removed by simply pulling it out. Not surprisingly, the inductor is made with a tiny ferrite core and some copper wire that can easily be removed from the white plastic holder.
Now that we have the copper wire and the ferrite core it is possible to start winding our transformer.
This transformer requires two windings with a wire in common, the first one needs to be 51 turns and it's the one connected to the collector of the transistor, the second is 21 turns and is the one connected to R1 and C2. The common wire is the one connected to the positive of the battery. It is important not to invert the winding direction when starting the second winding, if the first has been wound clockwise, the second needs to be wound clockwise too, or the phase shift will not be 180° and the oscillator won't work.
Note that, unlike the last image that shows a transformer with 5 wires, this transformer only has three, as the schematic suggests. The 5 wire transformer in the image is another tranformer I've made for a different purpose.

Final result

Her is an image of the completed circuit

It was made with simple perforated board cut in a circle shape. The transformer has been glued to the two capacitors close to it.
Here is the same image, but with the LEDs lit:

After five years of operation it still works flawlessly.

Got comments? Send them to the blog post associated with this project.