Close

Version 1, kinda.

A project log for [mUPS] Minimal UPS for Raspberry Pi

A short hold-up UPS with automatic safe shutdown and reboot

Paul CrouchPaul Crouch 04/11/2019 at 18:170 Comments

I'm calling it version 1 with the intention of revisiting it to address some lose ends and make some improvements. Version 2 will come when I need a longer hold-up, rather than the (almost) immediate shutdown.

You can find my excuses elsewhere as to why it's taken so long and why this documentation is a bit thin, but here's the short version of events:

Twenty-third-time lucky?
UPS diagram (not showing GPIO potential divider!)
UPS diagram (not showing GPIO potential divider!)

Arduino

3 - RPi_UP (DI), RPi GPIO output - high after boot, low just before complete shutdown.

2 - RPi_SD (DO), RPi GPIO input - active-high to trigger shutdown of RPi (through pot.div; 5V >> 3V3). 

Not Used: A0 - ADC to 18650 battery, 4V - disconnect load from battery when voltage drops.

4 - Main Power present/not present (DI).

Not Used: 5 - Keep alive/immediate select switch (DI)*

6 - Relay (DO) - active-high opto-isolated (N.O. contacts). Opens to disconnect battery.

7 - Amber UP LED.

8 - Red SD LED.

9 - Green MPP LED.

*Mode selection input:

Not Used: Keep alive = 0V - waits until battery is low before shutting down and disconnecting.

Keep alive = N.C. - immediate safe shutdown and disconnect.

Raspberry Pi

RPi signals to UPS when it is up. UPS tells Pi to shutdown and waits for RPi_UP to go low before removing power.

RPi_UP=21       # GPIO output - high after boot, goes low a few seconds before complete shutdown. RPi_SD=17       # GPIO input - active-high to trigger shutdown of RPi (through pot.div; 5V >> 3V3).

Discussions