/Schematics/Power supply/Smart battery tester and charger

I started off this device to be a simple meter of internal resistance of mobile phone batteries but over time it became a bit more complex project. It is based on PIC16F88 microcontroller.

You can download the entire project files (schematics, hex file for PIC16F88) by clicking on red download button at the end of the article.

UPDATE 04-26-2011: New firmware is added to the .rar archive (the red download button). Some bugs fixed (read the CHANGELOG.txt file from the .rar archive).

UPDATE 05-15-2011: New firmware is added to the .rar archive (the red download button). Some bugs fixed (read the CHANGELOG.txt file from the .rar archive).

UPDATE 07-07-2011: New firmware is added to the .rar archive (the red download button). Some bugs fixed (read the CHANGELOG.txt file from the .rar archive).

UPDATE 01-30-2012: New firmware is added to the .rar archive (the red download button). Few changes made (read the CHANGELOG.txt file from the .rar archive).


So, now we have these capabilities: battery charging, discharging, measuring internal resistance of batteries and measuring capacity of Li Ion, Li Po, Ni Cd, Ni MH as well as regular (non rechargeable 1.5V cells). This device is fully automated so we can leave it overnight to fully discharge the battery, charge it, measure capacity and show on display.

In case of power supply loss, charger will remember how much it charged battery already and will continue after that point. This will prevent over-charging.


You can also force stop the charging process and start discharging from that point or continue charging. Charging of Li Ion and Li Po is done in two steps; first it will charge to 4.3V per cell and then continue pulsed-charge and hold the voltage on 4.25V so that the battery voltage is being measured without the presence of charge current. Discharging cells for the purpose of measuring capacity is done until 3V per cell. Capacity is measured during charging so we can know how much mAh the battery has accepted. Termination of charge in Ni MH and Ni Cd batteries is done with "delta T" method, where if the temperature rise is more than 1.5 degrees Celsius per minute it means the battery is full and charging will stop. There is also a fail-safe mechanism that will prevent overcharge when thermometer fails. In that case, the cut-off voltage is 1.6V per cell. Discharging of this kind of batteries goes until 1V per cell.


The purpose of testing 1.5V cells is to know the quality of the batteries that we purchase - we shouldn't just trust commercials that we see.

There are two PCB drawings for this device. One of them is for LM2575 which is easier to find, and a 330µH coil must be used with it.


[ Source: E. Lelic ]

Author (sent by): E. Lelic

Download counter: 9,000

Rating: (2.94, votes 2470)


Date: 14-04-2011

Lokalna verzija ove stranice: Pametni tester i punjač baterija


Bookmark and Share Comments (41)

comment [41]

Hello , i made pcb of it and assembled one unit. I get error msg " Temp. Fault 254 *C"......where did i make mistake? Someone can help me?

comment [40]

Charging Li-On battery to 4.3V is too much. Can You modify firmware chgarge Li-On to 4.2V?

comment [39]

Hmm... The hex file not include config bits,charging not working. Schematic good is?The by layout must be conected to pin1 rezistor or capacitor to ground but in chematic is not Working this anyhow?
IP: n/a

comment [38]

Hi, Can You provide source code for personal use? I would like to build the circuit, but I have difeerent PIC at hand, and probably add a new feature to measeure the voltage of all the cells separately. This way it is possible to sort out bad cells in a pack. Regards, Daniel

comment [37]

i jos jedno pitanje. moze li punjac da puni odjednom vise baterija? serijski ili paralelno spojenih?

comment [36]

Ne mogu nigde da nadjem spisak delova. Ako mozete da postavite spisak, i jos koju sliku same ploce iz nekoliko uglova, odozgo i odozdo... Hvala!

comment [35]

Pozdrav! Imam jedan problem s testerom, a to je da nakon vremena izbaci grešku "Interrupted charge" i otpornik R21 se jako grije.

comment [34]

Vjerovatno si uspjesno isprogramirao kontroler, ali ti je ukljucen Code Protect pa ne moze da uradit verifikaciju nakon programiranja. Probaj prije programiranja da iskljucis "CP" kvaku.
IP: n/a

comment [33]

Probao sam winpic800 icprog picprg na taith i willem programeru ali nece. Prepozna cip i iscita ga ali kad krene programiranje da verify error. sa drugim cipovima 16f629 i 16f84 normalno radi. Nasao sam na netu da govore o povezivanju otponika na nozice 9/10...

comment [32]

Moze bilo koji isto kao za 16F84, ja koristio JDM programmer i WIN Pic software. Mislim da moze i ICprog...

Comment page: 12345>

add comment


e-mail (will not be published)


How much is = also add letter "a" at the end of your result! Eg.: 7a

Please log-in!

You can log-in on forum link: Login page. After logging-in, return to this page and click refresh in your browser.

site friends

sponsored links