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:

The input from the mains is supplied by a 15V AC to DC adapter (wall wart). This is shown as Vcc/Vss on the diagram above. There are two DC to DC converters, one that powers the Raspberry Pi and one that powers an Arduino Nano. The rPi converter is a LM2596 and the Nano converter is a smaller device (which says it can deliver 3A but it only needs to deliver about 20mA).

