
V4.0
Element14 | element14.com/PiDesktop
16
Hardware
The hardware architecture used by the PiDesktop to perform safe power control is
shown below:
A low power MCU on the PiDesktop add-on board is used to control the power supply
and monitor the state of Raspberry Pi board. Two pins (Pin1, Pin2) are used to
communicate between these two boards. Information sent on Pin1 is used to inform the
Raspberry Pi board to prepare for shutdown. The PiDesktop MCU utilizes Pin2 to
continually monitor the run state of the Raspberry Pi board. For added robustness,
close-cycle control has been implemented. This allows the PiDesktop power switch to be
utilized to perform safe and reliable startup and shutdown procedures.
Action
Button Time
Startup
at least 150ms
Switch off
2 seconds
Force switch off
5 seconds
Software
The PiDesktop add-on board MCU works with the Raspberry Pi board through Pin1 and
Pin2. Below are the details of the FSM (finite state machine).
PiDesktop Add-On Board MCU
When USB power is supplied to the PiDesktop add-on board, the MCU will run in
an
Initialize
state. The MCU will turn
OFF
(LED off) when the Raspberry Pi board is
shutdown (power removed).
When the PiDesktop is turned on (power button action is initially detected), the add-on
board will open the power to the Raspberry Pi and go into a
Waiting ON
state.
In the
Waiting ON
state
the MCU will continually read the level of the Raspberry Pi
board Pin2.