Introduction: Battery Tester and Charge Monitor
Hello guys
For long time I was harvesting lithium ion batteries for powering my projects BUT…
Sometimes I was getting bad batteries that look fine …
So… I’ve made battery tester device that can test the battery and tells you the output voltage and current.
Also identify the battery type and measure the real capacity .
Step 1: The Schematic
the schematic is little complicated because we create a standalone arduino board
so here it is and it should made on 2 layers pcb
Step 2: Parts
parts list:
Atmega328p tqfp https://goo.gl/E8QnKA
16Mhz smd crystal https://goo.gl/po1bvp
SMD push button https://goo.gl/po1bvp
74Hc595 smd https://goo.gl/po1bvp
22Pf 1206 caps https://goo.gl/po1bvp
TIP31A Transistor https://goo.gl/po1bvp
2P female headers https://goo.gl/po1bvp
10Kohm 1210 RES https://goo.gl/po1bvp
100 Kohm 1210 RES https://goo.gl/po1bvp
Diode 1206 https://goo.gl/po1bvp
CJ78M05 https://goo.gl/po1bvp
4P FEMALE HEADER https://goo.gl/po1bvp
USB SOCKET https://goo.gl/po1bvp
100nF CAPS SMD https://goo.gl/po1bvp
PC817 OPTOCOUPLER https://goo.gl/po1bvp
0.15R 5W RES https://goo.gl/po1bvp
2P TERMINAL BLOCKS https://goo.gl/po1bvp
ADAPTER JACK https://goo.gl/po1bvp
Step 3: The Pcb
for this people who used to make 2 layers pcb it will be easy
or you can ask some manufacturer to make it for you
https://www.pcbway.com/project/shareproject/Battery_capacity_tester_discharge_charge_monitor.html
Step 4: Burn Bootloader and Upload the Code
After soldering all components
we have one more step before start working with our project
The microcontroller here is blank and it needs a firmware
So as you know! our project is based on arduino
First thing we need arduino board and jumper wires
Connect pin number10 from arduino to reset pin on the pcb
By connecting the arduino you can now Burn the bootloader on your board
Let’s ee how?!
Open your IDE and
From examples choose Arduino ISP
Then upload the code normally to your arduino board
From Tools Menu choose Programmer Arduino as ISP
And again from tools choose burn bootloader and make sure there is no errors after uploading
Now your microcontroller is ready for uploading your arduino code
wait …!! don’t take off your jumper wires
You still need to upload your code to the microcontroller
Open the battery tester sketch
and from Sketch menu choose upload using programmer
Showing the pcb
Now you can takeoff the jumper wires, and start using this project
Step 5: Source Code
the code is pen source and anyone want's to improve it is welcomed
here
Attachments
Step 6: Videos
battery tester part 1 and 2

Participated in the
Arduino Contest 2017
3 Comments
Question 3 years ago on Step 6
Is it possible to design for any capacities of batteries?
Question 3 years ago on Step 6
Hi, this is very nice project.. Can I get gerber files of this battery tester
Question 4 years ago
Hello, that sounds like a really nice project !
(may be too complex for a lot people however,mixing it with the design of an arduino from scratch may not help, it does not help me at least).
I am not so good at coding, but really interested in both monitoring and telling which kind of battery is being used. I did not understand my glance at your program, put in words rather that in code, how do you test check if a battery is of one kind or another ?
And anbother question, does your sensor work if the battery has just been used or charged a bit ? Do you have any accurate tension measure in spite of that ?
I ask because I just realize as for car batteries, ie Acid lead starter batteries, the tension is decreasing a lot in the minutes and even hours following the charge. My goal is to make a "coupleur-séparateur" no idea as for translation in English, the idea is a device that puts both a van starter battery and a living-off-the-grid-in-a-van battery in parralel just when the motor battery is full or almost, in order to recharge the other battery, and cuts their link when the car alternator is off. (With a relay under ATtiny or arduino control)
I want to monitor the achievement of charge of the accessory battery, to prevent it from overcharging. But i don'tknow how to ensure the measure is accurate while it is being charged.
Any help in that scope would be very helpful.
And congrats once again.