LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best method of computing Amp hours in real time?

I am taking a current measurement from a DMM, and trying to compute the Amp-hour once every few seconds. Amp-hour (per Minute)= current*(1/60). The method I'm presently using is not very accurate. Any suggestions will be appreciated. Thank you
0 Kudos
Message 1 of 4
(3,106 Views)
> I am taking a current measurement from a DMM, and
> trying to compute the Amp-hour once every few
> seconds. The method I'm presently using is not
> very accurate.

Could you please give us a hint? What method are you
presently using and why is it not very accurate?

That is, does your current vary so much that taking a
reading every few seconds gives you very poor
sampling? If so, can you increase your sample rate?

Or is it that after you have added an hour's worth of
samples (~ 1000 samples) each new sample is only
1/1000 of the total and you are losing bits of
resolution?

Les.Hammer@CompleteTest.com
0 Kudos
Message 2 of 4
(3,106 Views)
Right now, I am starting by measuring the number of ticks in one second. Then next frame I start sampling the current, but for developmental purposes, I just inserted a constant (ie: 100), to simulate a steady current.

I then multiply 3600 (number of seconds in one hour), by the number of ticks in one second. Then divide that by the current and the result will be the number of ticks to increment one amp-hour. After that point is reached, the sequence is started over again.

I think I'm running into a problem with the resolution after the multiplication, because the numbers are just so large.
0 Kudos
Message 3 of 4
(3,106 Views)
> Right now, I am starting by measuring the number of ticks in one second.

What's a tick? Can you be sure that the number of ticks per second is a constant?

> ... the result will be the number of ticks to increment one amp-hour.

Hmmm. So if the current is low you could be waiting a long time,
with lots of change during that time? Also, how many ticks does it take to
make a measurement? Do you add these ticks too?

> I think I'm running into a problem with the resolution after the
> multiplication, because the numbers are just so large

Without knowing your numbers, I can't tell. If you are using U32 that
gives you 0-4294967295. That is, 9 digits of resolution, max.
A DBL (aka Real 64) Gives somewhere around 15 digits
of r
esolution.
=================
But back to the original problem, rather than counting ticks to increment the
amp-hour counter, I would read the DMM as fast as is reasonable,
determine the time (in fraction of an hour) since the last reading,
multiply to determine incremental amp-hours, and add it to the previous total.
If your display can only handle integers, keep a fractional counter,
wait for it to get >= 1.000, then increment the integer counter and subtract 1.000 from the fractional counter.

Les.Hammer@CompleteTest.com
0 Kudos
Message 4 of 4
(3,106 Views)