Instructables
Picture of Arduino Uno R3 Battery Tester

This simple project is intended to help you in answering the lifelong question "Does this battery have any juice left?". Although popularity of single cell batteries (such as AA, AAA, C and D cell) is diminishing, there are still many small devices like TV remotes, flashlights, and other small portable electronics that run on these forms of power.

Step 1: Hardware required

In order to make a battery tester, there are a few things you will need:

-Three 560 ohm resistors
-One 2.2k ohm resistor
-One green LED
-One yellow LED
-One red LED
-a breadboard
-various jumpers (connecting wires)
-One Arduino Uno R3 Microcontroller with usb cable

This project will cost somewhere in the $30-$40 range, however the most expensive part is the Microcontoller (~$30), which is of course re-programmable so this cost can be displaced over future projects.

These items can be found on easily on Amazon.com or Sparkfun.com

Step 2: The Wiring

Picture of The Wiring

A little wiring is required to get this circuit operating, thankfully the Arduino is supplying the power so there is no need for an external power supply, that being said be careful with other projects as the Arduino can't source a large amount of current. The Schematic is also slightly open ended to allow the user to connect the probing wires or a wiring harness to various battery sizes. Attached is an electrical schematic drawn up for the project, courtesy of John Boxall at the Arduino Workshop.

Step 3: The Code

Picture of The Code

The attached photo contains the code you will upload to the Arduino. To upload this code simply download the Arduino sketch IDE from Arduino's website (http://arduino.cc/en/Main/Software).

If you want to challenge yourself, I suggest taking the logic from the sketch language and making a C program. To do that you will need Atmel Studio 6 (free and on Atmel's site) and a bootloader (attached, courtesy of Purdue ECET), you will also need to note that the Arduino Uno R3 uses an ATMega328p microprocessor.

 
Remove these adsRemove these ads by Signing Up
francisroan6 months ago
Just be careful not to use a battery with high voltage or high amps

High amps doesn't hurt Arduino, because of the resistor, and high internal impedance of ADC module, so these "high amps" won't go out the battery.
But high voltage is some kind of problem. For that I'd use zener diode, just like in my comment below ;)

domints6 months ago

I would add one zener diode after the A0 resistor just to be sure, that if some genius connects 12V battery (car or little from flashlight) it won't burn your arduino ;)
But despite this it's simple and great project ;) Hope there will be more like this on i'bles.

Excellent idea!

carlos66ba6 months ago
This is a nice project. If you want to make it even less expensive, this project can be made with a single chip (plus rwsistors and leds) like the attiny85, which costs under $1 (you will need some way of programming it, though)

Arduino can be easily used for programming ;) But if someone doesn't have one, STK200 is veery cheap option, and USBasp is quite cheaper than Arduino, and can be widely used ;)