UPS
Pigeon computers have an onboard supercapacitor-based UPS, which protects against brownouts and ensures a safe system shutdown in the event of a power failure. The following table shows the GPIOs used by the UPS.
Table 1. GPIO used by the UPS
SIGNAL | GPIO | IN/OUT | DESCRIPTION |
---|---|---|---|
REQUEST SHUTDOWN | GPIO27 | IN | Request system shutdown - active low |
SHUTDOWN FINISH | GPIO4 | OUT | Shutdown status - should be low when the shutdown is complete |
In the event of a power failure lasting more than 0.5 seconds, the power supply control circuit sets REQUEST SHUTDOWN to a low state and waits until SHUTDOWN FINISH is low before powering off the system. When the supply voltage returns to the correct level, the system will automatically boot.
To implement SHUTDOWN FINISH, the gpio-poweroff device tree overlay is used and configured in the /boot/config.txt file:
dtoverlay=gpio-poweroff,gpiopin=4,active_low="y"
To implement REQUEST SHUTDOWN, the gpio-shutdown device tree overlay is used and configured in the /boot/config.txt file:
dtoverlay=gpio-shutdown,gpio_pin=27,active_low=1,gpio_pull=up,debounce=100
In older OS versions, the pigeon-rb-ups application is used to control the SHUTDOWN REQUEST signal. The application starts at system boot. The source code is available on GitLab.
To shut down the system, press the POWER button for at least 2 seconds. If the system was shut down this way, you need to press the POWER button for at least 2 seconds to restart it.