User Guides DIY Lead Acid Battery Tester with Automotive Headlights (and Wi-FI?)

After building the battery monitors and discovering that one of my batteries was essentially dead, I wanted to quantify just how dead it was. The best way appears to be adding a resistive type load of known amperage and calculating battery capacity with those numbers.

Starting off: a junction box, some H4 bulb holders and some headlight bulbs:

photo_2023-11-29 03.29.07.jpeg

The box was around Rs 400 on Amazon and the bulb holders were Rs 80 each, bulbs were about the same.

photo_2023-11-29 03.29.08.jpeg

I removed the rubber sleeve, drilled a 4.5mm hole from the rear side, put back the rubber sleeve on, and continued drilling from the socket side and ended up with a clean hole in the rubber sleeve this way.

photo_2023-11-29 03.29.09.jpeg

Spacing out the holder and marking holes for drilling.

photo_2023-11-29 03.29.10.jpeg

Holders installed.

photo_2023-11-29 03.29.11.jpeg

Each wire got an individual hole and the fasteners are M4 with serrated nuts.

photo_2023-11-29 03.29.13.jpeg

There is some crowding on the bulb side though, I should've staggered the holders a bit.

photo_2023-11-29 03.29.14.jpeg

I needed to snip off bits from the bulbs to get them fit.

photo_2023-11-29 03.29.16.jpeg

Next up is installing this rectangle switch in a round hole.

Link for the 30A switch:

photo_2023-11-29 03.29.17.jpeg

Which was done with the help of a rotary tool.

photo_2023-11-29 03.29.22.jpeg

I wasn't able to clean up the hole because the switch got stuck during a test fitting. It looks alright though.

At this point, that's the most essential parts of the load tester. But I wanted some telemetry, so onwards we go.

photo_2023-11-29 03.29.25.jpeg

That's a Wemos D1 R2 ESP8266 module running Tasmota Sensors, connected to an INA219 for voltage monitoring and a 30A relay that serves as a low voltage cut off.

photo_2023-11-29 03.29.26.jpeg

The wiring is the same as the battery monitors, with the addition of 5V lines and GPIO12 going to the relay.

photo_2023-11-29 03.29.28.jpeg

With the boards installed in the box, I added transparent heatshrink on the INA219 module.

But that's just an elaborate low voltage cutoff, I still wanted some way of visualizing data so onwards we go.

photo_2023-11-29 03.29.30.jpeg

This is a Peacefair PZEM015 DC current meter, complete with a ridiculously overbuilt shunt for 100A from

photo_2023-11-29 03.29.32.jpeg

The meter is installed in the lid and the shunt is wired up.

photo_2023-11-29 03.29.34.jpeg

Transparent heatshrinking on the shunt.

photo_2023-11-29 03.29.35.jpeg

I found these clips/clamps on a decommissioned ATM last year and finally found a use for them, the shunt will be clipped on the back of the meter.

photo_2023-11-29 03.29.44.jpeg

Here's everything almost wired up. I'm not using the highbeam on these bulbs, so I tied off those blue wires. The yellow wires are connected into a 5-way WAGO connector, which is then connected to the NC (normally closed) contact of the relay. The common contact of the relay goes to the switch. Both the Peacefair module and the ES8266/INA219 are connected to the common contact, so that they're not affected by the relay cutting off the bulbs.

This way, the bulbs are on when you turn on the switch, and turn off only when you either turn off the switch, or the ESP8266 modules triggers the relay when it detects a low voltage reading. So the relay is only energised (thus drawing power) when there's a low voltage cutoff in effect.

Hopefully this means I can leave this tester unattended until I get a notification from a Tasmota -> Telegram integration.

photo_2023-11-29 03.29.49.jpeg

Some quick battery clamps I hammered together from, all of the wiring is 4 sq mm.

photo_2023-11-29 03.29.51.jpeg

Another angle of the mostly completed battery tester. Now to try it out:

photo_2023-11-29 03.29.56.jpeg

With three bulbs (2x 55w and 1x 90w), it's drawing 16.8 amps and voltage fell under 11V immediately, indicating a pretty much dead battery.

photo_2023-11-29 03.29.58.jpeg

The low voltage cutoff kicked in at 10.5V and turned off the bulbs (by energizing the relay — there's two red leds illuminated instead of one)

Looking at the datasheet for this battery:

Screen Shot 2023-11-29 at 4.03.44 AM.png

I should've seen 5 hours of run time at 17 amps down to 1.75 volts per cell (1.75 x 6 = 10.5V) which works out to be 5 x 17 = 85Ah capacity. Instead I got 1.11Ah (show in the display above).

So yeah, it's a dead battery. But at least now I know how dead it is. Now I'm off to try desuphation.

But first, here's what to type in the Tasmota web console for the low voltage cutoff:

rule1 on INA219#Voltage<10.5 do power1 0 endon

then turn on the rule with:

rule1 1

Also to make sure the relay stays de-energized at every power on (so that the bulbs are always turned on):

poweronstate 1

More about Tasmota rules:

and Power On State:
Last edited: