Powering an Arduino Uno board to a battery with on/off toggle
Thought it would useful to have a post that explains how to power an Arduino board to a battery with an on / off toggle. It will be then much easier for Arduino projects to be portable by using a battery for power.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
In a very simple scenario, you connect a disposable 9v battery (probably one of the (approx) 4cm x 2.5cm x 1.5cm units with two snap connectors on one end) to your Arduino, and the Arduino's built in voltage regulator takes care of reducing the voltage to a consistent 5v or 3.3v, depending on the sort of Arduino you have.
(1x) Arduino Uno
(1x) 9V Battery
(1x) 9V Battery snap connector
(1x) toggle switch
As shown in the images above, solder a toggle switch to the red lead from the 9V battery connector. Connect the black lead from the battery connector to one of the Arduino's ground pins, and connect the lead from the toggle switch to Arduino's Vin pin.