Labels

lego (12) Linux (39) pi (20) Thinkpads (4)

Monday, 23 December 2013

Illuminated and Rocker-style power switches for the Raspberry Pi


As previously discussed in in a post about power switch options for the Raspberry Pi, mausberrycircuits was identified as a source of several options.  Original a kickstarter campaign, the hobbiest sells various of his creations including power switches, custom switch PCB boards and car ignition boards all for the Raspberry Pi.   He will even work with your design requirements and alter the switch.



His power circuits is essentially a circuit board that is placed inline with the micro-USB power line, with two connections to the GPIO (1 input, 1 output).  A press of the button or a toggle of the switch takes the unit from off (complete power off for the raspberry pi) to on mode.  A shell script starts on bootup that passes a high/1 to the switch to instruct indicate the raspberry pi is on.  A low/0 signal passes from the switch to the raspberry pi to indicate the switch is neutral.  A toggle of the rocket switch to off or holding a press button switch for two seconds changes the output to high/1 which the polling script triggers a safe poweroff.  When the raspberry pi has finally fully shutdown, the GPIO goes from high/1 to low/0, which tells the switch the raspberry pi power can be cut safely.  The rocket-style switches also come with a reset button that can trigger a raspberry pi reset if it becomes frozen, etc -- something that normally would require to pull the power line.

The switch also detects software shutdowns invoked by the user (as the GPIO will toggle from high/1 to low/0, which the switch polls for).


Pros:

  • very small
  • may need some modification to your raspberry pi case
  • addresses the CLEAN SHUTDOWN and POWER OFF requirements fully.

Cons:

  • expensive but cheaper then any alternatives
  • everything fully assembled


I purchased a number of the switches from Mausberry Circuits.  The illuminated push button switch easily integrates into my lego design cases -- the added width is 1 lego block.

The illuminated switch integrated:

Here's what my case looked like before adding the switch:



I had to rip down the right-side wall to set it up.  But it is lego after all.  Time to integrate the switch into the case!



After:



The rocker-style switch integrated:


1 comment:

  1. When electricity goes off in your home, you can always put up with a couple of hours of darkness, cold or heat until it is restored. However, when a power switches occurs in your business, the result can be tragic, especially if the crucial functions depend on constant power supply.

    ReplyDelete