24 December 2007

The Joule Thief

I had it ready for months, but never finalized. This Xmas 2007 we needed a simple way to light the Nativity scene, so I took the chance to get it working.

I used the joule thief in its simplest form, as probably published November 1999 issue of EPE (Everyday Practical Electronics). It's a NPN transistor, one resistor, a bifilar transformer and a LED (any color). I found the diagram on the web and worked immediately.

Lighted using a dead saline battery.

Lighted using a dead saline battery. No flash.

The Nativity scene, with room lights ON.

The Nativity scene, with room lights OFF.

How did I wind the transformer? I saw many questions about it around the web. First of all, you need some luck since you're probably winding it on a core with unknown characteristics. I took some length of enameled copper wire (2 metres), bent in half and wound about 8 turns through the core. Windings are spread about on 80% of the core. The core is a ferrite bead recovered from WhoKnowsWhereLand. Try it first with a fresh battery. If it doesn't lit, add some turns and try again. If at 20 turns you still don't get light, then:
  • check your LED is wired properly
  • change the core
Don't forget to scrape off the insulation from the enameled wire at solder points!

Before someone asks, no, I have no spare cores to send around.

With the saline battery my joule thief produced noticeable light (in darkness) for 36 uninterrupted hours. I will measure how much current it draws at the next battery change.

11 December 2007

Driving a LED from TTL/CMOS

It's the first thing you learn about TTL/CMOS chips: they cannot (should not) drive a LED directly. A transistor driver is needed, and is shown at the right in its simplest form.
When the gate output goes high the BJT saturates and current flows through your LED. A limiting resistor is needed to control the LED current.

The table below shows R values vs supply voltage vs LED current.

Vcc R ohm R_ohm R_ohm
3,6 45 30 22,5
4,8 105 70 52,5
6 165 110 82,5
7,2 225 150 112,5
8,4 285 190 142,5
9,6 345 230 172,5
10,8 405 270 202,5
12 465 310 232,5
13,2 525 350 262,5

0,02 0,03 0,04
2 2 2
V_CE [V]
0,7 0,7 0,7

I will need these in my hi-brightness red LED optical MCW transmitter.