Bugzilla – Bug 15265
Battery discharges while on external power
Last modified: 2010-02-16 13:11:00 UTC
If radio with battery is left on wall power for an extended period of time the battery slowly discharges and is not available when the unit is removed from external power.
The battery voltage monitoring circuit draws about 4.8mA from the battery as long as the system is running. This current discharges the battery by about 5.7% every 24 hours and the battery is expected to be depleted in about 15 days. To fix this bug, the charger (code in the msp430) must enable the charger once in a while to compensate for the discharge in the voltage monitoring circuit and also for the self discharge of the battery pack.
So for now, I assume the user workaround is to occasionally pull the power? If so, how often and for how long?
During the Thursday meeting the question was brought up about what happens if the battery runs really flat because of this bug? Is the charger circuit able to recharge the battery when the power supply is reapplied? Is a really flat battery still recognized by the charging circuit.
The discharge current through the voltage monitoring circuit is very small (~5mA) and that should not impact to severely the state of health of the battery. That being said, Rico is measuring the capacity of a battery that has been left in a baby; stay tuned...
Update hours
Notes on proposed changes and open issues: Changes: After completing charging, start a timer for when we should initiate a top-up charge cycle. Currently set at one day. Start a charge cycle when this time goes off so long as batter voltage below 15.5V. Define discharge rates for power-off modes and power-on on AC. Currently these are 1mAh/4000s & 1mAh/700s respectively. Use these rates to decrement state-of-charge as appropriate. Add a check for battery being removed while running on battery; probably redundant but there could be a race condition. Issues: State diagram says that charge threshold is 90% of capacity but code uses 1900 (mAh), which is 95%. Once the battery voltage drops below BATT_TOO_LOW_FALLING_WARNING we send a CHARGER_BATTERY_FAILING i2c event every second. Surely we only need to send it once. In charger.c:charger_step(), the comment says that we are accounting for a 350mV drop across some diode but the code contains the value 450. In power.c: the code to detect removing a battery while on AC is commented out.
== Auto-comment from SVN commit #6652 to the player repo by ayoung == == https://svn.slimdevices.com/player?view=revision&revision=6652 == bug 15265: Battery discharges while on external power After completing charging, start a timer for when we should initiate a top-up charge cycle. Currently set at 48 hours. Start a charge cycle when this timer goes off so long as battery voltage is below 15.5V. Stop charging when told to by mx25. Define discharge rates for power-off modes and power-on on AC. These are based on measured battery drain in the various off modes (60uA, 320uA, 5mA) + a rate of 6% self-discharge in the first two days and 3%/month threreafter. Use these rates to decrement state-of-charge as appropriate. Add a check for battery being removed while running on battery; probably redundant but there could be a race condition. Change charge threshold to 90% of capacity to correspond with state diagram and advice from battery manufacturer (was 95%). Update state diagram.
== Auto-comment from SVN commit #6653 to the player repo by ayoung == == https://svn.slimdevices.com/player?view=revision&revision=6653 == bug 15265: Battery discharges while on external power Missed version file
== Auto-comment from SVN commit #6657 to the player repo by ayoung == == https://svn.slimdevices.com/player?view=revision&revision=6657 == bug 15265: Battery discharges while on external power Removed battery top-up voltage threshold test as it was useless. Removed timer-based top-up conditions after advice from GP Batteries; now rely only on state-of-charge calculations. Ensure all counters, including intermediate calculations, fit within relevant integer sizes (previous timer-based top-up was faulty because of such problems). Fix typo in power-off charge-termination code. Add hysteresis temperature check to start-charging condition.
== Auto-comment from SVN commit #6658 to the player repo by ayoung == == https://svn.slimdevices.com/player?view=revision&revision=6658 == bug 15265: Battery discharges while on external power Update state-machine diagram.
Additional worked hours.
More hours
== Auto-comment from SVN commit #8368 to the jive repo by ayoung == == https://svn.slimdevices.com/jive?view=revision&revision=8368 == bug 15265: Battery discharges while on external power Charging algorithm modified to take into account discharge while running on AC, self-discharge and discharge when powered-off.
== Auto-comment from SVN commit #6660 to the player repo by ayoung == == https://svn.slimdevices.com/player?view=revision&revision=6660 == bug 15265: Update README with latest installation instructions.
extensive testing shows that this has been corrected