Arduino Battery Tester

by ThisIsSteve in Circuits > Arduino

6995 Views, 92 Favorites, 0 Comments

Arduino Battery Tester

IMG_20150901_041504.jpg
IMG_20150901_041339.jpg
IMG_20150901_041247.jpg

In this tutorial I'm going to show you how to test a battery if new or old using an Arduino, this will also demonstrate analog read function in the Arduino. This works for only cells whose voltage is below 5v if you are using a UNO or 3.3V if you are using a mini. For higher voltages you will need to use a voltage divider which I will show you in the next instructable.

So lets get started...

Tools and Components

IMG_20150901_041552.jpg

All the components you require for this instructable are -

  • Arduino UNO
  • 3 Different colored LEDs
  • Jumper wires
  • Breadboard
  • 2.2k resistor

Circuit

Screenshot from 2015-09-01 04:30:44.png

Follow the circuit above it is quite simple and can be easily assembled on a breadboard. Also add a suitable resistor for the LEDs (I did not do that because I'm using 5V tolerant LEDs).

Code

IMG_20150901_041336.jpg

Copy the below code and paste the below code in the Arduino IDE and then select a suitable com port and upload the code to the Arduino. You should now see the red LED light up, connect a new battery and you should see the white LED light up.