ATTiny Joule Thief NeoPixel
I’ve been fascinated with joule thief circuits since I made my first one. It’s amazing what all you can power from a single AA or AAA battery. The only problem is you can’t do much beyond light up an LED because the current isn’t “always on”. With a couple of extra components, you can take your joule thief to the next level! While this circuit isn’t particularly useful other than draining dead batteries, it’s a good starting point for building more advanced circuits powered by a joule thief.
If you aren’t familiar with the (in)famous joule thief, check out Weekend Projects with Bre Pettis: Make a Joule Thief.
- My project initially had a 1000 ohm resistor on the transistor base, but it caused the circuit to be dim. You may be able to experiment with different values to see how it affects your circuit.
- I experimented with a few different values in place of the 1000uF capacitor, but the 1000uF capacitor performed the best. I didn’t go any higher, so a bigger capacitor might do even better.
- I initially tried using a bridge rectifier with 4 diodes, but it didn’t power the LED very well. I think this may have been due to extra voltage drops across the extra diodes.
- The ATTiny in the Components section is for an ATTiny85 since that was the only pre-populated option in the project editor. I used an ATTiny45 and it works just fine.
- I used the Arduino IDE to program the ATTiny so the code is written in Wiring and flashed from the Arduino IDE.
- A good ATTiny45/85 reference can be found at https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide/attiny85-use-hints.
- To get a better idea of the NeoPixel pins, take a look at the images at https://www.adafruit.com/products/1734.
- The code uses low power modes and sleeping to save juice and to reduce the constant voltage and current used. The NeoPixel is not run at full brightness so that you get more colors. Full brightness consumes too much current, so you don’t get very good color mixing.
- You can use AAA or other 1.5V conventional batteries. I don’t know if it’s safe to use lithium ion or lithium polymer batteries, so don’t do it (they could catch fire or explode).
- I tried to include components with the fewest number of sources. Many of them are generic and can be purchased just about anywhere, but SparkFun and Amazon had the most comprehensive selections for this project.
- I didn’t have a Fritzing part for the toroid, so I used the closest thing I could find in the breadboard diagram.
I am not an electrical engineer, but this project worked for me. I didn’t fry or melt or electrocute or overheat anything that hurt me or the components. However, take any necessary precautions to make sure you don’t hurt anyone (yourself included) or anything.
Flash the code for your ATTiny with with Arduino IDE. If you don’t have the ATTiny stuff set up in the Arduino IDE, check out High-Low Tech’s Programming an ATtiny w/ Arduino 1.6 (or 1.0) guide.
Now that all that’s out of the way…
- 1. Prepare your joule thief circuit (minus the LED) on a breadboard. I used ethernet wire to wrap my toroid. If you don’t know how to make a joule thief, check out Weekend Projects with Bre Pettis: Make a Joule Thief.
- 2. Use a jumper wire to connect the transistor collector (usually the left pin if you’re looking at the flat side of the resistor) to the ground rail.
- 3. Connect the diode on the emitter pin and connect the other end (via a jumper) to the positive rail.
- 4. Put the 100uF electrolytic capacitor and 0.01uF ceramic capacitor on the power rails from steps 3 and 4. The ceramic capacitor can go in either way, but pay attention to the polarity of the electrolytic capacitor!
- 5. Place the ATTiny in the middle of the breadboard with its pins spanning both sides of the middle.
- 6. Connect the ground rail to ATTiny pin 4 (top right if you are facing the dot or notch of the ATTiny).
- 7. Connect the positive rail to ATTiny pin 8 (bottom left if you are facing the dot or notch of the ATTiny).
- 8. Put the NeoPixel LED in a remote corner of the board.
- 9. Connect a jumper from ATTiny pin 6 (3rd pin on the left if you are facing the dot or notch of the ATTiny) to the same column as the data input pin on the NeoPixel LED.
- 10. Connect a jumper from the positive rail to the same column as the 5V pin on the NeoPixel LED.
- 11. Connect a jumper from the ground rail to the same columns as the ground pin on the NeoPixel LED.
- 12. Place the 1000uF capacitor on the same columns as the positive and ground jumpers from steps 10 and 11. Make note of the capacitor polarity once again.
- 13. Place the SPDT switch in such a way as it connects the ground rail to the negative battery wire when the switch is toggled.
Assuming all went well, you should be able to turn the the circuit by toggling the switch. If nothing turns on, make sure everything is wired correctly and your battery isn’t too far gone. Once again, I am no EE, but this is a simple project that works. It’s probably not the most efficient possible circuit, but it can be done by a relative beginner in an afternoon!
For more detail: ATTiny Joule Thief NeoPixel
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w
This Post / Project can also be found using search terms:
- what projects can the joule thief used for