Place Logo Here
Posts: 2
Joined: Sat Jul 14, 2018 7:27 pm

Power Cable with switch

Sat Jul 14, 2018 7:41 pm

New poster here (hi!).

Have only had a pi (B+) for a couple of weeks now. I am running Retropie with only a Tankstick arcade controller and wired keyboard connected. I am using a case with a built-in fan. I have not enabled overclocking.

I have not had any issues with the official pi power supply, but that doesn't have a switch. Although I always shutdown the pi through the OS before unplugging, the unplugging/plugging is going to wear on that mini USB connection eventually. And I have to unplug it to power off the fan. Even if I was using a case without a fan (which I won't), I would have to unplug it and plug it back in to power it back up.

And now I am baffled by my inability to find a power cable with a switch that doesn't result in under power errors. I bought the only one carried by Micro Center and that one, unfortunately, does not come with the power supply (the end of the cable is USB). I went through 10+ power supplies in my attempts to get this to work and every one resulted in under power errors.

There are a great many types available through various online retailers, and every one I have seen has at least one review reporting under power errors.

Anybody here with a similar setup that has had success with a power cable with a switch? I am not looking to install a power button on my pi (1: I like the case I have and it will not accommodate one and 2: I am an idiot who barely got this working as it is).

Thanks!

drgeoff
Posts: 9876
Joined: Wed Jan 25, 2012 6:39 pm

Re: Power Cable with switch

Sat Jul 14, 2018 8:13 pm

Switch the AC mains supply to the PSU.

Place Logo Here
Posts: 2
Joined: Sat Jul 14, 2018 7:27 pm

Re: Power Cable with switch

Sat Jul 14, 2018 8:14 pm

Thanks for the reply, but I do not understand.

User avatar
DougieLawson
Posts: 36305
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Power Cable with switch

Sat Jul 14, 2018 8:17 pm

Switch it off at the wall socket.

Image
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

wildfire
Posts: 542
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Power Cable with switch

Sat Jul 14, 2018 8:22 pm

drgeoff wrote:
Sat Jul 14, 2018 8:13 pm
Switch the AC mains supply to the PSU.
This, although there are means to connect an on/off switch to the Pi (safely shutting down when powering off), if you are concerned with power consumption then removing power to the supply is the best method (obviously after shutting down).
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

klricks
Posts: 6609
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Power Cable with switch

Sat Jul 14, 2018 8:57 pm

Use a multi outlet power strip with power switch: https://www.amazon.com/AmazonBasics-6-O ... G77TBNAWWQ
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
HawaiianPi
Posts: 4717
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Power Cable with switch

Sun Jul 15, 2018 4:04 am

klricks wrote:
Sat Jul 14, 2018 8:57 pm
Use a multi outlet power strip with power switch: ...
I use a multi-outlet surge protector, but I don't necessarily want to shut everything off. They do make them with individual switches, but those cost a lot more (and I don't really need another surge protector). So I use something similar to this.
outlet_switch.png
outlet_switch.png (133.85 KiB) Viewed 1703 times

Just a single outlet switch you can add in between the power outlet/strip/surge protector and the Pi PSU.
Cost a little over 3 bucks at a local hardware store.

FYI: I had similar results when testing USB cables with switches.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

fruitoftheloom
Posts: 20900
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Power Cable with switch

Sun Jul 15, 2018 5:08 am

Place Logo Here wrote:
Sat Jul 14, 2018 7:41 pm
New poster here (hi!).

Have only had a pi (B+) for a couple of weeks now. I am running Retropie with only a Tankstick arcade controller and wired keyboard connected. I am using a case with a built-in fan. I have not enabled overclocking.

I have not had any issues with the official pi power supply, but that doesn't have a switch. Although I always shutdown the pi through the OS before unplugging, the unplugging/plugging is going to wear on that mini USB connection eventually. And I have to unplug it to power off the fan. Even if I was using a case without a fan (which I won't), I would have to unplug it and plug it back in to power it back up.

And now I am baffled by my inability to find a power cable with a switch that doesn't result in under power errors. I bought the only one carried by Micro Center and that one, unfortunately, does not come with the power supply (the end of the cable is USB). I went through 10+ power supplies in my attempts to get this to work and every one resulted in under power errors.

There are a great many types available through various online retailers, and every one I have seen has at least one review reporting under power errors.

Anybody here with a similar setup that has had success with a power cable with a switch? I am not looking to install a power button on my pi (1: I like the case I have and it will not accommodate one and 2: I am an idiot who barely got this working as it is).

Thanks!

http://www.uugear.com/witty-pi-realtime ... pberry-pi/
Retired disgracefully.....

ejolson
Posts: 3675
Joined: Tue Mar 18, 2014 11:47 am

Re: Power Cable with switch

Sun Jul 15, 2018 5:56 am

Place Logo Here wrote:
Sat Jul 14, 2018 7:41 pm
Anybody here with a similar setup that has had success with a power cable with a switch?
Welcome to the forum!

For a grounded plug in the States get something like this.

Image

User avatar
HawaiianPi
Posts: 4717
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Power Cable with switch

Sun Jul 15, 2018 6:31 am

ejolson wrote:
Sun Jul 15, 2018 5:56 am
For a grounded plug in the States get something like this.
LOL! I have one of those too (for something else).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
Imperf3kt
Posts: 2862
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Power Cable with switch

Sun Jul 15, 2018 7:39 pm

Why on earth would you require a grounded plug when the official power supply is double insulated? It doesn't need or even have a ground connection.
55:55:44:44:4C
52:4C:52:42:41

gkaiseril
Posts: 654
Joined: Mon Aug 08, 2016 9:27 pm
Location: Chicago, IL

Re: Power Cable with switch

Sun Jul 15, 2018 7:53 pm

Not all devices are double imsulated and the ones that are not double insultated are now required to be grounded. Also most building codes require at a minimum to have grounded outlets, unless wotin 15 feet of water and then the outlet needs to be GFCI. It is easier to make one device, switch, that can handle both grounded and non-grounded cords.
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.

User avatar
Imperf3kt
Posts: 2862
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Power Cable with switch

Sun Jul 15, 2018 9:31 pm

gkaiseril wrote:
Sun Jul 15, 2018 7:53 pm
Not all devices are double imsulated and the ones that are not double insultated are now required to be grounded. Also most building codes require at a minimum to have grounded outlets, unless wotin 15 feet of water and then the outlet needs to be GFCI. It is easier to make one device, switch, that can handle both grounded and non-grounded cords.
Yes thats true, but nobody is talking about 'other devices', they're talking about the Raspberry Pi official power supply.
I'm not sure what country you live in, but most new appliances sold where I am, are double insulated, it is actually harder to find a device that requires a ground connection than you may imagine.
55:55:44:44:4C
52:4C:52:42:41

ejolson
Posts: 3675
Joined: Tue Mar 18, 2014 11:47 am

Re: Power Cable with switch

Sun Jul 15, 2018 10:18 pm

Imperf3kt wrote:
Sun Jul 15, 2018 9:31 pm
Yes thats true, but nobody is talking about 'other devices', they're talking about the Raspberry Pi official power supply.
With the additional grounding pin the plug-in switch is less likely to fall out. Note that UK plugs always have three pins even if one is made of plastic.

User avatar
Imperf3kt
Posts: 2862
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Power Cable with switch

Sun Jul 15, 2018 10:28 pm

Must be a country specific thing then because in Australia, the official power supply only has two prongs.
55:55:44:44:4C
52:4C:52:42:41

User avatar
davidcoton
Posts: 4179
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Power Cable with switch

Sun Jul 15, 2018 10:50 pm

Imperf3kt wrote:
Sun Jul 15, 2018 10:28 pm
Must be a country specific thing then because in Australia, the official power supply only has two prongs.
It is. The UK standard required a shutter over the live socket holes, the earth (ground) pin is used to open the shutter. So the earth pin must be present. On moulded "Wall Wart" PSUs that are double insulated, the earth pin can be plastic. On other double insulated appliances, moulded plugs may have a plastic pin, but replacable plugs must have a metal pin.
Signature retired

gkaiseril
Posts: 654
Joined: Mon Aug 08, 2016 9:27 pm
Location: Chicago, IL

Re: Power Cable with switch

Mon Jul 16, 2018 12:03 am

I am from the U.S. and Chicago specifically. Chicago has its own electrical code that is far stricter than the National Electrical Code. I have purchased both Lenovo and Dell laptop computers within the last 3 years and both had 3 prong electrical plugs. Also I have brought tradesmen grade carpentry tools fro Festool that came with detachable 3 prong cords and from what I understand their EU models come with 3 prong cords. Also many commercial and industrial installations require more stringent electrical code than residential installations.
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.

User avatar
Burngate
Posts: 6045
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Power Cable with switch

Tue Sep 04, 2018 9:12 am

My favourite solution is something like https://www.toolstation.com/shop/p68523

It means I can power-up and -down the Pi and a monitor, hard drive, and my laptop separately in any order I like.
Though with only four sockets, I have to unplug something to fire up the soldering iron.

User avatar
davidcoton
Posts: 4179
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Power Cable with switch

Tue Sep 04, 2018 4:16 pm

Burngate wrote:
Tue Sep 04, 2018 9:12 am
Though with only four sockets, I have to unplug something to fire up the soldering iron.
That is actually quite a good idea. Since you know you really shouldn't do any (Pi related) soldering while the Pi is on, unplugging (rather than just switching off) is a Good Thing, with a positive impact on Mistake Prevention. Especially since you can't then leave the iron hot when you reconnect the Pi, removing the temptation to just reflow that one joint without switching off....
Signature retired

n67
Posts: 938
Joined: Mon Oct 30, 2017 4:55 pm

Re: Power Cable with switch

Tue Sep 04, 2018 5:00 pm

Actually, I think switches on power strips are a curse, because I'm always afraid my cat is going to walk on it and shut everything down.

I've resorted to putting tape over the switch to try to kitty-proof it, but, well, you know, cats are so creative.

Seriously, I'm doubtful about the advice being put forward in this thread - that it is better to switch the high voltage AC than to switch the 5VDC. Isn't it all around safer and easier to switch lower voltages?

(At least in theory. I can see practical reasons why the former problem might be more completely solved in practice)
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

User avatar
Burngate
Posts: 6045
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Power Cable with switch

Tue Sep 04, 2018 5:43 pm

n67 wrote:
Tue Sep 04, 2018 5:00 pm
Seriously, I'm doubtful about the advice being put forward in this thread - that it is better to switch the high voltage AC than to switch the 5VDC. Isn't it all around safer and easier to switch lower voltages?
"better" is a vague adjective, but I think, here, it means "give you fewer problems"

Mechanical switches tend not to be "binary" devices - either zero resistance or infinite - but rather go from somewhere close to zero Ohms up to many megOhms so long as you don't try to switch reactive loads.

For the Pi, the choice is switching ~2A at 5v DC or ~40mA at 240v AC

In the first case, a few hundredths of an Ohm in the switch will screw things up, royally - the 5v will drop and cause problems.

In the second, it would take quite a big resistance to cause the 240v to drop enough to upset the power supply following it.
Meanwhile, either the switch will have burnt up because of the heat, or arcing across the switch will have got rid of dust, dirt, and oxide, and the problem will have gone away!

Safety is another kettle of fish.
And a switch in the 5v path won't have gone through such intensive testing as one designed for a generic extension lead - that has to be able to withstand the gardener plugging in his chainsaw and switching it on and off.

ejolson
Posts: 3675
Joined: Tue Mar 18, 2014 11:47 am

Re: Power Cable with switch

Tue Sep 04, 2018 6:01 pm

n67 wrote:
Tue Sep 04, 2018 5:00 pm
Actually, I think switches on power strips are a curse, because I'm always afraid my cat is going to walk on it and shut everything down.
Have you ever considered whether cats are the curse?

User avatar
rpdom
Posts: 15360
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Power Cable with switch

Tue Sep 04, 2018 6:56 pm

n67 wrote:
Tue Sep 04, 2018 5:00 pm
Actually, I think switches on power strips are a curse, because I'm always afraid my cat is going to walk on it and shut everything down.
See? You've got the wrong pet. Ours can't flip the switches on power strips, even if they did escape their enclosures.
(currently 46 tarantulas of various types and sizes)

n67
Posts: 938
Joined: Mon Oct 30, 2017 4:55 pm

Re: Power Cable with switch

Tue Sep 04, 2018 7:00 pm

Ours can't flip the switches on power strips, even if they did escape their enclosures.
Well, there ya go. I guess everything has an upside.
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

User avatar
rpdom
Posts: 15360
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Power Cable with switch

Tue Sep 04, 2018 7:05 pm

n67 wrote:
Tue Sep 04, 2018 7:00 pm
Ours can't flip the switches on power strips, even if they did escape their enclosures.
Well, there ya go. I guess everything has an upside.
Actually, it was because of them (well, it was just the one at the time) that I started one of my Pi projects. It started out as just a simple temperature sensor/relay/heater to keep one small room at a reasonable temperature for the spider while we were away for a few days and grew to be a full heating control system for the house :-)

Return to “General discussion”