Detection of the charging state

Posted on
  • I am using powermanagers auto calibration for the battery level. Seems to work well for the most part, but sometimes it sets offsets a little high (e.g. seemingly to early). Yesterday I had started the day on a very low charge. Bangle ran empty over night and I could only charge for about 20 minutes before leaving the house. So pretty much started the day on a close to empty battery and it was shown as such (low dual digits battery, definitely under 20%). Without having a charger with me that somehow changed to 89% somewhere around noon. It was a wrong offset for the voltage/percentage, probably set by powermanager, after resetting that offset it went back to showing 12%.

    So the question is, could somehow leaking currents or something like that have triggered the charging event without having a charger present? Has anybody seen something like this?

    I have tried to get incorrect values in the charging event by wiggling the charger around, but as far as I can see that works just perfectly. There do not seems to be events lost or doubled, every event changes state from the previous event. The state changes in powermanager seems to match up fine.

    powermanager currently ignores the charging state on boot but in my testing that does make no difference in the behaviour. Maybe setting a timeout for recalibrating instead of using the charging=false-event would work better, but I don't know how to check it actually works better than before. Maybe someone else has an idea for testing?

  • So the question is, could somehow leaking currents or something like that have triggered the charging event without having a charger present? Has anybody seen something like this?

    I guess it's possible, but unlikely - but if that were the case surely if powermanager recalibrates it should only do so after the battery has been on charge for at least an hour or so?

  • Yes, it only calibrates after 3 hours if it has seen a charging start and a charging stop event. Deliberately so to prevent setting the calibration too often. Maybe just starting a 3 hour timeout on charging start (event or even boot) would be better?
    As for it being unlikely, I have seen it exactly once where I am sure that this has happened. The other times have been values much closer to correct ones. Those could have been caused by charging in cold environment or differing charger voltages or something like that.

  • Yes, it only calibrates after 3 hours if it has seen a charging start and a charging stop event.

    I'd say that was fine as-is?

    But if that happens, I'd say the changes of the charge signal coming on when you're wearing the watch for 3 hours are basically zero, so it must be something else happening?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Detection of the charging state

Posted by Avatar for halemmerich @halemmerich

Actions