Page 1 of 2

Power Cable with switch

Posted: Sat Jul 14, 2018 7:41 pm
by Place Logo Here
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!

Re: Power Cable with switch

Posted: Sat Jul 14, 2018 8:13 pm
by drgeoff
Switch the AC mains supply to the PSU.

Re: Power Cable with switch

Posted: Sat Jul 14, 2018 8:14 pm
by Place Logo Here
Thanks for the reply, but I do not understand.

Re: Power Cable with switch

Posted: Sat Jul 14, 2018 8:17 pm
by DougieLawson
Switch it off at the wall socket.

Image

Re: Power Cable with switch

Posted: Sat Jul 14, 2018 8:22 pm
by wildfire
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).

Re: Power Cable with switch

Posted: Sat Jul 14, 2018 8:57 pm
by klricks
Use a multi outlet power strip with power switch: https://www.amazon.com/AmazonBasics-6-O ... G77TBNAWWQ

Re: Power Cable with switch

Posted: Sun Jul 15, 2018 4:04 am
by HawaiianPi
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 1706 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.

Re: Power Cable with switch

Posted: Sun Jul 15, 2018 5:08 am
by fruitoftheloom
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/

Re: Power Cable with switch

Posted: Sun Jul 15, 2018 5:56 am
by ejolson
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

Re: Power Cable with switch

Posted: Sun Jul 15, 2018 6:31 am
by HawaiianPi
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).

Re: Power Cable with switch

Posted: Sun Jul 15, 2018 7:39 pm
by Imperf3kt
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.

Re: Power Cable with switch

Posted: Sun Jul 15, 2018 7:53 pm
by gkaiseril
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.

Re: Power Cable with switch

Posted: Sun Jul 15, 2018 9:31 pm
by Imperf3kt
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.

Re: Power Cable with switch

Posted: Sun Jul 15, 2018 10:18 pm
by ejolson
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.

Re: Power Cable with switch

Posted: Sun Jul 15, 2018 10:28 pm
by Imperf3kt
Must be a country specific thing then because in Australia, the official power supply only has two prongs.

Re: Power Cable with switch

Posted: Sun Jul 15, 2018 10:50 pm
by davidcoton
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.

Re: Power Cable with switch

Posted: Mon Jul 16, 2018 12:03 am
by gkaiseril
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.

Re: Power Cable with switch

Posted: Tue Sep 04, 2018 9:12 am
by Burngate
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.

Re: Power Cable with switch

Posted: Tue Sep 04, 2018 4:16 pm
by davidcoton
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....

Re: Power Cable with switch

Posted: Tue Sep 04, 2018 5:00 pm
by n67
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)

Re: Power Cable with switch

Posted: Tue Sep 04, 2018 5:43 pm
by Burngate
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.

Re: Power Cable with switch

Posted: Tue Sep 04, 2018 6:01 pm
by ejolson
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?

Re: Power Cable with switch

Posted: Tue Sep 04, 2018 6:56 pm
by rpdom
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)

Re: Power Cable with switch

Posted: Tue Sep 04, 2018 7:00 pm
by n67
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.

Re: Power Cable with switch

Posted: Tue Sep 04, 2018 7:05 pm
by rpdom
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 :-)