Calculating charging current

chargingcurrent

I have following situation:

Solarpanel with 20 W, 2 12V lead-acid batteries, the solar panel is charing the batteries. I measure the current coming from the panel with a ACS712 in a 3 minute interval.

The output then looks as following:

Amp;Date
1.08699;"2015-05-07 12:42:33"
1.09222;"2015-05-07 12:45:33"
1.00338;"2015-05-07 12:48:32"
0.984217;"2015-05-07 12:51:32"
1.06783;"2015-05-07 12:54:33"
1.01557;"2015-05-07 12:57:33"
0.386719;"2015-05-07 13:00:32"

I want to calculate the total ampere hours of a day.
I had the followin in mind:

As the ACS712 is very noisy, I set all values below 0.10 amps to 0.
I square every value, then sum it, then divide by the amount of values I have for each day.
Then I multiply by the amount of seconds that have passed between start and end.

The result is the charging current for that day, I think. Is this a viable approach to this problem, or should I skip the squaring part?

Best Answer

Skip the squaring. You are trying to integrate current, not power. And don't bother limiting the low values, either. Just sum them up, multiply by time between samples, and divide by total time.