Introduction: Arduino Battery Tester

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...

Step 1: Tools and Components

All the components you require for this instructable are -

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

Step 2: Circuit

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).

Step 3: Code

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.

Comments

author
ethan2126 made it! (author)2016-03-10

yeah no code?

author
mehmetemincatal made it! (author)2015-11-02

code???

author
purgoufr made it! (author)2015-09-16

Where is arduino code?

author
Bigfoot0034 made it! (author)2015-09-09

Nice !

One suggestion though : this will only measure the open circuit voltage of your battery which doesn't really mean anything...

It would be a much more accurate measurement if you simply add a 15 Ohm resistor in parallel with your battery. This way it would draw about 100mA from your battery and give you a voltage under load which is what gives you an idea of the remaining capacity.

Of course 100mA is completely arbitrary and you might want to adjust this regarding what you intend to do with your battery :)

author
bill.harvey.100 made it! (author)2015-09-01

Nice idea. But where is the code?? Did I miss something?

About This Instructable

5,407views

90favorites

License:

Bio: Hi, I just launched an Indigogo campaign support my projects by backing it. https://www.indiegogo.com/projects/tinker-usb-a-wifi-based-badusb#/
More by ThisIsSteve:Linkit One Text to SpeechLinkit One Kitchen TimerIntel Edison Talks to Linkit One
Add instructable to: