I'm doing a PV project with WiFi-enabled statistics.

I'd like to monitor the power coming in and going out, the battery charge level, and the estimated battery charge and discharge time.

I'm designing a PCB to have everything neat, and to not have to connect any wires.

Parts:

* I chose ACS Hall-effect sensors instead of shunts,
[ACS712](https://www.allegromicro.com/-/media/files/datasheets/acs712-datasheet.ashx) 5 A / 20 A modules (or going to 758/770 for PV) and [ACS758](https://www.allegromicro.com/-/media/files/datasheets/acs758-datasheet.ashx) or [ACS770](https://www.allegromicro.com/-/media/files/datasheets/acs770-datasheet.ashx) 50 A depending on which I will be able to get my hands on. I don't believe that two pins of an SOT8 package can handle 30 A.
* An MPPT charge controller with built-in inverter for PV applications. It has AC backup when the battery voltage goes below 30% threshold.

The datasheet of the PV controller states that the charging voltage for the battery is 13.8 V ± 0.5 V, so I'm unsure if it will gradually bump the voltage up to charge the battery or just flat line it.

Here is the problem with the battery charge monitor. I'm not sure how to detect the voltage of the battery itself when it's being charged. If the inverter charges the battery at a constant 13.8 V there is no "standard" voltage divider way, if I understand correctly.

Also for the power-out calculation I need to know:

* AC power going out

Power in:

* AC power coming in
* PV power coming in

and for the battery charge time:

* current battery voltage level (without load and without charging)
* power coming into the battery
* power going out of the battery

[![Schematic](https://i.stack.imgur.com/xZD39.png)](https://i.stack.imgur.com/xZD39.png)