Seven Segments


Homepage
What is S2
Contacts
Propose a project

Battery Chargers >>
Low cost charger »
Basic charger »
Advanced Charger »
Advanced Charger HV »
Universal Charger »
DC DC converter »
Basic equalizer »
LiPo Balancer
Model Trains >>
Miscellaneous >>
Tech Beans >>

Site Map
Useful links
Site stats
Visits753130
Users502
Categories4
Projects21
Articles66
Files148


© Seven-Segments



All website content
unless otherwise noted
is licensed under a
Creative Commons
License






LiPo balancer firmware
Description of the LiPo balancer firmware


This section describe in details the firmware for the PIC 12F683. This software is developed in Mikropascal (www.mikroe.com) and this tool can be downloaded for free from this website. The free edition of the software has the only limitation that the produced code must be less than 2K word. The LiPo balancer software is under this threshold and for this can be freely changed and recompiled from everyone.


Voltage sampling, power shunt and LED drive

The main loop for the LiPo balancer firmware has a duration of 100 msec. For this the shunt current is calculated (starting from the battery voltage) 10 times per second. The first part of the loop (first 25 msec time slot) samples (and averages) the battery voltage giving an accurate (millivolt) reading. This value is compared with two threshold: the first one (point of start) is externally trimmed to 4.200V by the user, the second is 40 mV above the first one and sets the alarm point. Under the start threshold the balancer is in idle and do not shunt any current (only the PIC supply and few mA for the voltage partitors), between the two thresholds the shunt is active, and over the alarm threshold the system is shut down and the alarm signal is issued (stop of the charge). The active interval is between 4.200V and 4.250V: these 50mV causes a linear variation in the shunt current from 0 to the maximum value (the maximum value is set by the MOSFET and R7 resistor). The LED stay OFF when the system is in idle state,it will lamp in the active interval from a duty of 1/16 (start of shunt) to 15/16 (maximum shunt) and will stay continuously ON in alarm.


Temperature sampling

The temperature is sampled with a period of 1 minute for a better reading accuracy. The averaged value is compared with a threshold value of 120-130 celsius degrees on the transistor. If the temperature exceed this point the alarm signal is issued and the LiPo balancer waits for a new power on. If the user want to disable the temperature control it is sufficient to do not mount the transistor 2N2222 on the PCB.


ALARM function

This function is activated when the cell voltage is out of control or when the LiPo balancer is overheated. From this state (the optocoupler transistor is saturated) the program cannot exit and must be restared disconnecting the battery pack.




Comments ::


© 2004 Seven-Segments
All content on this website (including text, photographs, resource files, and any other original works), unless otherwise noted, is licensed under a Creative Commons License

LOGIN


PARTNER SITES
Seven Segments Site Map