Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #487637 > unrolled thread

Coloumb counting

Started bybitrex <bitrex@de.lete.earthlink.net>
First post2017-12-08 07:38 -0500
Last post2017-12-08 11:47 -0500
Articles 9 — 5 participants

Back to article view | Back to sci.electronics.design


Contents

  Coloumb counting bitrex <bitrex@de.lete.earthlink.net> - 2017-12-08 07:38 -0500
    Re: Coloumb counting "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> - 2017-12-08 12:57 +0000
      Re: Coloumb counting bitrex <bitrex@de.lete.earthlink.net> - 2017-12-08 09:29 -0500
        Re: Coloumb counting "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> - 2017-12-08 14:52 +0000
        Re: Coloumb counting "Tim Williams" <tmoranwms@gmail.com> - 2017-12-08 09:39 -0600
          Re: Coloumb counting bill.sloman@ieee.org - 2017-12-08 16:29 -0800
          Re: Coloumb counting bitrex <bitrex@de.lete.earthlink.net> - 2017-12-08 23:07 -0500
    Re: Coloumb counting George Herold <gherold@teachspin.com> - 2017-12-08 07:34 -0800
      Re: Coloumb counting bitrex <bitrex@de.lete.earthlink.net> - 2017-12-08 11:47 -0500

#487637 — Coloumb counting

Frombitrex <bitrex@de.lete.earthlink.net>
Date2017-12-08 07:38 -0500
SubjectColoumb counting
Message-ID<AJvWB.14072$tN.3957@fx37.iad>
Anyone implemented a coloumb counting algorithm on a uP before for 
estimating LiPo battery SOC? I'm powering an 8 bit AVR and a few 
external widgets off a small 3.7 volt single-cell LiPo battery, about 
the size of a stick of gum, and would like to give it a rough estimate 
of the battery's SOC without using more hardware. I have at least one 10 
bit ADC channel available for sensing.

For this application it doesn't have to super-accurate; could get away 
with putting the SOC into say 5 "bins" with nouns like "Great, OK, fair, 
weak, bad."

[toc] | [next] | [standalone]


#487638

From"Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de>
Date2017-12-08 12:57 +0000
Message-ID<f8vgi9F3bssU3@mid.individual.net>
In reply to#487637
bitrex <bitrex@de.lete.earthlink.net> wrote:
>Anyone implemented a coloumb counting algorithm on a uP before for 
>estimating LiPo battery SOC? I'm powering an 8 bit AVR and a few 
>external widgets off a small 3.7 volt single-cell LiPo battery, about 
>the size of a stick of gum, and would like to give it a rough estimate 
>of the battery's SOC without using more hardware. I have at least one 10 
>bit ADC channel available for sensing.

>For this application it doesn't have to super-accurate; could get away 
>with putting the SOC into say 5 "bins" with nouns like "Great, OK, fair, 
>weak, bad."

Perhaps it is sufficient to merely measure the battery voltage. With LiPo the
SOC is rather in relation with the cell voltage.

-- 
Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de

[toc] | [prev] | [next] | [standalone]


#487643

Frombitrex <bitrex@de.lete.earthlink.net>
Date2017-12-08 09:29 -0500
Message-ID<llxWB.178435$7V7.160031@fx05.iad>
In reply to#487638
On 12/08/2017 07:57 AM, Peter Heitzer wrote:
> bitrex <bitrex@de.lete.earthlink.net> wrote:
>> Anyone implemented a coloumb counting algorithm on a uP before for
>> estimating LiPo battery SOC? I'm powering an 8 bit AVR and a few
>> external widgets off a small 3.7 volt single-cell LiPo battery, about
>> the size of a stick of gum, and would like to give it a rough estimate
>> of the battery's SOC without using more hardware. I have at least one 10
>> bit ADC channel available for sensing.
> 
>> For this application it doesn't have to super-accurate; could get away
>> with putting the SOC into say 5 "bins" with nouns like "Great, OK, fair,
>> weak, bad."
> 
> Perhaps it is sufficient to merely measure the battery voltage. With LiPo the
> SOC is rather in relation with the cell voltage.
> 

That'd be nice...is that characterization something that's fairly 
repeatable between batteries of the same model/type?

I'm running the uP right off the battery and later AVRs can route their 
own Vdd to an ADC channel without using a pin.

[toc] | [prev] | [next] | [standalone]


#487646

From"Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de>
Date2017-12-08 14:52 +0000
Message-ID<f8vn93F58a5U1@mid.individual.net>
In reply to#487643
bitrex <bitrex@de.lete.earthlink.net> wrote:
>On 12/08/2017 07:57 AM, Peter Heitzer wrote:
>> bitrex <bitrex@de.lete.earthlink.net> wrote:
>>> Anyone implemented a coloumb counting algorithm on a uP before for
>>> estimating LiPo battery SOC? I'm powering an 8 bit AVR and a few
>>> external widgets off a small 3.7 volt single-cell LiPo battery, about
>>> the size of a stick of gum, and would like to give it a rough estimate
>>> of the battery's SOC without using more hardware. I have at least one 10
>>> bit ADC channel available for sensing.
>> 
>>> For this application it doesn't have to super-accurate; could get away
>>> with putting the SOC into say 5 "bins" with nouns like "Great, OK, fair,
>>> weak, bad."
>> 
>> Perhaps it is sufficient to merely measure the battery voltage. With LiPo the
>> SOC is rather in relation with the cell voltage.
>> 

>That'd be nice...is that characterization something that's fairly 
>repeatable between batteries of the same model/type?

http://batteryuniversity.com/learn/article/how_to_measure_state_of_charge

Gives some hints. At least the levels "Great" and "weak" should be detected with ease.
More accurate would be to measure the current flowing out of the cell via a small shunt.
With 10 bit resulation of the ADC a voltage drop of about 100 mV should be enough.
A simple timer ISR accumultating the values every second already gives a nice coulomb
counter. 

-- 
Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de

[toc] | [prev] | [next] | [standalone]


#487653

From"Tim Williams" <tmoranwms@gmail.com>
Date2017-12-08 09:39 -0600
Message-ID<p0ebo7$qfu$1@dont-email.me>
In reply to#487643
"bitrex" <bitrex@de.lete.earthlink.net> wrote in message 
news:llxWB.178435$7V7.160031@fx05.iad...
> That'd be nice...is that characterization something that's fairly 
> repeatable between batteries of the same model/type?

Characteristic of the chemistry, yes.

Beware that it's a logarithmic relationship, and mind ESR, and ionic 
diffusion (manifests as a time dependent resistance/inductance).

I suspect a lot of battery monitors use a linear measure, hence why 
everything seems to be going fine, five bars, four barsOHSHIT ONE BAR YOU 
BETTER FIND A CHARGER NOW...

Easy enough to do that conversion in software, assuming you get enough bits 
to tell the difference between 4 and 5 bars, say.

This is characteristic of batteries in general, but the exp slope, steady 
state voltages, and dynamic response (ESR + diffusion) vary with chemistry 
(oh, and temperature, natch).  Lithium ion cells at least are quite good on 
diffusion (not like NiMH or alkaline).

Tim

-- 
Seven Transistor Labs, LLC
Electrical Engineering Consultation and Contract Design
Website: https://www.seventransistorlabs.com/ 

[toc] | [prev] | [next] | [standalone]


#487727

Frombill.sloman@ieee.org
Date2017-12-08 16:29 -0800
Message-ID<aa5db940-b7c0-4c5d-a546-930e42444125@googlegroups.com>
In reply to#487653
On Saturday, December 9, 2017 at 2:39:58 AM UTC+11, Tim Williams wrote:
> "bitrex" <bitrex@de.lete.earthlink.net> wrote in message 
> news:llxWB.178435$7V7.160031@fx05.iad...
> > That'd be nice...is that characterization something that's fairly 
> > repeatable between batteries of the same model/type?
> 
> Characteristic of the chemistry, yes.
> 
> Beware that it's a logarithmic relationship, and mind ESR, and ionic 
> diffusion (manifests as a time dependent resistance/inductance).

Beware that the voltage also depends on the temperature inside the battery, which can go up if you draw a lot of current out of it. Sticking a thermistor close to the battery, and monitoring it's resistance might be a complication too far - particularly when you start having to pay for an "interchangeable" thermistor (or for the single-point calibration of a cheaper part).

The relevant equation is the Nernst Equation

http://pvcdrom.pveducation.org/BATTERY/nernst.htm

Finding the numbers for an LiPo battery is beyond me - I assume that LiPo means lithium polymer, but the sort of people who write about the Nernst Equation are pickier about their description of the battery chemistry.

-- 
Bill Sloman, Sydney

[toc] | [prev] | [next] | [standalone]


#487749

Frombitrex <bitrex@de.lete.earthlink.net>
Date2017-12-08 23:07 -0500
Message-ID<NjJWB.39521$T44.14375@fx20.iad>
In reply to#487653
On 12/08/2017 10:39 AM, Tim Williams wrote:
> "bitrex" <bitrex@de.lete.earthlink.net> wrote in message 
> news:llxWB.178435$7V7.160031@fx05.iad...
>> That'd be nice...is that characterization something that's fairly 
>> repeatable between batteries of the same model/type?
> 
> Characteristic of the chemistry, yes.
> 
> Beware that it's a logarithmic relationship, and mind ESR, and ionic 
> diffusion (manifests as a time dependent resistance/inductance).
> 
> I suspect a lot of battery monitors use a linear measure, hence why 
> everything seems to be going fine, five bars, four barsOHSHIT ONE BAR 
> YOU BETTER FIND A CHARGER NOW...
> 
> Easy enough to do that conversion in software, assuming you get enough 
> bits to tell the difference between 4 and 5 bars, say.
> 
> This is characteristic of batteries in general, but the exp slope, 
> steady state voltages, and dynamic response (ESR + diffusion) vary with 
> chemistry (oh, and temperature, natch).  Lithium ion cells at least are 
> quite good on diffusion (not like NiMH or alkaline).
> 
> Tim
> 

A Google search brings up a lot of academic papers about using fuzzy 
logic/neural networks to estimate SOC from inaccurate/corrupted 
observables, unfortunately most seem to be behind paywalls. :-(

[toc] | [prev] | [next] | [standalone]


#487652

FromGeorge Herold <gherold@teachspin.com>
Date2017-12-08 07:34 -0800
Message-ID<450930a3-e70e-43ce-9679-7348a1551399@googlegroups.com>
In reply to#487637
On Friday, December 8, 2017 at 7:39:06 AM UTC-5, bitrex wrote:
> Anyone implemented a coloumb counting algorithm on a uP before for 
> estimating LiPo battery SOC? I'm powering an 8 bit AVR and a few 
> external widgets off a small 3.7 volt single-cell LiPo battery, about 
> the size of a stick of gum, and would like to give it a rough estimate 
> of the battery's SOC without using more hardware. I have at least one 10 
> bit ADC channel available for sensing.
> 
> For this application it doesn't have to super-accurate; could get away 
> with putting the SOC into say 5 "bins" with nouns like "Great, OK, fair, 
> weak, bad."

How are you going to know the SOC when you turn it on?  

George H. 

[toc] | [prev] | [next] | [standalone]


#487665

Frombitrex <bitrex@de.lete.earthlink.net>
Date2017-12-08 11:47 -0500
Message-ID<amzWB.72569$Ag6.9484@fx40.iad>
In reply to#487652
On 12/08/2017 10:34 AM, George Herold wrote:
> On Friday, December 8, 2017 at 7:39:06 AM UTC-5, bitrex wrote:
>> Anyone implemented a coloumb counting algorithm on a uP before for
>> estimating LiPo battery SOC? I'm powering an 8 bit AVR and a few
>> external widgets off a small 3.7 volt single-cell LiPo battery, about
>> the size of a stick of gum, and would like to give it a rough estimate
>> of the battery's SOC without using more hardware. I have at least one 10
>> bit ADC channel available for sensing.
>>
>> For this application it doesn't have to super-accurate; could get away
>> with putting the SOC into say 5 "bins" with nouns like "Great, OK, fair,
>> weak, bad."
> 
> How are you going to know the SOC when you turn it on?
> 
> George H.
> 

In normal operation ideally the uP won't ever be completely powered 
down; when SOC hits some threshold it will shut down the peripherals 
(which draw the bulk of the current) and the uP will be active but in 
deep sleep most of the time and check the battery status every once in a 
while. Once the battery charges up above some threshold it will come 
back up and measure SOC from that point.

There'll be insufficient charge to run the peripherals well before 
there's insufficient charge to keep a single 8 bit uP semi-active so I 
guess I only need to know SOC from that point.

In some situation where the battery is totally dead the charge 
controller will just start charging on its own and can send a PWRGOOD to 
the uP once its output is up and the uP can figure out what's going on 
at that point.

I don't think I'll need a load-switching arrangement; this charge 
controller can handle having battery voltage applied to its output while 
the input source is disconnected, the uP can operate fine down to 2.7 
volts and the loads around the same, and the loads draw negligible 
current from the rail without being specifically enabled

[toc] | [prev] | [standalone]


Back to top | Article view | sci.electronics.design


csiph-web