## Introduction: Arduino AA Battery Tester

If you live in a family like mine, there is always a problem finding fresh batteries. Sure, you may have a battery bin, but how do you know which ones are charged and which are not. Well this project will help you find your good batteries! The project is super simple, even a beginner could build this. It will take you about 5-10 minutes to build this project.

======================================WARNING!!!======================================

Only test batteries with a voltage of 5 volts or lower. Any batteries higher will damage your Arduino. It's best to stick with AA batteries or AAA batteries. Other batteries under 5 volts will still work, but will provide inaccurate results.

## Supplies

any Arduino

AA/AAA battery holder with wires or 2 jumper wires.

## Step 1: The Circuit

Take your battery holder and plug the ground or black wire to any ground on the Arduino. Take the positive or red wire of the battery holder and plug it into analog pin 5. If you do not have a battery holder, take 2 jumper wires, plug one into analog pin 5, and the other wire to ground. leave the other ends of the wire unplugged. And that is the simple circuit!

## Step 2: The Code

The code is very simple. Just copy it from below and paste it into the Arduino IDE. Then, upload it and open the serial monitor. In the pricture of the code, i added some code to use with a screen. When there is no battery connected, you will get a bunch of random numbers like 0.45 or something. When you do have a battery connected, you will get other numbers. The serial monitor outputs the batteries voltage. 1.49 volts or more = Great battery. 1.42 - 1.48 volts = okay battery. 1.41 volts or less = dead battery.

int batteryPin = A0;

void setup(){

Serial.begin(9600);

}

void loop(){