arsenale
Posts: 8
Joined: Mon Jul 01, 2013 9:49 pm

on off switch

Mon Jul 01, 2013 9:54 pm

I would like to be able to power on the raspberry pi using a switch.
There is no case that comes with a button, so I'm looking for a usb cable with a on - off switch

http://barbedwirebytecodebaconburger.co ... witch-mod/

Does anyone have a product to suggest?
I've seen many usb hubs, but they are expensive and made by shady brands, and generally only available on ebay!

thanks

sprinkmeier
Posts: 410
Joined: Mon Feb 04, 2013 10:48 am
Contact: Website

Re: on off switch

Tue Jul 02, 2013 7:46 am

A switch like this would power off the Pi abrubpty. Eventually you'll nuke your SD card doing that...

Look for some of the projects here using the GPIO pins as power/reset buttons.
Pins 5 and 6 are ideal (one is ground, one is tied high, all you need is a pushbutton switch!)

arsenale
Posts: 8
Joined: Mon Jul 01, 2013 9:49 pm

Re: on off switch

Tue Jul 02, 2013 8:41 am

A switch like this would power off the Pi abrubpty. Eventually you'll nuke your SD card doing that...
Thanks for your clarification, anyway I alwasy use "sudo poweroff" command, so switching it off isn't a problem.
Do you think that in this cable, used only to power on the raspberry, there is something wrong?
http://barbedwirebytecodebaconburger.co ... witch-mod/

User avatar
piglet
Posts: 900
Joined: Sat Aug 27, 2011 1:16 pm

Re: on off switch

Tue Jul 02, 2013 9:53 am


teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: on off switch

Tue Jul 02, 2013 10:50 am

That guy has to be making a killing for $20 bucks a pop. I'd be interested to see a premade case with one of those built in.

arsenale
Posts: 8
Joined: Mon Jul 01, 2013 9:49 pm

Re: on off switch

Wed Jul 03, 2013 10:27 am

piglet wrote:This might be of interest to you: http://www.kickstarter.com/projects/131 ... spberry-pi
Yes, I knew about that, but I'm not intersted since it costs more thant the raspberry.... :-)

ChocolatePi
Posts: 2
Joined: Thu Jul 04, 2013 1:07 pm

Re: on off switch

Thu Jul 04, 2013 1:11 pm

arsenale wrote:
Yes, I knew about that, but I'm not intersted since it costs more thant the raspberry.... :-)
No, A is $25 and B is $35. Add the cost of the SD card, and it's around $6 more for each.... So no, it doesn't cost more than the Pi itself.

arsenale
Posts: 8
Joined: Mon Jul 01, 2013 9:49 pm

Re: on off switch

Fri Jul 05, 2013 7:45 pm

ChocolatePi wrote:
arsenale wrote:
Yes, I knew about that, but I'm not intersted since it costs more thant the raspberry.... :-)
No, A is $25 and B is $35. Add the cost of the SD card, and it's around $6 more for each.... So no, it doesn't cost more than the Pi itself.
We live in different countries.

NicoLoco
Posts: 3
Joined: Sat Jul 06, 2013 1:52 pm

Re: on off switch

Sat Jul 06, 2013 2:36 pm

FYI I just posted a description of how I integrated a ON button in a basic element 14 case: http://www.raspberrypi.org/phpBB3/viewt ... 40&t=49213

shawaj
Posts: 113
Joined: Wed Oct 03, 2012 3:36 am

Re: on off switch

Sun Jul 28, 2013 2:31 pm

Hi,

We have a kit available here - http://www.pi-supply.com/product/pi-sup ... er-switch/

This is also available open source as a schematic and gerber files both from http://www.pi-supply.com/downloads%20our%20website and from http://www.thingiverse.com/thing:79136%20Thingiverse

Hope that helps - let me know if you need any further help.

Cheers
Support The MagPi by purchasing printed copies from one of our retailers - http://themagpi.com/en/buy

Please share with anyone who is interested!

johnporter29
Posts: 3
Joined: Tue Jul 09, 2013 9:12 pm

Re: on off switch

Sun Jul 28, 2013 4:58 pm

arsenale wrote:
A switch like this would power off the Pi abrubpty. Eventually you'll nuke your SD card doing that...
Thanks for your clarification, anyway I alwasy use "sudo poweroff" command, so switching it off isn't a problem.
Do you think that in this cable, used only to power on the raspberry, there is something wrong?
http://barbedwirebytecodebaconburger.co ... witch-mod/
Just to clarify that I have just created a cable like the one in the above URL and it works a treat. You shutdown the PI before flicking the switch though.
-- John

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: on off switch

Sun Jul 28, 2013 5:09 pm

I wish to point out (again!) two salient facts:

1) If an on/off switch were really necessary, it'd have been included in the base hardware. This is pretty standard accepted fact in all things relating to computer hardware.

2) The need for an on-off switch is looking at the wrong end of the problem. What we need (and which I sincerely believe is possible; I'm a little surprised that no one has taken up my suggestion to implement and publicize a solution) is a version of the OS that doesn't self-destruct when power is removed. Basically, this would be done by making the OS read-only and/or in RAM.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

RaspberryPaul
Posts: 12
Joined: Fri Jul 26, 2013 12:01 am

Re: on off switch

Wed Jul 31, 2013 2:13 am

Unfortunately, an ON/OFF switch with a software method for safely powering down the RPi really is needed, and isn't part of the package. Here's a schematic for a good soft power switch. You'll also need a Python script to recognize a GPIO interrupt, shut down processes, then issue a GPIO signal back to the hardware switch to turn off the power.

badrobot
Posts: 15
Joined: Tue Aug 06, 2013 4:33 pm

Re: on off switch

Tue Aug 06, 2013 4:53 pm

I was lucky to have a spare remote control switch and that ia what I use with my Ras-Pi. My Ras-Pi is plugged in to the wall using a spare iPad charger. After "sudo-halt" command, I just click the switch and I am done.

It looks like this:
switch.jpg
switch.jpg (11.3 KiB) Viewed 118919 times

User avatar
Gerrelt
Posts: 294
Joined: Sat Nov 10, 2012 9:01 am

Re: on off switch

Sun Aug 11, 2013 3:05 pm

Joe Schmoe wrote: 2) The need for an on-off switch is looking at the wrong end of the problem. What we need (and which I sincerely believe is possible; I'm a little surprised that no one has taken up my suggestion to implement and publicize a solution) is a version of the OS that doesn't self-destruct when power is removed. Basically, this would be done by making the OS read-only and/or in RAM.
Look at TinyCore, that does exacty what you describe.
my Raspberry Pi page: http://raspberry.gerrelt.nl

neilf
Posts: 72
Joined: Sun Nov 11, 2012 8:14 am

Re: on off switch

Sun Aug 11, 2013 8:08 pm

I added an onboard miniature on/off switch to all my boards as soon as I got them a year ago. There was no need for a cutout in the case as I mount my Pis in wafer cases so that I can get at all the GPIOs.

I couldn't imagine using a Pi without an on/off switch now - it's so convenient. Mind you, I mostly run RISC OS which is very easy and quick to shut down (two clicks :D ).
Attachments
wireside.jpg
Wiring side of switch.
wireside.jpg (56.13 KiB) Viewed 118620 times
capside.jpg
Cap side of switch
capside.jpg (43.56 KiB) Viewed 118620 times

madnico
Posts: 10
Joined: Tue Sep 17, 2013 7:48 am

Tue Sep 17, 2013 1:50 pm

Hi

I made a ON/OFF circuit with flip-flop, transistor and triac. You push a button to start the Pi, and then you shutdown the Pi (by sudo halt command) the circuit detect low level trigger on a GPIO and switch off the power supply. You can see (in french) the project here: http://forum.madeinfr.org/topic/43/raspower/.

Sorry for my english.
Bye

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: on off switch

Wed Sep 25, 2013 6:36 am

I posted this already, but I think it's quite an elegant design.

http://www.mosaic-industries.com/embedd ... controller

madnico
Posts: 10
Joined: Tue Sep 17, 2013 7:48 am

Wed Sep 25, 2013 7:52 am

Yes your circuit is very elegant and you can shutdown the PI by long pressing the ON button. It's very usefull ! Good job.
Just one thing, in your circuit, the transformer still powered...not with mine ;) .

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

Re: on off switch

Wed Sep 25, 2013 1:25 pm

ame wrote:I posted this already, but I think it's quite an elegant design.

http://www.mosaic-industries.com/embedd ... controller
Hello
i am interested in this solution. Do you have a breadboard photo of the setup you could share?
i am a a newbie on skematics so they are a little difficult to understand.
thanks

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: on off switch

Wed Sep 25, 2013 1:30 pm

Sorry, it's not my design. I found it and posted it here as I thought it might be useful to someone.

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: on off switch

Wed Sep 25, 2013 1:39 pm

neilf wrote:I added an onboard miniature on/off switch to all my boards as soon as I got them a year ago. There was no need for a cutout in the case as I mount my Pis in wafer cases so that I can get at all the GPIOs.

I couldn't imagine using a Pi without an on/off switch now - it's so convenient. Mind you, I mostly run RISC OS which is very easy and quick to shut down (two clicks :D ).
wow, I like it. you got instructions on how to attach that switch?
dan3008 wrote:Pays your money, takes your choice

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: on off switch

Wed Sep 25, 2013 2:53 pm

neilf wrote:I added an onboard miniature on/off switch to all my boards as soon as I got them a year ago. There was no need for a cutout in the case as I mount my Pis in wafer cases so that I can get at all the GPIOs.

I couldn't imagine using a Pi without an on/off switch now - it's so convenient. Mind you, I mostly run RISC OS which is very easy and quick to shut down (two clicks :D ).
I like that, nice and easy.
I'm assuming you had to cut something to make it do that ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

neilf
Posts: 72
Joined: Sun Nov 11, 2012 8:14 am

Re: on off switch

Sun Oct 06, 2013 8:13 pm

SirLagz wrote: I like that, nice and easy.
I'm assuming you had to cut something to make it do that ?
Yes, you have to cut one track. Rather, you have to scrape gently until you scratch just through the track and then stop. It's a multi-layer board so you have to proceed carefully, but it's not difficult if you're used to hacking micro boards.

You can just see the cut at the end of the red cable if you view the first shot full size. I did four of these switched boards - they take about an hour each to complete - and the resultant ease and convenience has been well worth it.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12021
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: on off switch

Sun Oct 06, 2013 10:37 pm

Gerrelt wrote:
Joe Schmoe wrote: 2) The need for an on-off switch is looking at the wrong end of the problem. What we need (and which I sincerely believe is possible; I'm a little surprised that no one has taken up my suggestion to implement and publicize a solution) is a version of the OS that doesn't self-destruct when power is removed. Basically, this would be done by making the OS read-only and/or in RAM.
Look at TinyCore, that does exacty what you describe.
IMHO its not powering off the PI that destroys the card, so it has nothing to do with the OS, or in fact with any software, its actually the card itself that will damage its own flash filing system when you suddenly remove power while it happens to be writing to flash, or worse, shifting data around because of its "wear leveling" mechanisms. However if you can minimize the number of times data is actually written to the SD-card you can minimize the risk.

Return to “Other projects”