Post Reply 
Re-calibrating Prime's Battery?
12-10-2019, 07:34 PM (This post was last modified: 12-10-2019 07:36 PM by John Colvin.)
Post: #11
RE: Re-calibrating Prime's Battery?
(12-10-2019 07:30 AM)cyrille de brébisson Wrote:  Hello,

Battery charge determination is HARD...
In spec sheets, you see nice curves of battery discharges, but the reality is that they are LOTS of battery voltage fluctuations, and not all of them are due to discharge.
Battery load will affect the voltage a lot, so will temperature, so it is "normal" to see battery voltage going up and down as you use the device, especially when the device draw is non constant (as in the case for all devices due to sleep modes)...

Furthermore, the battery discharge is a very flat curve, and CPU ADC are not that good (but, hey, they are cheap, well they have no costs as they are build in the CPU!)... This adds a lot more errors...

I do not know how battery reading is done on the G1, but on the G2, I take 10 ADC readings per second. They are converted in voltages and stored in a ring buffer...
I then remove the min and max readings from these and take the average of the rest. This is my battery reading for the current 100ms... This is then divided into 5 groups, from 100% to Critical battery level and reported upward...
The 'dividing values' for this groups was created using a small program that would display the battery voltage reading every 30 minutes and letting the calc run at full bore (max power use) until it died while filming it. I did that 10 times in a row (if I remember well). This would give me the battery life expectancy, and the ADC readings over time. I picked the ADC reading at 25%, 50%, 75% and 20minutes of the total run time as my jalons.

Furthermore, at a higher level, an anti jiter system ensures that a move from one value to the next one can not occur at less than a given interval. This avoids rapid oscilation from 75% to 100% and the like...

I do not know how computers and other devices report "good" battery level, I would assume that they have a specialized chip which is dedicated to continuously measuring the energy extracted from the battery (not just the voltage), and doing a subtraction with what it "thinks" or "knows" was injected in the battery at charge time... This is of course something that I can not do with just an ADC, especially when said ADC will only work when the device is turned on...
Hence the limited battery level reporting of the Primes (and indeed all the other calcs like the 12C, 10BII+...)

Cyrille

I worked on a Coloumb counter design for a cell phone chip when I was an
engineer at Cadence. This circuit measures the charge and discharge currents which then control the rate of count of an up/down counter circuit. This is the
best way of monitoring the true battery charge state that I know of. I suspect that most laptops and cell phones use this method.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Re-calibrating Prime's Battery? - John Colvin - 12-10-2019 07:34 PM



User(s) browsing this thread: 1 Guest(s)