If you've ever wanted to power your Arduino or AVR from a battery for development testing (batteries have different power delivery qualities than, say, transformed AC or even a regulated wall wart in DC) testing but were tired of going through batteries (Hey, I admit I've sucked batteries dry in hours because of a slipped-up design before I caught it). 

Maybe you want to take your design and project mobile, for instance, up in the mountains away from your vehicle and any plug in outlets.  It might be useful to have a battery powered device whose batteries you never change, but just crank up once a week.  Or better yet, maybe you want to take your Arduino to the coffee shop and not have to look for an outlet or USB connection.  Well, here's a quick little way to power your development board from a battery that never (well, you know) runs out.

I've taken a hand-crank-powered flashlight and hax0red it to power my AVR and Arduino development boards.  The battery lasts for a good long time and if you crank it a few times before you use it you'll find you'll get a solid 3.5V out of it (depending on your battery).  Plenty enough to power an AVR ATtiny, ATmega, and ATxmega, as well as other 3.3V devices like the STM32F ARM MCU indefinitely!

Step 1: Necessary Items

To make this work, you'll need either:

  1. DC motor (I've tried about 3 or 4 different kinds of DC motors for this and I got them all out of old CD/DVD players so you don't have to pay for one if you cannibalize).
  2. small 3.3 or whatever capacity battery (I've used several small lithiums for my testing)
  3. diode (a small 1N4148 will do)
  4. something to make a crank with (rod & hot glue, rubber band, etc)

or you can buy a hand-cranked flashlight from ebay for a buck and change.  This method is prefereable for a couple of reasons.  First, the cranking mechanism is far superior to probably anything you're going to make and will really torque up when you crank it, delivering energy to the battery and straight on through to the powered device.  Second, you'll have a tiny motor and small battery already included for probably what you'd end up paying for the battery alone, so splurge and buy one or two (I bought two) hand-cranked flashlights.  You'll be glad you did.

For both versions you'll need the standard tools: wire, wire snips, soldering iron, etc.

<p>Would this work ok with a 9v battery?</p>
Nice, just picked up a few of these keychains from DX with this exact goal, powering an arduino! :D Thanks for the tut, will definitely come in handy
Hey, thanks for the comment. Good luck with your project!
Great project! Actually all your instructables are impressive brainchilds, good explained and with many different branches investigations, I like them!
Heyas,<br><br>Thank you so much for the kind words! It's great to know someone is enjoying them.<br><br>Cheers!<br>Gian
how many volts does the generator give? btw its nice
hi bapos,<br><br>Thanks! I got almost 4 volts consistently.<br><br>/nev/dull
Arduino is here:<br>http://www.arduino.cc/en/Main/Boards<br>http://www.freeduino.org/index.html<br>http://www.instructables.com/id/RGB-LED-Tutorial-using-an-Arduino-RGBL/<br>My Arduino:<br>http://micbric.free.fr/arduino.html<br><br>Enjoy
waht is a Arduino or avr?
They're both popular microcontrollers used in DIY projects. AVR is the product line from Atmel while the Arduino is a readily accessible hardware and software programming/development board for an AVR.
great.... but here's an idea. Why not connect another DC motor to one of the digital out pins, and use that to drive the crank? That way it can run for ever!
Sorry, but that does not work. This is a common beginner mistake... The law of conservation of energy says that you cannot get more energy (electricity) out of a machine that the amount of energy you put in. The generator will have to create enough energy to charge the battery and have enough leftover to run a motor to power the entire circuit, which is impossible. <br><br>In fact, the motor will not even be able to turn the generator because the load on it will resist movement of the shaft, and this will cause the motor to attempt to draw more power out of the battery and generator, creating a runaway loop.<br><br>If you try this, the battery will drain faster than without a motor. Make sure you don't attach a motor directly to a digital pin, always use a transistor.<br><br>
Yeah... I was kidding...
Neat, but it would be well worthwhile adding a couple of capacitors (100uF and 0.1uF) across the battery. These won't affect the charging, but the output from the generator circuit is going to be incredibly spiky, and the capacitors will go some way to suppressing this. For a bit more protection, a 4.7V zener diode wouldn't go amiss there too.
put in a small, cheap, ceramic capacitor in parallel too, and it will take care oft the sharper spikes :)
Heya AndyGadget,<br><br>Thanks a lot for the comments. I think you're right about the capacitors and will work them into the next design. I added a 3.3V zener in the schematic but it never translated into the case version. Maybe 4.7V is better for overvolt protection? <br><br>Thanks again for the improvements.<br>Cheers!<br>-gian<br>/nev/dull
I've often wondered if the handcrank genny, supercap and switching reg would be better for this kind of duty. <br> <br>Steve
Nice article

About This Instructable




Bio: Gian is a computational biologist and is the Managing Director at Open Design Strategies, LLC. He holds a BA in Molecular/Cellular Biology and an ... More »
More by nevdull:Create A Custom Medieval-/Fantasy-Style Calligraphy Quill Practical DACs Using Enumerated Types as Bitflags 
Add instructable to: