I'm living on my yacht and I wish I could just leave things alone or just buy an off the shelf device and let it monitor the battery and be done. But, where's the fun in that? In a nerdy way I enjoy tinkering with this.
My question is what devices are available?
It started with wanting to know how much power the wind turbine was generating. The solar controllers have ports where data can be accessed but inconvenient to look in the cupboard at the basic display.
I thought I could add a current meter to the wind gen circuit (30A acs712) and get the data from the solar controllers with an esp32. Current isn't enough to measure power so I used a 3 channel INA3221 current and voltage monitor. It has some inaccuracies but 1% error may not really matter.
Counting power turned into relearning riemann sums to estimate power at time interval readings. Then somehow storing that information so I could get data like readings over the last hour, last 24 hours and total power generated. It feels like I'm reinventing the wheel though.
Because I wanted to overengineer things, I'd like to add monitoring to the distribution panel to see where power is going such as fridge, laptop, lights and alternator power. Plus an overall battery monitor to estimate state of charge.
The house bank is 12V 270Ah lithium and engine lead acid. There may be up to 100 amps from lithium and whatever spike engine starters generate.
At the moment there's just a very inaccurate analog meter showing current and volts through the distribution panel only. Charging, alternator, engine battery circuits are unmonitored.
I started looking at various battery fuel gauge ICs and seeing what projects are on github but perhaps people can shortcut my research with their knowledge.