Can I power my Uno on a 9v battery? and can I run sketch with no USB connected?

Hi All

OK, so my Arduino Uno starter kit came supplied with a 9v battery and holder, with female connector that fits into the Arduino board. I have read in some other threads that powering the Arduino with a 9v battery is not advised, but why then is the Arduino supplied with a male connector for connection of an external power supply?

What is the best way to externally power the Arduino?

Also, if I do power the Arduino from an external supply, once the sketch has been sent to the Arduino for the current project, am I able to remove the USB connector, power up the Arduino with external power, and then run the sketch that's already installed without having any connection to the computer?

Thanks in advance folks.

9V battery doesn't have much capacity, like 200-300mAH, so it can run an Arduino doing simple things for a little while.
If you want to connect up motors & lots of LEDs, the current draw goes up and a bigger supply is needed, like a 7.5V 1A wallwart.

Once programmed the board will run just fine from external power without USB connection as long as the sketch does not need Serial data coming from the PC.
Many projects can be made with a simple Promini for example. Plug on an FTDI Basic for code download and debug, and when done remove the FTDI Basic and power from a battery pack or wallwart with no PC connection needed.

Here's a large example of that - I designed a Atmega2560 into DIP form factor so all 86 IO are available, and connect up an FTDI Basic for code download/debug. One connect a 7.5V supply to Vin to power the onboard 5V regulator, or power it from 5V directly via a wallwart, or power it via the USB connector.


Pins include:
86 IO pins (D0 to D85)
Vin
3.3V out
Vcc (3 pins)
7 Gnds
Reset
Aref on an inside pin if you want to play with it

Parts include:
16 MHz crystal
5V regulator fed from Vin with reverse polarity protection diode, 1000mA rated
3.3V regulator, fed from VCC, 1000mA rated (limited by VCC source, Vin or USB)
DTR enable header for those that don't want the USB port resetting the board
Power select header - VCC from USB-5V, or from 5V regulator
FTDI header - Gnd, USB-5V, Rx, Tx, DTR. 1K resistors connect Rx, Tx, to D0, D1.
Solder jumper to cut the SCK trace to the L LED
Solder jumper to cut the VCC trace to the Power LED
Reset diode to clamp any reset spikes to Vcc.

"I'm not sure about "best way" but a smartphone powerbank should work just fine, be affordable , last long and be rechargable.
Do not use as a ups as it recharges at 1a but discharges at 2.

I managed to find this excellent post on the Arduino playground that shows which external power supplies can be used.

http://playground.arduino.cc/Learning/WhatAdapter

The only issue I have now, is that the connectors on my Arduino 2.1mm power supply connector don't seem to work! Hmmmm... then when I went to check the continuity with my meter, the lead broke off from the cable connector!!!

Grrrrr

Well , there's always a usb charger and a usb A to B cable. Both are cheap.

Make sure you nicely desolder that barrel connector if it's being weird or at least check the pins on the underside.

Phoenixxl:
Well , there's always a usb charger and a usb A to B cable. Both are cheap.

Make sure you nicely desolder that barrel connector if it's being weird or at least check the pins on the underside.

Thanks sir!

Oh yeah, what a good idea!

I have checked several PSU's here with another voltage test meter I have, and they are all reporting as providing 12v +ve center pin output.

Now though - I can't find my soldering iron!!!!!!

Need to find my spare set of leads...

Grrr grrr grrr :slight_smile: