Hey guys, I have finished creating a hardware power switch for the Raspberry Pi that communicates with the Pi. It has a micro-USB connector on one end that your normal power supply plugs in to and then a USB port for connecting the Pi to. It uses two leads that connect to GPIO pins and a short script runs in the background (I put it in /etc/rc.local).
When you turn off the switch, the GPIO pins pick this up and run a shutdown sequence. When the shutdown process is complete the switch cuts out power to the Pi board completely.
I've also made a version with two USB ports so your hub can draw power from it (The switch is rated to 1.8 - 2amps).
Also I've just about finished with a car supply/switch that senses when the ignition is turned off and runs the shutdown sequence and provides power until the Pi has safely run its shutdown sequence.
I've attached a video of the switch in action. If you want to buy one, I have the boards on the way and will be assembling them in this week.
$15 + shipping for the regular and dual-USB ones, the car versions will be a little bit more. The script for the Pi and instructions for setting it up (takes less than a minute via SSH) will be included with the switch. You can customize which GPIO pins you use in the script.
If you want a board just send me a message on here or email [email protected]
Here's the quick YouTube demo:
http://www.youtube.com/watch?v=0goSyz0_ ... e=youtu.be
Power switch now available for Pi
- Attachments
-
- photo 2 (2).JPG (35.52 KiB) Viewed 36891 times
Re: Power switch now available for Pi
Nice!
I want one. Make that two!
I want one. Make that two!
Re: Power switch now available for Pi
If you guys are interested in the switches or want some which are somewhat customized to your setup then just send me a message and I'm sure I can easily modify these as necessary.
Also, I just wanted to mention that if you total up the cost of the components + printing the PCB + time spent soldering the components it is apparent that this is not an attempt at making any appreciable revenue. This was a project I started since a fair number of people (myself included) have asked about a physical power switch and I challenged myself to make something that myself and the users could find useful. Now I'm sharing the results of the project with those who may want to use these
Also, I just wanted to mention that if you total up the cost of the components + printing the PCB + time spent soldering the components it is apparent that this is not an attempt at making any appreciable revenue. This was a project I started since a fair number of people (myself included) have asked about a physical power switch and I challenged myself to make something that myself and the users could find useful. Now I'm sharing the results of the project with those who may want to use these

-
- Posts: 118
- Joined: Wed Jan 09, 2013 12:14 pm
Re: Power switch now available for Pi
Nice work,
....something I've thought about also, but I've got a lot to learn before I can even get close to what you've done !!!
....something I've thought about also, but I've got a lot to learn before I can even get close to what you've done !!!
-
- Posts: 557
- Joined: Tue Aug 07, 2012 8:48 pm
- Location: Portugal
Re: Power switch now available for Pi
Nice work 
Do you ship to Portugal?

Do you ship to Portugal?
Re: Power switch now available for Pi
Sure, I will ship to Portugal. I think USPS international would only be about $7 since this is such a light item
Re: Power switch now available for Pi
That looks great! I've just ordered my first pi today and intend on using it as a media player running xbmc (unsure which is the best ). I'll be using my drobo (USB hard drive ) to store all my movies etc and would like to be able to turn it off as it will only be getting used at weekends. Would it be safe for my hard drive/data to just turn it off with this switch?
Sorry for being such a noob
Also how much posted to the uk?
Sorry for being such a noob

Also how much posted to the uk?
Re: Power switch now available for Pi
Awesome. Is it possible to do one without the switch mounted but just some free wires instead? This would be great for my mame cabinet where I'd like to choose which switch I use then mount through the 12mm MDF.
Re: Power switch now available for Pi
I can definitely do that, I designed the boards with two plain solder holes where the switch is. You can use whatever type of switch and wires you'd prefer as long as it's not a momentary switch (must be steady state on or off, like a toggle or rocker switch). I may eventually update the code on the switch's ATtiny processor to allow for momentary power switch (e.g. hold for 2 seconds, then initiate shutdown) support but not at the moment. If you want a board without the switch just send me a PM/e-mail and I'll be glad to get you one.
-
- Posts: 7
- Joined: Fri Jan 11, 2013 2:08 pm
- Location: Barossa Valley, South Australia
Re: Power switch now available for Pi
Any chance of Aus getting a look in?
Even if it's just an individual parts list with PCB designs that we can make our own. I'd love to make one that runs under a Missile style toggle switch, just mounted on a board somewhere remotely.
(And I might put a small label on it with the word "Detonator Arm." on it, just to flip people out...
)
Even if it's just an individual parts list with PCB designs that we can make our own. I'd love to make one that runs under a Missile style toggle switch, just mounted on a board somewhere remotely.
(And I might put a small label on it with the word "Detonator Arm." on it, just to flip people out...

- Jim Manley
- Posts: 1600
- Joined: Thu Feb 23, 2012 8:41 pm
- Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Re: Power switch now available for Pi
It's not clear what cable configurations are supposed to be used. Does a power supply with a male micro-USB connector plug into your board and then 5v power is routed to the appropriate GPIO pin? This would bypass the main power polyfuse, which may not be a great idea. Is the female USB A port on your board meant to be connected to either the female micro-USB port or a female USB A port on the Pi via an appropriate male USB A to micro-USB male cable, or male USB A male to micro-USB male cable, as appropriate?
The best things in life aren't things ... but, a Pi comes pretty darned close! 
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!
Re: Power switch now available for Pi
You plug your original Pi power supply (male micro USB) into the switch. Then use a standard USB->micro-USB from the switch to the Pi's power port.
The GPIO pins are only used for communication, not powering the Pi. One lead sends a signal to the Pi and the other lead receives a signal from the Pi.
I'll post some more detailed photos of the switch. The leads to the board as well as the type of switch can all be lengthened/shortened/customized as necessary
The GPIO pins are only used for communication, not powering the Pi. One lead sends a signal to the Pi and the other lead receives a signal from the Pi.
I'll post some more detailed photos of the switch. The leads to the board as well as the type of switch can all be lengthened/shortened/customized as necessary
-
- Posts: 324
- Joined: Sun Sep 25, 2011 1:25 am
Re: Power switch now available for Pi
Does this do the same thing as an LTC2954 + MOSFET? Basically:mausberry wrote:You plug your original Pi power supply (male micro USB) into the switch. Then use a standard USB->micro-USB from the switch to the Pi's power port.
The GPIO pins are only used for communication, not powering the Pi. One lead sends a signal to the Pi and the other lead receives a signal from the Pi.
I'll post some more detailed photos of the switch. The leads to the board as well as the type of switch can all be lengthened/shortened/customized as necessary
- when the RPi is powered off, push button briefly to turn it on.
- when on:
- push button briefly to signal the RPi. When it is ready to shutdown, it sends a signal to the switch to turn power off.
- push button for N seconds to force power off.
- very low standby power.
-
- Posts: 179
- Joined: Wed Jun 06, 2012 1:51 am
- Location: United States
Re: Power switch now available for Pi
Awesome work! I definitely want to talk about a custom run for my DeskCades!
My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
Re: Power switch now available for Pi
This is similar, yes! Since the original posting I've actually redisgned the switch and replaced the relay with a MOSFET so that the board can be much thinner. Thew new PCBs are printing now and should be ready in a week, I'll post photos when they are done!Bakul Shah wrote: Does this do the same thing as an LTC2954 + MOSFET? Basically:
- when the RPi is powered off, push button briefly to turn it on.
- when on:
- push button briefly to signal the RPi. When it is ready to shutdown, it sends a signal to the switch to turn power off.
- push button for N seconds to force power off.
- very low standby power.
Re: Power switch now available for Pi
Hello there! I sent an email on what I had planned, maybe you could help me out. I would gladly purchase car pc solution from you, let me know what you think!
Re: Power switch now available for Pi
Also, thought i'd share this with anybody. Looks like there is native support for a reset switch on rev2 boards. I plan on doing adding this to my project. Not sure if it has been shared yet, but just letting more know.
http://raspi.tv/tag/raspberry-pi-reset-switch
http://raspi.tv/tag/raspberry-pi-reset-switch
Re: Power switch now available for Pi
Hey guys, just an update - I've put my project on Kickstarter to make the production process a little simpler. Cost had to go up a little since I've included free shipping and the assorted fees.
http://www.kickstarter.com/projects/131 ... spberry-pi
http://www.kickstarter.com/projects/131 ... spberry-pi
-
- Posts: 179
- Joined: Wed Jun 06, 2012 1:51 am
- Location: United States
Re: Power switch now available for Pi
Just pledged 

My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
-
- Posts: 36
- Joined: Sun Dec 30, 2012 10:02 am
Re: Power switch now available for Pi
LIST IT ON EBAY LIST IT ON EBAY!! PLEASE
Re: Power switch now available for Pi
You can count me in for one for sure. How do I order one from you?
EDIT: I need to learn how to read fully haha
EDIT: I need to learn how to read fully haha
Re: Power switch now available for Pi
Hi Mausberry,
I sent you an email, I'd like to get one of these for the car.
I sent you an email, I'd like to get one of these for the car.
Re: Power switch now available for Pi
Would you share which mosfet you are using to accomplish this?
Re: Power switch now available for Pi
Great idea.. well done.
Yes please, I would like one for my standard build RaspBMC.
One question....
If I physically remove power from the switch at the mains adaptor and then replace the power, what effect will this have on the Pi if any?
Rus
Yes please, I would like one for my standard build RaspBMC.
One question....
If I physically remove power from the switch at the mains adaptor and then replace the power, what effect will this have on the Pi if any?
Rus
-
- Posts: 557
- Joined: Tue Aug 07, 2012 8:48 pm
- Location: Portugal
Re: Power switch now available for Pi
That could corrupt your SD data, so don't do that. You should allways shut it down with safety.rustek wrote:If I physically remove power from the switch at the mains adaptor and then replace the power, what effect will this have on the Pi if any?
Rus