DIY: Raspberry Pi UPS/Automatic safe power ON/OFF


Finally, everything is in the box;)

The goal was to set up the power supply for the Raspberry Pi, supported by the battery,
with automatic power up and safe shutdown depending on the status of the AC power/battery charge state.

As a battery I used a general purpose lead-acid battery (Fiamm,12V, 1.2Ah).


The AC / DC rectifier is MEANWELL 15V (25W).

The battery charging module is LM2596 with CC & CV control from ebay / Aliexpress.

The Battery Status Module is a "12V Battery Low Voltage Cut off Automatic Switch On Recovery Protection Module" from ebay / Aliexpress.


For power up and safe shutdown I used my own product.
Originally, this module is controled by key switch (car,boat) as trigger for for power up and safe shutdown Raspberry Pi.
This module have 4xprogammed time (timeON,timeBOOT,timeOFF,timeSHUTDOWN).

Flow diagram:

In this case this module is controlled by Battery Status Module.

Connection schematic:

Modifications to the charging module:

  • replace multi-turn potentiometers with fixed values

Modification of the Battery Status Module:

  • replace multi-turn potentiometers with fixed values
  • add electrolytic capacitor to the lower and upper threshold(for smoothing, ie delay) due to transient at the arrival of the mains supply or load.

Everything is fitted in the box; dimensions 240x190x75.

There is also a 1.8-inch SSD with a USB adapter.


Nice project :slight_smile:
But, if it was my project, I'd posted it on a blog and just linked to it as its not NodeRED specific


Great that we get first peek then !


Thanks, it is not Node-RED, but Node-RED is on the Pi :grin:


Cool. Bookmarked for future reference.

@scargill: Pete, something you might be interested in?


I'm reading right now...