Home Assistant UPS Mk II Plastic Case

I’ve put the UPS in a case. I was going to 3D print a case, but that’s a lot of plastic, so I just put it in a generic plastic container:

HA UPS Mk2 Block Diagram

The lid keeps the dust out, inside I have put bits of cardboard in to keep things apart.

HA UPS Mk2 Block Diagram

I’m not …

Home Assistant Fridge / Freezer Notifications

In the house there is a fridge, freezer and fridge freezer with smart plugs that show how much power they are using. One of my dashboards shows the power used (among other things). They all switch on and off periodically as can be seen here:

Fridge Power Chart

It occurred …

Home Assistant UPS Mk2 Software Part 1

Determining the Battery State of Charge (SOC)#

Lead Acid Battery Voltage vs SOC

The voltage of a lead acid battery vs the SOC can be approximated to a straight line. This isn’t completely accurate especially at the extremes (0% and 100%) but it’s close enough. Especially …

Home Assistant UPS Mk2 Testing Part 2

When testing the charge circuit, something didn’t seem quite right…

HA UPS Mk2 Charging

The battery current was about 40mA even though the charging duty cycle was set to 3 (with a maximum of 255). A duty cycle of 3 should mean that the battery is charging for …

Home Assistant UPS Mk2 Testing Part 1a

Something I noticed when I connected and disconnected the USB serial port on the Arduino Nano was that the Nano would reset. After a bit of googling it turned out that this was caused by DTR on the CH340 serial chip being connected to the RESET pin (via a …

Home Assistant UPS Mk2 Testing Part 1

This was my test setup:

HA UPS Mk2 Test Setup 1

The only thing I wasn’t testing was the Raspberry Pi voltage. This left input voltage and current and battery voltage and current, from which I could work out things like efficiency and estimated run time.

I had 4 lead acid …

Home Assistant UPS Mk II

I decided to have an uninterruptible power supply (UPS) for my Home Assistant (running on a Raspberry Pi). The design I came up with is shown below:

HA UPS Mk2 Block Diagram

The input from the mains is supplied by a 15V AC to DC adapter (wall wart). This is shown as Vcc/Vss on …

Debugging ESP32 S3 in VS Code

Debugging is much better than littering your code with print statements for lots of reasons - which I’m not going to go into here. But setting debugging up is not always straightforward.

To make things easier, I use an esp32 s3 board that had JTAG …

Mouse Trap Mk II

It turned out that the original mouse trap wasn’t sensitive enough. Very small mice just didn’t trigger it. So I decided to improve the design.

The case of the trap is clear, so I thought I could have a beam of light going from one side to the …