Arduino battery powered

Hello forum members,

I'm new here, this is my first post, and I have a question about the Arduino Duemilanove. My Arduino should come tomorrow, and I was wondering if it's possible to power the Arduino with a battery, so I can use the components with the codes, without a computer. And if this is possible, do I have to change my schematics?

Many thanks, Deco Aoreste

Yes its possible to power the arduino with a battery. If your circuits are powered from the arduino itself, you don't need to change any schematics (except the obvious changes to the power supply).

Thanks for replying.

So if I use a 9 volt battery, then I don’t need to change things like resistors (I’m really new to this)? And the code saves on the Arduino, without a computer?

So if I use a 9 volt battery, then I don't need to change things like resistors (I'm really new to this)?

Which resistors? Ones on the Arduino?

And the code saves on the Arduino, without a computer?

The compiled program is saved on the Arduino to a section of memory called "Flash". This memory is non-volatile; it remembers what's stored even when power is lost.

You can: connect the Arduino to a computer; download a program to the Arduino; disconnect the Arduino from the computer; connect power to the Arduino (like a battery); and the Arduino will faithfully run the last program you downloaded.

If you are using a battery, I would recommend getting a round plug and making up a battery connector so you can never get your positive and negative the wrong way round through Vin. And it's mighty handy to have a battery on a plug. Here is a picture of mine in use:


@Coding Badly: I mean if the voltage of a battery is the same as the voltage coming from the USB.

I mean if the voltage of a battery is the same as the voltage coming from the USB.

If the voltage from your battery is somehow 5v then you can power the arduino through the 5v and gnd pins but only if it is actually 5v (and you have tested it). An easy way to fry your arduino that is. Also putting the leads the wrong way can fry it. That's why it is good to have a battery on a plug.

For voltages above 5v (they need to be above 7 to work properly), plug them into Vin and Gnd (or the DC power jack) and then the onboard regulator will do its thing and regulate it to 5v.


Funny story. I just picked up a battery pack today that has an On/ Off switch and holds 4 AAA batteries. After reading this thread i just remembered i have 3 or 4 9V battery clips and didn't need to spend the money. But its nice having the power switch so i can tunr the unit off and on as needed.

Deco, if you plug the battery into the DC input jack, there is a voltage regulator on the arduino which will regulate the battery voltage to the 5V that the AVR chips and peripherals need. As long as your input voltage is above 7 V, the voltage regulator will be able to maintain the 5V to the Arduino.

Is the black input jack that I've circled in red the DC input jack?

If that's the case, can I insert a 9v battery in there without damaging my Arduino? Does that thing regulate the 9v to 5v?

Many thanks, Deco Aoreste

Yep, thats the DC input. its a standard 2.1 mm dc socket, wired centre positive and accepts any voltage from 7 to 20 volts. If your circuits use a lot of current, the voltage regulator on the Arduino will get hot at the higher voltages.

A cheap alternative to a 9v battery that will run for far longer is to connect 3 alkaline AA cells in series and feed it directly to GND and 5V. It doesn't provide exactly 5V which usually isn't a problem, but it doesn't have any polarity protection, so get it right. Because it doesn't do through the voltage regulator it isn't wasting almost half the batteries energy as heat. In my experience the arduino will continue running until the cells are down to about 3 volts (completely knackered in other words). It has pros and cons like almost everything else in life......

Heres a standard Arduino Duemilanove running good ol' blink on 2 freshish AA batteries (as opposed to 3 knackered ones) at a tad over 3 volts :

This depends on what you are using the Arduino for and how you connect it to whatever it's being used for. With 3 batteries tied directly to the Arduino +5 supply, you have an unregulated nominal 4.5V supply. Depending on things like sensors and PWM use, that may or may not work. The Arduino may function down to nearly 3V, but the things you are doing with it may not work so well. Then again, it might work, but your code may have to take into account the actual voltage of the batteries in real time (which is possible).

You can also use a step up converter, that takes battery voltage between 1V and 4V and outputs regulated 5V, like this one (there are many other models out there):