A Never Ending Back Story:
About two and a half years ago, I bought an inverter that needed four batteries running at 48V:
techenclave.com
![IMG_20210416_020130.jpeg IMG_20210416_020130.jpeg](https://techenclave.com/data/attachments/180/180499-d0b0fa1aadeca417b0dbcf791761274d.jpg)
The inverter was paired with four Amaron Quanta batteries, this was a decision I made — I thought the were really cool looking, colour matched the inverter nicely, didn't need any maintenance and I later learned that this kind of lead acid battery (vrla/agm) doesn't have any corrosion on the battery terminals as you would see in flooded lead acid batteries. I also found out that there are detailed datasheets with charge/discharge curves (with Peukert's law taken into account).
en.wikipedia.org
I also did the installation on my own, and I never did something like this before. How hard could it be? Turns out, there's more to this than just wiring up four batteries in series. The terminals should be scrubbed down until the copper is nice and shiny, the batteries should be pre-charged individually for a day each, and it's a good idea to check to see if the batteries are from the same batch.
I didn't do any of that and I didn't notice that one of the four batteries did not have a serial number that was sequential with the others. It was also missing the Q sticker on top of the battery, which was present on the other three batteries. For whatever reason, this battery was different — either a customer return or exchanged/forgotten stock.
And two years later that battery is now dead with a shorted cell inside (12V lead acid batteries have six cells inside of them). Run time has come down from a few hours to a few minutes as a result. Because of the shorted cell, the other batteries suffered and never charged fully (a lead acid battery with a shorted cell pulls more voltage, which prevents other batteries from getting a full charge).
Had I checked the voltages regularly, or had something that would report voltages, this issue might have been caught before irreversible damage was done to the other batteries:
After testing the battery voltages under load with a multimeter (and discovering the dead battery), I put together a few simple wi-fi monitors using ESP8266 controllers running Tasmota connected to INA219 current/voltage sensors and recorded these readings:
![Screenshot_2023_11_20_01_46_30_117_org_telegram_messenger_web_edit.jpg Screenshot_2023_11_20_01_46_30_117_org_telegram_messenger_web_edit.jpg](https://techenclave.com/data/attachments/180/180504-cf630385d9b885a52283878828ce243d.jpg)
The dead battery fell to ~8V with a simple 25w load.
![Screenshot_2023_11_20_01_48_14_041_org_telegram_messenger_web_edit.jpg Screenshot_2023_11_20_01_48_14_041_org_telegram_messenger_web_edit.jpg](https://techenclave.com/data/attachments/180/180505-061383486780f734a504ef8a1504bf15.jpg)
And when charging, it pulled over 14V, preventing the other batteries from charging fully.
So here in this guide, I'm rebuilding those battery monitors into a more permanent and usable version. One of the philosophies that has evolved in my DIY projects is not using any custom/bespoke PCBs/hardware, everything needs to be modular and easily available/replaceable. The need to get something working quickly again after a failure far outweighs any benefits a custom solution might have.
![photo_2023-11-20 01.24.45.jpeg photo_2023-11-20 01.24.45.jpeg](https://techenclave.com/data/attachments/180/180506-0ee68acc86012c5737b57496fc5e418d.jpg)
I chose the Wemos D1 R2 ESP8266 module since it can be powered directly from the battery that's being measured. It also had unpopulated pinouts that I attached JST 2.5mm right angle connectors to for easier wiring. We're interested in five lines from the module, two for I2C and two for VIN and GND and a 3.3V to power the INA219. The connectors and wires were purchased from Sunrom:
![photo_2023-11-20 01.24.46.jpeg photo_2023-11-20 01.24.46.jpeg](https://techenclave.com/data/attachments/180/180507-134bfcdc5cc821ed3d286b6da4717661.jpg)
I used 10cm pre-crimped wires to connect to the INA219 module and 30cm wires to connect to the battery. There are two wires coming from each terminal of the battery to get the most accurate readings possible, without the voltage drop you might see if I were to measure the VIN voltage on the ESP8266 board instead. The INA219 modules have a 4mV resolution, which is more than what we need (100mV would've been enough). The INA219 modules are covered in transparent heatshrink, and there's heatshrink on the bullet connectors as well (transparent on the positive line, black + transparent on the negative line). These are the bullet connectors:
![photo_2023-11-20 01.24.47.jpeg photo_2023-11-20 01.24.47.jpeg](https://techenclave.com/data/attachments/180/180508-c5564533185000ac50afcd22eb4540d1.jpg)
The ESP8266 modules will be housed in a few generic 200ml food containers. Holes were marked, drilled out to 5mm and these snap fit PCB spacers were installed:
![photo_2023-11-20 01.24.48.jpeg photo_2023-11-20 01.24.48.jpeg](https://techenclave.com/data/attachments/180/180509-af2e37c3d79f1800a406136c16ea3361.jpg)
![photo_2023-11-20 01.24.49.jpeg photo_2023-11-20 01.24.49.jpeg](https://techenclave.com/data/attachments/180/180510-a2ce866d0e62d5f8825dc1e23d988814.jpg)
![photo_2023-11-20 01.24.50.jpeg photo_2023-11-20 01.24.50.jpeg](https://techenclave.com/data/attachments/180/180511-ffc597366103e375b5e9c5a2c64d50ce.jpg)
I'm not using any strain relief in this version, and the exit holes are intentionally oversized to allow for some ventilation, if it's needed.
![photo_2023-11-20 01.24.51.jpeg photo_2023-11-20 01.24.51.jpeg](https://techenclave.com/data/attachments/180/180512-4a2b534f395fce092c5a1967f70fa34b.jpg)
Four completed monitors, one for each battery. As an aside, I looked at Stuart Pittaway's diyBMS and it uses a single ESP8266 module because his design relies on an isolated I2C bus that adds complexity and necessitates a custom PCB. The cost of each battery monitor here is around Rs 500, which is fairly reasonable despite using hobbyist modules.
![photo_2023-11-20 01.24.52.jpeg photo_2023-11-20 01.24.52.jpeg](https://techenclave.com/data/attachments/180/180513-5656db945f5cea3cd2f82a8bd8a376a1.jpg)
These are short battery connecting wires that I made with a separate wire to connect to each battery monitor. I would have liked shorter wires, but heatshrinking them would've been difficult. These aren't necessary, you can use your existing battery wires and just crimp a ring terminal for the battery monitors, like the two smaller ones here:
![photo_2023-11-20 01.24.54.jpeg photo_2023-11-20 01.24.54.jpeg](https://techenclave.com/data/attachments/180/180514-9ff20477a945b10846866dd229ff3f93.jpg)
![photo_2023-11-20 01.24.53.jpeg photo_2023-11-20 01.24.53.jpeg](https://techenclave.com/data/attachments/180/180515-f6785b9b78ffcb16af1f016549c82077.jpg)
Before heatshrinking these larger aluminum ring terminals (they take 25 sq mm wire and have a 8mm hole), it's a good idea to sand down the edges of the crimp since they could tear the heatshrink.
![photo_2023-11-20 01.24.55.jpeg photo_2023-11-20 01.24.55.jpeg](https://techenclave.com/data/attachments/180/180516-6bcc93f08460aab21eba9617d87e4a31.jpg)
On the left, the bolts that came with the inverter, the middle is a high quality stainless steel hex head bolt and on the right is an absolutely beautiful socket head bolt. These are all M8 and the socket head one is 25mm long, purchased along with the flat washer and spring washer from indialocalshop:
![photo_2023-11-20 01.24.56.jpeg photo_2023-11-20 01.24.56.jpeg](https://techenclave.com/data/attachments/180/180517-3ec07343fd17a3a2c189d59f78ba5013.jpg)
Here, the batteries are connected with the long 16 sq mm wires that came with the inverter (the fifth battery is the dead one that's been replaced)
![photo_2023-11-20 01.24.57.jpeg photo_2023-11-20 01.24.57.jpeg](https://techenclave.com/data/attachments/180/180518-8b3d6fa9ce230e6b3118a7f5119fb391.jpg)
With the shorter cables and the battery monitors installed.
![photo_2023-11-20 01.24.59.jpeg photo_2023-11-20 01.24.59.jpeg](https://techenclave.com/data/attachments/180/180519-ba0b61ceac843d14abecbfe9a83146c4.jpg)
Not too bad for what is essentially a prototype, maybe shorter wires next time.
![photo_2023-11-20 01.25.00.jpeg photo_2023-11-20 01.25.00.jpeg](https://techenclave.com/data/attachments/180/180520-f5db2fdf40cd4f8e540d16b4d3a3dbf6.jpg)
These socket head screws are so pretty.
From here, it's configuring Tasmota with your integration of choice (mine was Mikrotik's RouterOS and Telegram, but I'll be moving it over to MQTT/Node Red/InfluxDB/Grafana.
About two and a half years ago, I bought an inverter that needed four batteries running at 48V:
WTB Sinewave UPS Inverter, so need suggestions.
I was a happy man till the Friday powercut recently started again. and now due to covid power cut problems are increasing as fixing takes time for the power company. so decided to pull the trigger and get a Sinewave UPS Inverter. Now The requirement are as below: 1) 3 x fans. 2) 3 x 15w bulbs...
![techenclave.com](https://techenclave.com/data/assets/logo/ic_launcher_192.png)
![IMG_20210416_020130.jpeg IMG_20210416_020130.jpeg](https://techenclave.com/data/attachments/180/180499-d0b0fa1aadeca417b0dbcf791761274d.jpg)
The inverter was paired with four Amaron Quanta batteries, this was a decision I made — I thought the were really cool looking, colour matched the inverter nicely, didn't need any maintenance and I later learned that this kind of lead acid battery (vrla/agm) doesn't have any corrosion on the battery terminals as you would see in flooded lead acid batteries. I also found out that there are detailed datasheets with charge/discharge curves (with Peukert's law taken into account).
Peukert's law - Wikipedia
I also did the installation on my own, and I never did something like this before. How hard could it be? Turns out, there's more to this than just wiring up four batteries in series. The terminals should be scrubbed down until the copper is nice and shiny, the batteries should be pre-charged individually for a day each, and it's a good idea to check to see if the batteries are from the same batch.
I didn't do any of that and I didn't notice that one of the four batteries did not have a serial number that was sequential with the others. It was also missing the Q sticker on top of the battery, which was present on the other three batteries. For whatever reason, this battery was different — either a customer return or exchanged/forgotten stock.
And two years later that battery is now dead with a shorted cell inside (12V lead acid batteries have six cells inside of them). Run time has come down from a few hours to a few minutes as a result. Because of the shorted cell, the other batteries suffered and never charged fully (a lead acid battery with a shorted cell pulls more voltage, which prevents other batteries from getting a full charge).
Had I checked the voltages regularly, or had something that would report voltages, this issue might have been caught before irreversible damage was done to the other batteries:
After testing the battery voltages under load with a multimeter (and discovering the dead battery), I put together a few simple wi-fi monitors using ESP8266 controllers running Tasmota connected to INA219 current/voltage sensors and recorded these readings:
![Screenshot_2023_11_20_01_46_30_117_org_telegram_messenger_web_edit.jpg Screenshot_2023_11_20_01_46_30_117_org_telegram_messenger_web_edit.jpg](https://techenclave.com/data/attachments/180/180504-cf630385d9b885a52283878828ce243d.jpg)
The dead battery fell to ~8V with a simple 25w load.
![Screenshot_2023_11_20_01_48_14_041_org_telegram_messenger_web_edit.jpg Screenshot_2023_11_20_01_48_14_041_org_telegram_messenger_web_edit.jpg](https://techenclave.com/data/attachments/180/180505-061383486780f734a504ef8a1504bf15.jpg)
And when charging, it pulled over 14V, preventing the other batteries from charging fully.
So here in this guide, I'm rebuilding those battery monitors into a more permanent and usable version. One of the philosophies that has evolved in my DIY projects is not using any custom/bespoke PCBs/hardware, everything needs to be modular and easily available/replaceable. The need to get something working quickly again after a failure far outweighs any benefits a custom solution might have.
![photo_2023-11-20 01.24.45.jpeg photo_2023-11-20 01.24.45.jpeg](https://techenclave.com/data/attachments/180/180506-0ee68acc86012c5737b57496fc5e418d.jpg)
I chose the Wemos D1 R2 ESP8266 module since it can be powered directly from the battery that's being measured. It also had unpopulated pinouts that I attached JST 2.5mm right angle connectors to for easier wiring. We're interested in five lines from the module, two for I2C and two for VIN and GND and a 3.3V to power the INA219. The connectors and wires were purchased from Sunrom:
![photo_2023-11-20 01.24.46.jpeg photo_2023-11-20 01.24.46.jpeg](https://techenclave.com/data/attachments/180/180507-134bfcdc5cc821ed3d286b6da4717661.jpg)
I used 10cm pre-crimped wires to connect to the INA219 module and 30cm wires to connect to the battery. There are two wires coming from each terminal of the battery to get the most accurate readings possible, without the voltage drop you might see if I were to measure the VIN voltage on the ESP8266 board instead. The INA219 modules have a 4mV resolution, which is more than what we need (100mV would've been enough). The INA219 modules are covered in transparent heatshrink, and there's heatshrink on the bullet connectors as well (transparent on the positive line, black + transparent on the negative line). These are the bullet connectors:
![photo_2023-11-20 01.24.47.jpeg photo_2023-11-20 01.24.47.jpeg](https://techenclave.com/data/attachments/180/180508-c5564533185000ac50afcd22eb4540d1.jpg)
The ESP8266 modules will be housed in a few generic 200ml food containers. Holes were marked, drilled out to 5mm and these snap fit PCB spacers were installed:
![photo_2023-11-20 01.24.48.jpeg photo_2023-11-20 01.24.48.jpeg](https://techenclave.com/data/attachments/180/180509-af2e37c3d79f1800a406136c16ea3361.jpg)
![photo_2023-11-20 01.24.49.jpeg photo_2023-11-20 01.24.49.jpeg](https://techenclave.com/data/attachments/180/180510-a2ce866d0e62d5f8825dc1e23d988814.jpg)
![photo_2023-11-20 01.24.50.jpeg photo_2023-11-20 01.24.50.jpeg](https://techenclave.com/data/attachments/180/180511-ffc597366103e375b5e9c5a2c64d50ce.jpg)
I'm not using any strain relief in this version, and the exit holes are intentionally oversized to allow for some ventilation, if it's needed.
![photo_2023-11-20 01.24.51.jpeg photo_2023-11-20 01.24.51.jpeg](https://techenclave.com/data/attachments/180/180512-4a2b534f395fce092c5a1967f70fa34b.jpg)
Four completed monitors, one for each battery. As an aside, I looked at Stuart Pittaway's diyBMS and it uses a single ESP8266 module because his design relies on an isolated I2C bus that adds complexity and necessitates a custom PCB. The cost of each battery monitor here is around Rs 500, which is fairly reasonable despite using hobbyist modules.
![photo_2023-11-20 01.24.52.jpeg photo_2023-11-20 01.24.52.jpeg](https://techenclave.com/data/attachments/180/180513-5656db945f5cea3cd2f82a8bd8a376a1.jpg)
These are short battery connecting wires that I made with a separate wire to connect to each battery monitor. I would have liked shorter wires, but heatshrinking them would've been difficult. These aren't necessary, you can use your existing battery wires and just crimp a ring terminal for the battery monitors, like the two smaller ones here:
![photo_2023-11-20 01.24.54.jpeg photo_2023-11-20 01.24.54.jpeg](https://techenclave.com/data/attachments/180/180514-9ff20477a945b10846866dd229ff3f93.jpg)
![photo_2023-11-20 01.24.53.jpeg photo_2023-11-20 01.24.53.jpeg](https://techenclave.com/data/attachments/180/180515-f6785b9b78ffcb16af1f016549c82077.jpg)
Before heatshrinking these larger aluminum ring terminals (they take 25 sq mm wire and have a 8mm hole), it's a good idea to sand down the edges of the crimp since they could tear the heatshrink.
![photo_2023-11-20 01.24.55.jpeg photo_2023-11-20 01.24.55.jpeg](https://techenclave.com/data/attachments/180/180516-6bcc93f08460aab21eba9617d87e4a31.jpg)
On the left, the bolts that came with the inverter, the middle is a high quality stainless steel hex head bolt and on the right is an absolutely beautiful socket head bolt. These are all M8 and the socket head one is 25mm long, purchased along with the flat washer and spring washer from indialocalshop:
![indialocalshop.com](/proxy.php?image=https%3A%2F%2Fomrook.com%2Fimages%2Flogos%2F9%2FILS336x66.jpg&hash=8d8244b25dc537056357ce6790487450&return_error=1)
![photo_2023-11-20 01.24.56.jpeg photo_2023-11-20 01.24.56.jpeg](https://techenclave.com/data/attachments/180/180517-3ec07343fd17a3a2c189d59f78ba5013.jpg)
Here, the batteries are connected with the long 16 sq mm wires that came with the inverter (the fifth battery is the dead one that's been replaced)
![photo_2023-11-20 01.24.57.jpeg photo_2023-11-20 01.24.57.jpeg](https://techenclave.com/data/attachments/180/180518-8b3d6fa9ce230e6b3118a7f5119fb391.jpg)
With the shorter cables and the battery monitors installed.
![photo_2023-11-20 01.24.59.jpeg photo_2023-11-20 01.24.59.jpeg](https://techenclave.com/data/attachments/180/180519-ba0b61ceac843d14abecbfe9a83146c4.jpg)
Not too bad for what is essentially a prototype, maybe shorter wires next time.
![photo_2023-11-20 01.25.00.jpeg photo_2023-11-20 01.25.00.jpeg](https://techenclave.com/data/attachments/180/180520-f5db2fdf40cd4f8e540d16b4d3a3dbf6.jpg)
These socket head screws are so pretty.
From here, it's configuring Tasmota with your integration of choice (mine was Mikrotik's RouterOS and Telegram, but I'll be moving it over to MQTT/Node Red/InfluxDB/Grafana.
Last edited: