Skip to content

Power OnOff

project-owner edited this page May 3, 2021 · 10 revisions

Using the approach described on this page you can gracefully shutdown the Power Supply connected to the Raspberry Pi. It can be done in several ways:

  1. By clicking two times on the Shutdown button in the Player UI (e.g. using a touchscreen)
  2. By clicking two times on the Shutdown button in the Player Web UI (e.g. using Web UI in a cell phone connected to your home network)
  3. By pressing twice the hardware push-button connected through the Power Management System to the Raspberry Pi board.

The player supports the Software and Hardware shutdown. The additional hardware can be used for the PMS. It can gracefully switch On/Off the +5V Power Supply connected to the Raspberry Pi board. In addition to that a PMS can provide Power On functionality as well.

In order to enable the Power Off functionality through the PMS the following line should be added to the /boot/config.txt file:

dtoverlay=gpio-poweroff,active_low,gpiopin=4

These settings enable the module which will pull the pin GPIO#4 from HIGH (+3.3V) to LOW (0V) when the OS will finish the power-off procedure. That in turn will indicate that it's safe to switch off the power supply. This sequence provides the graceful power shutdown sequence.

To enable the hardware power-off using the push-button the following parameters should be specified in the file /home/pi/Peppy/config.txt:

[gpio]
use.buttons = True
...
button.poweroff = 24

This will cause the Peppy Player to listen for the signal change (+3.3V -> 0V) on the pin GPIO#24. When the signal will be changed two times the player will save the current player state and run the command sudo poweroff.

The following image explains the Power On/Off sequences using PMS.

pms-1

Power On

  1. The gpio-poweroff should be enabled and configured in the /boot/config.txt file
  2. The hardware push-button should be pushed once.
  3. Upon the single button push the PMS activates the relay which connects +5V from the Power Supply to the Raspberry Pi board.

Power Off

  1. To initiate the power off procedure either the player software Shutdown button should be clicked twice (4) or the hardware push-button should be pressed two times (2).
  2. Upon double button push the PMS should cause the LOW signal on the pin GPIO#24 configured earlier.
  3. When the Peppy player receives either two clicks or two pushes it save the current settings and runs the command sudo poweroff.
  4. When OS finishes the poweroff procedure it will bring the HIGH level on pin GPIO#4 to the LOW level.
  5. PMS will deactivate the relay which will disconnect the Power Supply +5V from the Raspberry Pi board.

Power Management System

Alexander Amend (Germany) developed the PMS board which provides Power On/Off functionality:

pms-2

Please pay attention to the pin numbers of the T2. Here is the proof of concept implementation of the above mentioned design from Alexander.

pms-3

<<Previous | Next>>

Contents

Clone this wiki locally