Powering a compact fluorescent lightbulb with a Joule Thief

and figuring out what it does

what is a joule thief?

It's basically a very simple switching mode power supply designed to efficiently boost battery voltage for the purpose of lighting LEDs or other small loads. As batteries are discharged, their voltage drops steadily until there's not enough left to light up the LED and the device shuts down. The point of the Joule Thief is that it can operate to extremely low voltages and "steal" energy from batteries that appear to be completely drained and reluctant to give any - because they're not. The basic circuit is covered well on Wikipedia so I won't spend too much time explaining how it works. Just to paraphrase, the Joule Thief is a blocking oscillator that works by positive feedback.

Image courtesy of Wikipedia.

What causes the amplification in voltage is the self-inductance of the transformer when it's being cut off. As with all inductors, a current flowing through it deposits energy in a magnetic field in proportion to the current, and when the current is abruptly stopped, the stored energy has to come out. The energy in the magnetic field induces a voltage that attempts to push current through the transformer in the same direction as went before, but since the circuit through the transistor is blocked for both windings, there's no way out; the energy has to come out, so the voltage just keeps rising and rising until it finds a way out! This is how a regular boost converter works

Image: a simple boost converter

The way out is through the load that is connected across the switch, which didn't conduct current for the lower voltage before but does so now for the higher voltage. That drains the energy stored in the transformer's magnetic core, the LED lights up for a moment and the cycle repeats.

However, I recently ran across this website as featured on Hackaday. Here things are done a bit differently. Instead of connecting the load across the transistor, a third winding is added to the transformer and the load connected across that with the idea that the oscillator simply provides an AC waveform for the transformer to step up.

This time the current is still blocked by the transistor, but not by the load at the secondary winding, so very little voltage rise happens at the primary side of the transformer as the load on the secondary is happy to accept the energy. On the other hand, if the load at the secondary doesn't conduct very well, the self-induction returns and increases the voltage at all windings until one of them starts to pass current. That's how it's able to start a fluorescent tube, or if a load is not connected, probably break through the insulation somewhere.

The alternate version

The new plan calls for the following changes to the basic circuit:

Image: a joule smuggler?

The oscillator side of the circuit is basically the same as before - it's simply drawn differently. The only difference is the lack of the LED across the transistor, and the addition of a secondary winding to the transformer, and of course the fluorescent tube or bulb. The potentiometer is 100 Ohms.

Let's try it out.

First things first: components. We don't need to be very particular, since the circuit will work with just about anything we throw at it. If you have PNP transistors instead of NPN for example - no worry, just reverse the battery. Discarded PC power supplies contain heavy duty transistors, fast diodes, rectifier bridges, toroids, inductors, capacitors and all sorts of interesting stuff. I took apart an old 400 W Fortron ATX power supply. For the ring core I pulled out one of the filter chokes. For the transistor I found a nice Fairchild E13009L which is an NPN power transistor rated for up to 24 amps and 400 volts. The only thing you can't find in a PSU is the potentiometer, which you will have to buy. Fortunately I already had one from an old PC fan speed controller, so that's all the parts right there.

One thing we do care about is to get enough turns of magnet wire on the ring core, which means we have to use the thinnest wire possible. We're basically building a transformer for a specific load, and since the one I happened to have is a 7 Watt bulb designed for 220 Volts, it should draw something on the order of 32 milliamps. We can compare this to various wire ampacity charts you can find by google, or by remembering a handy rule of thumb: 3 amps per square millimeter. Simply divide the current by three and the answer comes up as 0.01 mm^2. Consulting the charts we can find a close equivalent with 0.113 mm or AWG 37 wire. That's quite a fine thread - we can safely assume that just about any thin wire we find will do.

Unfortunately all the transformers in the old power supply were glued and wrapped in so much paper that using them for wire would have been hopeless, so I pulled apart an old Nokia phone charger for some. It had a 335 mA rating, so that's at least thick enough.

Image: core and wire shuttle

For winding the new transformer I took a small rod and wound up all the magnet wire from the transformer onto the rod to weave it through the core. The ring was slightly too small for the wire and I only got 150 turns on the first layer, so I wrapped it up in clear tape for insulation and put a second layer of wire for a total of 250 turns, careful not to cross too close to the exposed end of the first layer. Clear scotch tape is not exactly industry approved insulating material, but never we mind - this is a hack anyways. With the secondary winding done, I took some 18 AWG wire from the old PSU for 10 turns around for the primary, and 5 turns of 24 AWG wire for the feedback coil. It all fit quite snugly.

Image: the circuit fully assembled

In short: we need one NPN power transistor with heatsink, one reasonably sized toroid core, one battery holder, two AA batteries, one 100 Ohm potentiometer, one ex-CFL bulb - and here the article mentions to twist together the pairs of wire at the ends of the tube - and probably around 10 meters of thin magnet wire, plus a couple feet of thick insulated wire. We wind the magnet wire first onto a narrow rod to fit it through the core, then wind the secondary winding, then the two primary windings both in the same direction on top, and finally solder it all together. The dots in the diagram indicate which end of the winding is which.

It works!

On the very first try nonetheless.

Image: full power

Well, yes and no. You can read by the light, but it's really just about as bright as a tea candle - and almost as hot. After a couple minutes, the transistor feels warm to the touch and the batteries are getting really toasty like they're struggling under the strain. This thing really gobbles up power and eats batteries for snacks, but where does it all go and why isn't the light any brighter?

Well, let's start from the battery. The alkaline AA cell is not a good power source for several reasons, the first and foremost of which is the fact that they have high internal resistance. A single cell should give out about 4 Watt-hours of energy, and there's two cells here for a total of 8 Watt-hours. Since we're getting probably about half an hour of runtime out of them, we're making heat and almost no light at a rate of 16 Watts! No wonder things are getting toasty.

Let's consider the simple electrical model of a battery:

Image: the circuit equivalent of a battery

The source voltage of the battery is the chemical potential between its electrodes, and R represents the slowness of chemical reactions that take place as well as the electrical resistance of the materials. It may include even the resistance of your battery holder where it touches the terminals. Technically there's all sorts of weird stuff going on - capacitance, inductance, rate of reaction variability and internal leakage - but we'll ignore that for now and call it "close enough". The question we're looking to answer is, what happens when you start to draw current out of a battery?

Image: the main parameters of a battery under discharge

To see what happens in theory, I took a guess at some value of R and plotted the output voltage against output current. From that it's easy to calculate the power of the battery as a product of voltage and current. The heat loss inside the battery comes from Joule's law which is P=RI^2, and the efficiency is simply the ratio of power output to the sum of heating and output power.

Measuring the internal resistance of a battery

As we start to draw more current from the battery, its voltage drops according to Ohm's law V=RI, which is why the voltage falls in a straight line. This also gives us the means to measure the internal resistance of a real battery by drawing a certain amout of current and measuring the voltage. This happens most easily with a 1 Ohm resistor: when you short the battery cell with the resistor, the voltage across and current through the resistor will be exactly the same. For the other reference point, we can use a 100 Ohm resistor, which reads out in Volts and 1/100th Amperes or increments of 10 mA. Then we subtract the smaller values from the larger to get dV and dA (read: difference in-), and for our battery's internal resistance we put our trust in the Ohm's law which turns out into the form dV/dA=R. In this case, R is exactly 0.4 Ohms.

This reveals an interesting question. If our battery is like that, we should be getting a maximum of 1.4 Watts out, and 1.4 Watts of heat in the battery for a total of 2.8 Watts, so the 4 Wh of energy should last for 1 hour 25 minutes. Let's test that out. We'll take a fresh set of batteries, measure them out, then run them down and see how long it takes, then measure them again. That should tell us whether there's any Joule thieving going on and what the efficiency is.

Fortunately I had the foresight to measure one of my cells before, during, and after the experiment the first time I did it.

Fresh cell V I [A] dV/dA [Ohm]
1 Ohm 1.31 1.31
100 Ohm 1.59 0.0159
difference 0.28 1.2941 0.22
Used cell V I [A] dV/dA [Ohm]
1 Ohm 1.14 1.14
100 Ohm 1.35 0.0135
difference 0.21 1.1265 0.19
Empty cell V I [A] dV/dA [Ohm]
1 Ohm 0.94 0.94
100 Ohm 1.26 0.0126
difference 0.32 0.9274 0.35

The internal resistance of the battery clearly grows as it drains empty. Trouble is, I haven't accounted for temperature since the used cell pulled out of the device half-way in was very hot, which makes chemical reactions run faster, which reduces the internal resistance. The other measurements were done with the cells cold. This should warrant further investigation, but I digress, it would be too much work, so let's just assume the internal resistance is the average of the three readings, or 0.25 Ohms. That gives us a prediction.

Measuring the runtime of a battery

Image: predicting the runtime of a battery for different amounts of energy, power, current

By measuring the current and timing how long the bulb runs, we get to see how much energy we can get out of the battery, and since we know its efficiency, we also know how much was consumed in total. Trouble is, we can't measure the current directly because the device is very sensitive to small changes in resistance, and ordinary digital multimeters measure current by adding a known resistance, called a shunt resistor, in series with the load that's being measured. Connecting a multimeter here would mess up our experiment, and in practice it also turns off the lamp because it adds too much resistance!

Fortunately, we can measure the current indirectly, since we already know what the internal resistance of the battery is. We simply note how much the voltage at the battery drops and we have what we need to know. This of course requires a sufficiently good meter that measures the true RMS voltage, or one that is sufficiently slow to average everything out. Assuming that we do, let's get to it.

The method of measurement is to connect a voltmeter, in this case a Leader LCD-100 DMM/Scope using the DMM section, across one battery cell which has been measured before the test for internal resistance. Then we write down the high and low value of the voltage every 5 minutes. The low value is measured while connected to the circuit, and the high value is taken 5 seconds after disconnecting the other cell to stop the current. Measurement continues until the bulb turns off on its own, then a final measurement is taken, and the internal resistance of the battery cell is measured while hot and cold.

Time (min) High [V] Low [V] dV I [A] (0.22 Ohm) R [Ohm]
0 1.36 0.87 0.49 2.2 0.22
5 1.28 0.83 0.45 2.0
10 1.26 0.81 0.45 2.0
15 1.23 0.76 0.47 2.1
20 1.19 0.60 0.59 2.7
21 0.82 0.36 0.46 2.1
hot 1.28 1.05 0.23 1.04 (dA) 0.22
cold 1.34 1.03 0.31 1.01 (dA) 0.31

At 21 minutes the light had shut off and would not turn back on for more than a few seconds. The transistor was barely warm - the battery was absolutely scorching. Having cooled down, the battery cell's internal resistance rose to 0.31 Ohms. It was the heat that kept the battery going so long as it did! The interesting feature is that it seems like the circuit was actually trying to maintain constant power with the dropping voltage. Why it would do so, I have no idea. Simply multiplying RMS current with RMS voltage also ignores the power factor. The voltage and current waveforms may not coincide perfectly, so the graph probably shows somewhat more power than what there really is.

Image: voltage, current, power during the discharge.

But our prediction doesn't depend on the power factor. If we trust the previous prediction, we managed to consume maybe 1.3 Wh of energy out of the cell - but we made a rather large oversight by not accounting for the falling voltage of the battery cell. Fortunately the voltage drop was rather linear, so a good estimate can be made by using the average high voltage before the bulb turned off, and see what that gives.

Image: new prediction

Of course this isn't terribly scientific, because our battery isn't anywhere near an ideal battery. We have implicit assumptions going on left and right, but it serves to prove a point. We've managed to extract about 1/4 of the energy from the battery before the whole thing shut down - well the lamp did, the oscillator still kept going.

In the final resistance measurements, the battery cell gave a high voltage of 1.28 and 1.34 Volts, which indicates that there's still plenty of energy left. Assuming that the heat didn't kill it, it would have a fine second life in a remote, or in an actual Joule Thief lamp powering an LED. There's no Joule Thieving going on here; the battery is not dead, it's just resting!

As for the efficiency of the battery: by all the data we have, it looks like we're getting around 1.7 Watts of power out from a single cell for 20 minutes, which makes 0.6 Watt-hours. The amount of power lost to the battery is P=dV*I which comes out at an average of 1.2 W or 0.4 Wh which means that the efficiency of the battery is roughly 60% and the total energy consumed is indeed more or less 1 Watt-hours.

Image: the effect of falling source voltage on power output. (R=0.22 Ohm)

So the basic problem is this: You need at least some amount of power to keep the light going, but the cell's source voltage is dropping constantly, and so the available power is dropping constantly. To compensate, you need to keep drawing more and more current, but that causes the source voltage to drop faster, until at some point the battery just can't give what you're asking for and both power output and voltage collapse. Our experiment reached the tipping point at 1.19 Volts and 2.7 Amps, which is exactly the peak performance it could give, and then no more. This isn't an issue for the original Joule Thief because LEDs don't have minimum power requirements, so it just keeps going.

But, we still have two battery cells here giving out 1.7 Watts each for a total of 3.4 Watts for at least some time, which should make the fluorescent tube plenty bright at least to begin with. Why was it not?

How efficient is the oscillator?

The second suspect is the switching transistor. Running the oscillator with the bulb dark or disconnected seems to be drawing around 1.5 W of power, which suggests that it's around 55% efficient, which isn't very good, but that's not really a representative comparison because we're dissapating the transients from the transformer back in on the transistor and the battery when there's no load connected.

One problem with the transistor is that it has a fairly low gain, between 6 and 40 as compared to the 2N3055 power transistor in the original circuit which has a gain of 20-70. The transistor gain denotes the ratio of base current to collector current. In order to pass current through the collector, we need current through the base. Since the base is actually a diode with some resistance and capacitance thrown in as well, there's a 0.7 - 1.2 V forward voltage drop. That means it dissapates power. P=VI

Fortunately, browsing through the data sheet, it turns out the transistor has a gain closer to 40 than 6 for small currents up to a couple Amperes, so we're not losing that much. The bigger power drain is actually the potentiometer, because it has the rest of the battery voltage acting over it. We can't choose to use the minimum amount of base current though, because the less you use the slower the transistor turns on and off, and that increases losses on the collector-emitter path.

Image: a large signal model of a BJ-Transistor.

The feedback mechanism works by transformer action. There's a 10:5 turns ratio between the two windings, so it takes half the voltage acting across the transformer primary and adds it to the battery voltage at the base of the transistor, which adds to the current that turns the transistor on. This voltage follows an exponential decay with the rising current through the transformer primary, which means the transistor base sees about 1.25 times the battery voltage on average. Or something like that. The battery voltage is also falling simultaneously, so determining the exact voltage is complicated. Switch-off happens either when the transistor base current falls enought that it starts to turn off, or because the batteries reach saturation and can't give any more current, or for any reason that would cause the current through the primary winding to stop increasing.

On the off-stroke, the reverse voltage is determined by the self-inductance of the core windings, which may put it tens of volts in the negative. That quickly drains the charge from the transistor base capacitance and shoves it back through the potentiometer towards the battery. This return path "resets" the transformer by emptying out any leftover energy before the next cycle can begin, but also wastes energy by using a portion of the stored magnetic field in an attempt to recharge the battery. This is what is consuming power when there's no load connected to pick it up. The energy stored in the magnetic field comes out through all the windings, but mostly through the one with the least impedance.

However, even when there is a load connected, the feedback path shows up in parallel with the load and always steals some portion of the power. Due to the transformer action, since there's a 5:250 ratio between the two, whatever you put in the feedback circuit appears as if 50x greater when viewed from the load side of the transformer. That includes the battery as well, so if the battery source voltage is 3 Volts, it's almost like there was a 150 Volt zener diode with a ~500 Ohm series resistor in parallel with the fluorescent tube. As long as the tube conducts current below 150 Volts, it should catch nearly all of the power.

Image: collector-emitter voltage at different potentiometer settings.

Note: probe set to 10x attenuation: 500 mV/div

If we set the potentiometer to 20 Ohms, there's about 74 mA and only 115 mW spent in driving the transistor on, but at a cost in the main switching loss because the transistor isn't being driven on hard enough. The transistor saturates too early and the voltage drop across collector and emitter, just before switching occurs, just when the current is highest, is between 0.5 - 1 Volts which spells huge power losses on the order of 1-2 Watts. Setting it to 2 Ohms causes 743 mA of current to flow, and much sharper switching, but a power loss of 1.6 Watts at the base and potentiometer. The transformer starts to squeal audibly as well with the frequency dropping to the audible range, so that's no good either.

The frequency of oscillation changes because the base current is a significant fraction of what the battery can give. Diverting more current through the transistor base means less voltage across the primary coil and a slower rise in current. Using less means the current rises faster, and the transistor saturates earlier. The feedback catches on to this and cycles the transistor off.

The relationship between frequency and potentiometer position seems to be quite non-linear. Generally speaking, the potentiometer does not act as a dimmer dial. Setting it higher or lower certainly changes the brightness, but at the cost of heating up the transistor more. This may save some battery life by reducing overall power, but mostly it's just wasting it.

If we set the potentiometer between 10-2 Ohms, we should be losing something like 600-800 mW of power in switching, which means the oscillator can be reasonably tuned to perform above 75% efficiency, which is not at all bad. It means we're getting at least 2.6 Watts through to the actual load, presuming we aren't getting horrible losses at the transformer core or elsewhere. Ultimately, we should replace the transistor with something that has much more gain, and the efficiency should go up tremendously.

How efficient is the transformer?

Tough question. I have no idea what the core is made of, and since the oscillator is running at around 30-40 kHz instead of 100 kHz to 1 MHz, I'm just going to assume that it works and leave well enough alone. The windings are not getting warm to the touch, so it's probably very efficient with less than 5% power loss.

How efficient is the bulb itself?

CFL bulbs are approximately 10% efficient in absolute terms, which is pretty bad. The reason why they're "energy saving" is because the incandecent light bulb is only about 2% efficient, but for the amount of light they do produce, even a single Watt goes a long way to light up a room. In fact, that's about as much as a 60 Watt regular lightbulb does, and we should be getting about a quarter of that with this setup here.

Except we clearly aren't. If you think of how bright a 2 Watt LED is, that's how bright this should be.

To understand the problem we have to consider how fluorescent lights work, and here we have two basic types: hot cathode and cold cathode. The word cathode refers to the electrode at the end of the tube that transmits current through the ionized gas, and hotness or coldness refers to the way in which it does so. The word cathode means the negative electrode because electrons carry a negative charge, but there's no difference between the ends of the tube because it's running on AC and the direction keeps changing all the time.

Image: hot and cold cathode tubes.

Cold cathode lights such as television backlights and neon signs aren't actually cold, in fact they're pretty hot because the current that flows through heats them up. They're only relatively cold in comparison to the hot cathodes which are made of thin tungsten wire that glows between 700 - 1000 C when the bulb is operating.

When the cathode is cold, the main method for transmission of current is the high voltage difference between the electrodes that rips electrons off of gas molecules, ionizing them and sending the electrons flying towards the positive end of the tube while the positively charged ions fly towards the negative end of the tube and hit the cathode.

The problem with this approach is that the ions are heavy. They're atoms with significant mass, especially if you have stuff like mercury in your tube. It's like the cathode is being sandblasted at the molecular level, which causes pieces to fly off in a process called sputtering and the cathodes have to be designed to withstand this bombardment. Furthermore, since the positively charged ions are all bunching up towards the cathode, a large positive charge develops near that end of the tube and eats up most of the electrons going towards the other end. The tube acts like a leaky capacitor with charges separated to different ends.

The different approach of using a hot cathode relies on the electrode material being hot enough that it starts to release thermionic electrons, which are really just regular electrons but they're given enough energy by the heat of the filament to jump off from the metal and form a cloud of plasma around the electrode. Since there's plenty of free electrons, you don't have to ionize the atoms to get a current going.That means the electrodes get spared the heavy bombardment and there's no large voltage drop right next to the cathode.

When a current flows through the tube, the difference is roughly as follows:

Image: Voltage difference along a fluorescent tube

Since the tube is short, the large voltage difference at the end of the tube dissapates more power than the smaller difference along the tube. Little power is being dissapated along the lenght of the tube where the luminous phosphor is, and lots at the cathode where it isn't. This is one of the reasons why cold cathode tubes are less efficient than hot cathode tubes. The main reason to use them is that they're simpler and more robust than hot cathode tubes, because there's no filaments to heat up and wear out. You just strike an arc through and keep it coming.

So you've probably already guessed what's wrong here: in the original article we are instructed to twist together the wires that power the filaments. No heating of the filaments - but wait: in a regular fluorescent tube there's no heating either after the bulb has started. There's enough power from the current itself to keep the filaments hot.

Well, yes, but we're running the tube below its specified rating so there's not enough heat; we're running a tube designed with hot cathodes as if it were a cold cathode tube! This is also the reason why you can't dim fluorescent tubes without a special dimming ballast that applies filament heating when operating below rated power. You can technically dim the tube without one, but when the tube transitions from thermionic emission to ionic transfer of current, it quickly erodes the filaments away and the tube is destroyed. Although, if you dim the tube way down to ~5% brightness, the ionic current isn't strong enough to cause significant wear and the tube lasts just as long. Only, it's not very efficient and who would do that anyways?

As a corollary, if you run the tube above its rated power the filaments overheat and evaporate, blackening the tube, so don't expect many hours of operation. You probably wouldn't want to pay for the batteries either.

Isn't there anything we can do about it?

Running a fluorescent tube on an unregulated power supply wasn't a very bright idea to start with: if you increase your battery's current and voltage to the point where it should work properly, the bulb is first going to run too hot and then too cold as the battery voltage inevitably drops. There's a little bit of leeway though and if we're lucky we can run the bulb a little bit beyond its capacity, and then let it dim to the point where thermionic emission stops. But to do that, we need more power, and as shown above you simply can't get it out of regular cheap alkalines.

Image: needs more power

(content subject to further editing)