Intelligent Power Switch

Elegant Solution for the Raspberry Pi

What is the problem

A Raspberry Pi does not have an On/Off switch and there is no easy way to shutdown the Pi while keeping the filesystem intact.
This Intelligent Power Switch brings a clever solution to this problem: Power-On the Pi by pressing a pushbutton and also properly power-off the Pi with another press on the same button.The intelligence is provided by a program running in an AVR MCU ATtiny44. This C-program implements a Finite State Machine in the MCU.
A small Python script is running in the Pi itself.
Just one GPIO-Pin is used for two-way communication between the Pi and the iSwitchPi board.
The iSwitchPi board additionally provides a square wave output with variable frequeny that can be used to trigger interrupts on the Pi.

Projektziel

Es soll nur eine Drucktaste für Ein/Ausschalten/Reboot des Pi geben. Ist der Pi ausgeschaltet, genügt ein kurzer Druck auf die Taste, um den Pi mit Strom zu versorgen. Läuft der Pi, so kann mit einem kurzen Druck auf dieselbe Taste der Shutdown des Pi eingeleitet werden und nach einer definierten Verzögerungszeit wird auch die Stromzuführung zu Pi unterbrochen. Läuft der Pi, so kann mit einem langen Tastendruck ein Reboot des Pi ausgelöst werden - die Stromzufuhr bleibt in diesem Fall erhalten.
Der geniale iSwitchPi erledigt dies und mehr. Für die Kommunikation zwischen Pi und iSwitchPi wird nur ein GPIO Pin des Pi benötigt.

Project-Description and Code for iSwitchPi. The full project description is available here.

Project-Description (German)

Project-Description (English)

iSwitchPi-Code available on GitHub.

The application paper can also be found here