Joule-Thief powered PICAXE

fernando_g

Senior Member
I would assume that most of the forum browsers know about the joule thief circuit. This is an ultra-simple circuit which boosts the voltage from a single cell alkaline battery to a voltage high enough to light up a white LED (about 3.4 to 3.8 volts).

Turns out that this voltage is enough to power up a 08M PICAXE too.

Thus this little project. It is a single cell emergency beacon, that turns on for a second, then sleeps for over two seconds. Great to locate that switch in a darkened basement. And its low average current drain greatly increases the battery's lifespan.

The code is trivial:

Code:
#picaxe 08m
'out1=led, out2=fet
low 2 'turn on fet
disablebod

main:
high 1 'turn on led
pause 1000 'for 1 sec
low 1 'turn off led
pause 15 'allow cap to charge
high 2 'turn off fet
sleep 1 'low power mode
low 2 'turn on fet
goto main
The 0.01 uF capacitor in parallel with the PNP transistor, bootstraps the unit for the joule thief to start oscillation. The voltage builds up, and the PICAXE starts up. It immediately will pull out2 low, fully turning on the PNP transistor which provides base bias to the main NPN oscillator.

The PICAXE will then turn on the white LED on out for 1 second. After it turns off, it will maintain the joule thief enabled for some 5 more milliseconds to allow some charge to build up in the 100 uF capacitor. The PICAXE will then turn off the PNP, and then go to sleep. It will then turn on the PNP and the LED again, repeating the cycle.

The 0.1 and 22 uF in parallel with the 1.5 volts really allow to get the very last drop of energy from the battery.

With the 8.5 uH transformer one gets about 9 milliamps to the LED.
The 5.1 volt zener is mostly dormant, but is included to prevent the voltage from building high enough to damage the PICAXE.

A pair of yellow LEDs in series may be substituted for the single white LED.
 

Attachments

BeanieBots

Moderator
Interesting version of the circuit.
However, if anyone wants to build it, they will need to know the transformer turns ratio.
 

fernando_g

Senior Member
You are right BB.

For this particular circuit, I employed a Micrometal's T50-8 core, and wound 30 turns each for the primary and secondary.
I sized it such that it would produce around 9 milliamps, therefore no current limiting resistor was required.

But as the link posted by Janne indicates, almost any core or NPN transistor will work with the joule thief. The output current will be different, however. My advice would be to build the J-T first with components you have available and measure the LED current. The core turns and/or the base resistor may be adjusted to suit your needs.
 

skyv

New Member
There appears to be an error in the diagram in post #2.
The anode of the 1N5817 should be connected to the collector
of the 2N3904.

skyv
 

papaof2

Senior Member
Anyone else into bad puns?

Every time I see the title of this thread, I picture a miscreant robot:

A PICAXE powered jewel thief

Sorry, just couldn't resist ;-)

John
 

fernando_g

Senior Member
There appears to be an error in the diagram in post #2.
The anode of the 1N5817 should be connected to the collector
of the 2N3904.

skyv
You are absolutely right! The way it is drawn, only the raw battery voltage will flow thru the diode.

I will correct the schematic and re-post it.

Thanks for spotting it!
 

fernando_g

Senior Member
Updated project

I received a PM asking "Could the Joule Thief be controlled in a similar fashion by -say- a CMOS 555?"

The short answer is, yes, of course. But with the PICAXE additional tricks can be performed with ease.

For instance, if the light in your basement is already turned on, you don't require the circuit to continue to flash, right? And in lieu of adding another switch, why not do it automatically with a light dependent resistor?

Such an arrangement is shown in the attached PDF file (plus the correct position for the diode, thanks SKYV). The LDR forms a resistive divider, which draws some current, and since this a current thrifty project, we need to activate the divider only for the duration it takes to make an ADC reading.

The code again, is ultra simple:

Code:
#picaxe 08m
'out0= LDR divider, out1=led, out2=fet
'in4= read LDR
low 2 'turn on fet
disablebod
pause 100

main:
high 0  'enable LDR divider
readadc 4, b5
low 0   'disable LDR divider to conserve power
if b5 < 128 then power_down 'means that LDR is illuminated,no LED

high 1 'turn on led
pause 1000 'for 1 sec
low 1 'turn off led
pause 5 'allow cap to charge

power_down: 
high 2 'turn off fet
sleep 1 'low power mode
low 2 'turn on fet
goto main
 

Attachments

kcarring

New Member
Very cool and thanks for sharing.. a fun circuit. I'm going to build it, just for the learning experience. Without any intent to sound derogatory... would it not be a lot easier to just build a LDR dark detecting, blinking joule thief? Or am I missing something. Xee2vids on youtube has a video called (I think) "The 7 year joule thief" (or something), which is kind of what I am referring to. Cap fill technique, I believe.
 

westaust55

Moderator
Very cool and thanks for sharing.. a fun circuit. I'm going to build it, just for the learning experience. Without any intent to sound derogatory... would it not be a lot easier to just build a LDR dark detecting, blinking joule thief? Or am I missing something. Xee2vids on youtube has a video called (I think) "The 7 year joule thief" (or something), which is kind of what I am referring to. Cap fill technique, I believe.
Welcome to the PICAXE forum.
While the answer to your question is Yes, keeping in mind that this is primarily a forum for PICAXE related projects,
part of the intent as stated by Fernando was to demostrate the circuit can power the PICAXE 08M chip and as stated in post 9:
"with the PICAXE additional tricks can be performed with ease"
 

roscos

New Member
Sorry fernando_g for being so pedantic but my training taught me that VOLTAGE does not flow. The current flows, the voltage is the force
behind it, or the potential difference between the two points the current flows from and to.
roscos.
 

westaust55

Moderator
@DakLak,

Thank you for the link update – I am sure that will help others in future as posts and questions about the Joule-Thief arise form time to time.

As this is only your second post on the PICAXE forum:

Welcome to the PICAXE forum.
 

Carloshbarbosa

New Member
Hi, I'm making a joule thief to power a picaxe but it doesn´t work. How many turns do the primary and secondary coils have? I rather like if you could reply this as soon as possible.

Carlos Henrique
 

srnet

Senior Member
Welcome to the Forums.

For a quick answer to your question, did you read the thread ?

I am sure how to make the coil was mentioned somewhere ..........
 

westaust55

Moderator
Hi, I'm making a joule thief to power a picaxe but it doesn´t work. How many turns do the primary and secondary coils have? I rather like if you could reply this as soon as possible.

Carlos Henrique

See post 5 in this thread - it states the number of turns for primary and secondary (both have same number of turns)
 
Top