During an outage the question is always the same: how long can the fridge, router and lights run? The inverter display shows a voltage that jumps with the load. Here the INA219 measures both the battery voltage and the current, so the ESP32 can integrate the energy and show a real figure.
Three things that decide whether it works
The INA219 reads the voltage across a shunt of at most ±320 mV. The board shunt of 0.1 Ω is fine for a few amps. For an inverter that pulls tens of amps use an external 75 mV shunt (for example 100 A / 75 mV) and recalibrate the current scale in code. The bus input of the chip is specified up to 26 V on the common mode, so a 24 V LiFePO4 bank that charges to about 29 V is at or over the limit; take an INA226 or a Hall-effect module in that case.
On LiFePO4 the voltage curve is almost flat from 20 % to 90 %, so voltage alone gives a poor state of charge. Count ampere-hours instead and correct the counter when the BMS reports full. Put a fuse on the positive wire right next to the battery.
Ukraine: we buy and sell these parts ourselves, order them on this site.
Some links are affiliate links: we may earn a commission at no extra cost to you.
Related ideas
⛔ High risk
Mains 220–230 V can kill. Work with the power off, use certified isolated modules in an enclosure, fuse the line, and ask a qualified electrician if you are not sure.
Mains 220–230 V can kill. Work with the power off, use certified isolated modules in an enclosure, fuse the line, and ask a qualified electrician if you are not sure.
Mains 220–230 V can kill. Work with the power off, use certified isolated modules in an enclosure, fuse the line, and ask a qualified electrician if you are not sure.
Comments
No comments yet. Share your experience or ask a question.