A Raspberry Pi does not have an On/Off switch and there is no easy way to shutdown the Pi while keeping the file system 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 single 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.
This project description presents an elegant solution for the problem of switching the Pi on and off. The goal was to have a small PCBoard whose functionality can be described as follows:
one push button only for power on and power off
form factor as a Raspberry Pi hat for ease of use
only one communication line to and from the Pi – in other words, only one GIPO pin used on the Pi
awarness of the Pi‘s status (running or not running)
square signal output capability with variable/de ned frequency to be used as a timer interrupt for the Pi
later versions usable on a breadboard.
Peter Boxler is the Author of this Application Paper
The application paper on the iSwitchPi, the intelligent Power Switch for Raspberry Pi, is a detailed 13 page document that was previously published on the internet and to which you can find the link here!
iSwitchPi Stacked on a Pi
Originally trained as a precision mechanic at a tender age, Peter later obtained a bachelor degree in Electrical Engineering. In that capacity he developed high-frequency and digital circuits in a lab at ETH in Zurich. Later, in 1969, Peter joined IBM and his first programming language was PL/1. As an IBM Systems Engineer and Chief Programmer he was at home in the world of the legendary IBM/360 computers. As early as 1976 Peter built his own small computer based on the 6502 processor chip. During his 34 work years in the IT department of a large Swiss Bank he explored many different corners of the IT universe.
The USA Southwest is his favourite travel destination – Peter is the author of two travel guide books on this wonderful place – they are both available in the Apple iBookstore.
His creative retirement lifestyle started in 2002 and it includes photography, video, travel, travel book author and hiking. As a photographer, Peter manage all his >70,000 photos in Adobe Lightroom – He is recognized by Adobe as a Certified Expert for Lightroom 5. When the Raspberry Pi computer arrived on the scene in 2012 he fell for this little machine.