mausberry
Posts: 13
Joined: Mon Feb 04, 2013 11:30 pm

Power switch now available for Pi

Tue Feb 05, 2013 5:14 am

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 MausBerryCircuits@gmail.com

Here's the quick YouTube demo:
http://www.youtube.com/watch?v=0goSyz0_ ... e=youtu.be
photo 1 (2).JPG
photo 1 (2).JPG (56.21 KiB) Viewed 28272 times
Attachments
photo 2 (2).JPG
photo 2 (2).JPG (35.52 KiB) Viewed 28272 times

User avatar
cyrano
Posts: 713
Joined: Wed Dec 05, 2012 11:48 pm
Location: Belgium

Re: Power switch now available for Pi

Tue Feb 05, 2013 6:12 am

Nice!

I want one. Make that two!

mausberry
Posts: 13
Joined: Mon Feb 04, 2013 11:30 pm

Re: Power switch now available for Pi

Tue Feb 05, 2013 10:09 am

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 :)

bullwinkle
Posts: 117
Joined: Wed Jan 09, 2013 12:14 pm

Re: Power switch now available for Pi

Tue Feb 05, 2013 10:26 am

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 !!!

canibalimao
Posts: 556
Joined: Tue Aug 07, 2012 8:48 pm
Location: Portugal

Re: Power switch now available for Pi

Tue Feb 05, 2013 10:48 am

Nice work :D

Do you ship to Portugal?

mausberry
Posts: 13
Joined: Mon Feb 04, 2013 11:30 pm

Re: Power switch now available for Pi

Tue Feb 05, 2013 3:55 pm

Sure, I will ship to Portugal. I think USPS international would only be about $7 since this is such a light item

Bone
Posts: 14
Joined: Tue Feb 05, 2013 2:56 pm

Re: Power switch now available for Pi

Tue Feb 05, 2013 10:05 pm

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?

mongrol
Posts: 76
Joined: Wed Aug 01, 2012 2:43 am

Re: Power switch now available for Pi

Wed Feb 06, 2013 12:06 am

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.

mausberry
Posts: 13
Joined: Mon Feb 04, 2013 11:30 pm

Re: Power switch now available for Pi

Wed Feb 06, 2013 2:32 am

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.

Psychaotix
Posts: 7
Joined: Fri Jan 11, 2013 2:08 pm
Location: Barossa Valley, South Australia

Re: Power switch now available for Pi

Wed Feb 06, 2013 5:31 am

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... :D )

User avatar
Jim Manley
Posts: 1593
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: Power switch now available for Pi

Thu Feb 07, 2013 1:47 am

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! :D
"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!!!

mausberry
Posts: 13
Joined: Mon Feb 04, 2013 11:30 pm

Re: Power switch now available for Pi

Thu Feb 07, 2013 2:58 am

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

Bakul Shah
Posts: 297
Joined: Sun Sep 25, 2011 1:25 am

Re: Power switch now available for Pi

Thu Feb 07, 2013 5:52 pm

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
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.

SSilver2k2
Posts: 179
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
Contact: Website AOL

Re: Power switch now available for Pi

Thu Feb 07, 2013 9:51 pm

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

mausberry
Posts: 13
Joined: Mon Feb 04, 2013 11:30 pm

Re: Power switch now available for Pi

Fri Feb 08, 2013 7:47 pm

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.
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!

dempwn
Posts: 2
Joined: Thu Feb 07, 2013 3:16 pm

Re: Power switch now available for Pi

Sun Feb 10, 2013 6:11 am

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!

dempwn
Posts: 2
Joined: Thu Feb 07, 2013 3:16 pm

Re: Power switch now available for Pi

Mon Feb 11, 2013 1:42 am

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

mausberry
Posts: 13
Joined: Mon Feb 04, 2013 11:30 pm

Re: Power switch now available for Pi

Sat Feb 16, 2013 7:16 pm

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

SSilver2k2
Posts: 179
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
Contact: Website AOL

Re: Power switch now available for Pi

Sun Feb 17, 2013 12:53 am

Just pledged :)
My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet

++bahjatk++
Posts: 36
Joined: Sun Dec 30, 2012 10:02 am

Re: Power switch now available for Pi

Mon Feb 18, 2013 3:02 pm

LIST IT ON EBAY LIST IT ON EBAY!! PLEASE

Willup
Posts: 3
Joined: Mon Mar 11, 2013 2:00 pm

Re: Power switch now available for Pi

Mon Mar 11, 2013 2:05 pm

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

nalbion
Posts: 3
Joined: Sat Feb 09, 2013 6:43 am

Re: Power switch now available for Pi

Mon Mar 18, 2013 12:27 am

Hi Mausberry,

I sent you an email, I'd like to get one of these for the car.

jgauthier
Posts: 22
Joined: Thu Jun 14, 2012 2:40 pm

Re: Power switch now available for Pi

Sun Mar 24, 2013 1:00 am

Would you share which mosfet you are using to accomplish this?

rustek
Posts: 3
Joined: Tue Mar 26, 2013 2:03 pm

Re: Power switch now available for Pi

Tue Mar 26, 2013 2:13 pm

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

canibalimao
Posts: 556
Joined: Tue Aug 07, 2012 8:48 pm
Location: Portugal

Re: Power switch now available for Pi

Sat Mar 30, 2013 6:44 pm

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
That could corrupt your SD data, so don't do that. You should allways shut it down with safety.

Return to “General discussion”

Who is online

Users browsing this forum: Chris D, stubright and 76 guests