Help with battery monitoring

I have created a graph like this to show how much energy my batteries use and recharge each day. This graph would indicate that I use way more than I recharge, but I know that is incorrect as at the end of each day my batteries are more full. Does anybody track their batteries this way? And if so, would you be willing to share your process? FYI: I am using in an RV.

What card is that?

What’s its config?

What sensors are you using?

Yea, I know I did not include any info. As mine is not working and rather than have people try and fix it, I was hoping someone had a working system they could just share.
I have two sensors, one for incoming current and one for outgoing that read directly from the batteries. They both seem to be reading properly.
For the graph, I have created two daily Utility Meters, one for each sensor. I am sure the graph is not part of the issue as the totals from the utility meters are off.
Right now the “outgoing” meter reads 227.54 A and the “incoming” meter reads 190.07 A.
But my battery at midnight was 72% full and now it is 82.5% full.

Amps are neither power nor Energy. It is current. So if amps is what you put in the utility meter, results are useless. You need (k)Wh. If you have (k)W you can calculate (k)Wh from it. If you have neither, you’ll need Volts as well to calculate W.

Oh, thank you. I will try that. My thought was as I use “amp hours” to calculate things, I would just use that. But what you said makes way more sense.

Voltages for charging are most likely not the same as voltages for discharging. Plus they may vary over time.That is why the amps will not tell you the right story.

1 Like

ps. A utility meter won’t convert A to Ah, so it will also not convert W to Wh. You’ll need a (left) Riemann sum integral helper for that.

1 Like

I am really just concerned with tracking incoming and outgoing totals. So the unit doesn’t matter to me. Just to see if I was losing or gaining each day. And if I was losing, I could have an idea of by how much. I know the total charge will tell me that, but I figured the graph would just look cool.

The graph looks cool. It doesn’t tell you anything if you don’t want to know what it is though…
Best I can explain is that you are looking at accumulated current fluctuations. Not totals of anything. But we’re still guessing what you actually did though. And we don’t know what sensors you have that are of any use either.

1 Like

No, I will switch it to W and report back. The batteries have built in sensors. I realize I should be gathering W rather than A. Now that you mention it, I realize I was just not thinking. My uncle was the head electrician for Ford Motor Company. He would be disappointed. :slight_smile:

This will not work either. Power is a rate. This is like summing up the various speeds you drove with your RV and then saying it’s how far you drove that day.

Integrate the power sensors and provide that to the utility meter.

1 Like

Ok, so what would I need to do to get this done? It seems to me just because I know the total charge state, 80% to 86% or whatever, I should be able to get my result. I am not sure what you mean by “integrate the power sensors”.
The batteries track so many values, W, V, A, and they seem to know if they have increased or decreased and by how much, so I should be able to use that information to get what I am looking for?
I feel like one of those values should act as a “fuel gauge” of sorts?

Focus on only the power (W) sensor. Is this bidirectional? In other words, does it account for both charging and discharging by going positive and negative? If so, make two template sensors: one for only positive values and one for only negaitve values (but made positive).

Create a Riemann integration sensor of each. Now you will have energy.

Create a utility sensor for each of these. Now you have total energy for a given cycle.

I have two sensors now for A. One negative (made pos) and one positive. I will switch those to W. If I understand you correctly, this will require a total of 6 “sensors”. Two for the neg and pos of the W. Two then to read each of those as integration sensors, and then two utility sensors to read each of the integrations?

Do you currently have a sensor per battery? How many batteries?

Once you have the split power sensors for each battery and their corresponding energy sensors, then you can sum the two sets each (separately), then you only need two utility meters, unless you wanted it per battery, in which case you will have twice the number of utility meters you have batteries.

I have 2 batteries both with multiple built-in sensors that I can read in HA. I can currently read each battery separately and I have sensors that combine the two.
All I am looking for is this graph that will display how much total power came in and went out, so I see if I am positive or negative at the end of the day and by how much.
I currently have two sensors that show the combined in and out for Amps over and I will switch those to W.
So I will have a sensor for combined W positive and negative (with the negative converted to positive).
I think my only problem was using A rather than W. Although I think I may want to make W to Wh to get my desired results?

Energy, not power.

Yes, as you’ve been told a number of times. Use the Rieman integration.

Power (W = J/s) is to speed (km/h) as energy (J) is to distance (km).