So I'm doing a PV project with wifi enabled statistics.

I'd like to see the watts coming in and out and the battery charge level, estimated battery charge and discharge time.

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


  • I chose ACS hall effect sensors instead of shunts. ACS712 5A/20A modules (or going to 758/770 for PV) and ACS758 or ACS770 50A depending on which I will be able to get my hands on. I don't believe that 2 pins of SOT8 package can carry 30A through them.

  • MPPT charge controller with built in inverter for PV applications. It has AC backup when battery voltage goes below 30% threshold.

The datasheet of the PV controller states the charging voltage for battery is 13.8V±0.5V. 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 getting charged. If the inverter charges the battery at constant 13.8V there is no "standard" voltage divider way, if I understand correctly.

Also for the watts out calculation I need to know:

  • AC power coming out

watts in:

  • AC power coming in
  • PV power coming in

and for the battery charge time

  • current battery voltage level (without load and without charging)
  • watts coming into the battery
  • watts coming out of the battery


  • \$\begingroup\$ What is your actual question? Can you show a block diagram of how everything is connected? \$\endgroup\$ – winny Oct 12 '18 at 9:46

To calculate how much energy is being stored on the battery it's simple I*V*t which gives a result in Watt hour (Wh).

The problem is that it's quite difficult to know how much energy is in the battery itself as it will depend of many factors like temperature, internal serial resistance of the battery and so forth, which changes over time as well.

None the less, you can calculate how much energy is provided to it, and how much energy is drawn from it, with that data in hand, you can run some computing to analyse and estimate the state of life and the energy it has.

You should measure the battery voltage when it charges directly on the battery leads, to avoid any connection serial resistance that would create a voltage drop. Unfortunately there is no better way, as you will always have the internal resistance of the battery.


The output voltage can't be higher than battery voltage + wire voltage drop. The charger can't charge the battery constantly at 13.8V, rather this is a float voltage once the battery is full.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.