How is This Possible?

I've been staying in bed for the last couple days due to being sick, and it's possible I'm going a bit stir-crazy. I might also be suffering fever hallucinations. However, I don't help but think there is something wrong with this:

That's a screenshot of my phone's battery monitor. It shows the phone's battery status since I turned it on several hours ago after it had been dead overnight since I forgot to put it on a charger. It hasn't been plugged into anything since I turned it on. It doesn't have any sort of remote charger.

Am I hallucinating, is there some sort of bug in the programming, or did my phone battery's charge really go up while in use?


  1. Battery charge is a calculated number based on the current flow through a resistor between the battery and the load. There are complicated formulae for approximating the 'charge remaining' which look to have been poorly implemented in your device.

  2. For giggles I showed this to one of the engineers at work, and he concurs, it is a software issue.

    I'll pick some numbers here that are based around one of our projects, and also round them to be simple to work with.

    Assume that your battery is 4000mV at full, and 3900mV at functionally empty. (batteries have a non-linear discharge, where they hit a knee over at then die rapidly - different batteries have a different discharge curve) 0mV is effectively a destroyed battery - and a protection mechanism should be shutting down the phone to prevent it from discharging the battery too much. You can google 'lithium battery discharge curve' but here is an example of what I am talking about.

    The graph in your phone is presumably reading from the system API, which reports the battery charge, and converting the 3900 - 4000mV into a 0-100% reading according to some pre-determined formula.

    What we suspect has happened is that battery has continued to discharge _below_ 3900mV and the chip is reporting that voltage. If the battery is at 3835mV for example, that would equate to being -65% charged - but due to a sign error in the software this is displayed as positive.

    This could be something like doing a modulo of the difference between the battery voltage and 3900 for example, or a simple cast from uint to int which would then display as a positive.

    The reality is your battery is probably being damaged by 'going below 0'.

    It would be interesting to see the graph of then putting it on charge and observe what the graph does. My theory is that it would gradually 'charge' down to 0 (looking like a discharge) and then charge back up again.

    Also the battery protection circuit doesn't seem to be working as it should.

  3. Thanks Peter Green. What's interesting about this to me is I've had this phone for a couple years without experiencing this before. If it's happened, I've never noticed it. This one time is the only time. I'll try to keep a watch on my phone to see if it crops up again.

    By the way, I'm sorry about being inactive/slow with my responses this last week. I was blindsided by the flu or something like it. I'm getting back to normal (or at least, whatever passes for normal for me). I think you'll be interested in the next post I'm uploading. It should be online in the next half hour or so.

Leave a Reply

Your email address will not be published. Required fields are marked *