# On Off shim - possible to shut off power to usb hub?

**URL:** https://forums.pimoroni.com/t/on-off-shim-possible-to-shut-off-power-to-usb-hub/8280
**Category:** Support
**Created:** [August 5, 2018, 4:34pm UTC](https://forums.pimoroni.com/t/on-off-shim-possible-to-shut-off-power-to-usb-hub/8280 "2018-08-05T16:34:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![andi.manuel](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@andi.manuel](https://forums.pimoroni.com/u/andi.manuel)
#### Post date: [August 5, 2018, 4:34pm UTC](https://forums.pimoroni.com/t/on-off-shim-possible-to-shut-off-power-to-usb-hub/8280/1 "2018-08-05T16:34:52Z")

</div>

Hi there,

I’m running a Pi0 and other gadgets from a powered USB hub. Can I use the On Off shim to cut the power to the USB hub, to turn off (and on) everything by pressing the button?  
Thinking about connecting the power supply to the shim, then wire the 5v and gnd outs on the shim to the power connector on the hub.  
Don’t have one yet, just considering whether it’ll work.

Thanks!

---

<div class="post-metadata">

### Author: ![Caperjack1953](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/caperjack1953/32/7923_2.png) [@Caperjack1953](https://forums.pimoroni.com/u/Caperjack1953)
#### Post date: [August 5, 2018, 7:19pm UTC](https://forums.pimoroni.com/t/on-off-shim-possible-to-shut-off-power-to-usb-hub/8280/2 "2018-08-05T19:19:52Z")

</div>

im no expert ,but i do own a on off ship and i almost sure it will not do the trick …  
i would suggest one of these ,i use them ,that price is a crazy amazon price they are only a couple of bucks at a home depo or electronics store

> **[Robot Check](https://www.amazon.ca/BindMaster-Grounded-Single-Adapter-Indicator/dp/B01M7V6U2Q/ref=pd_lpo_sbs_469_t_2?_encoding=UTF8&psc=1&refRID=EE79CPCZW1896G7V4PND)**

---

<div class="post-metadata">

### Author: ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)
#### Post date: [August 6, 2018, 12:23pm UTC](https://forums.pimoroni.com/t/on-off-shim-possible-to-shut-off-power-to-usb-hub/8280/3 "2018-08-06T12:23:30Z")

</div>

_only_ if either:

a) The USB hub is powered _from_ the Pi (which is what you seem to be suggesting)

or

b) The USB hub is well designed and cuts power to all peripherals when no upstream data connection is present (some do, some don’t YMMV)

Depending on what you want to power on the USB bus, you might be better off going with option “b”- an external USB hub with its own power supply that toggles power off/on depending on whether the host is on. (I have a couple of hubs that do this)

---

<div class="post-metadata">

### Author: ![andi.manuel](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@andi.manuel](https://forums.pimoroni.com/u/andi.manuel)
#### Post date: [August 11, 2018, 6:06pm UTC](https://forums.pimoroni.com/t/on-off-shim-possible-to-shut-off-power-to-usb-hub/8280/4 "2018-08-11T18:06:31Z")

</div>

Thanks for your replies!

I guess I wasn’t exactly clear on what I wanted to do: Power the Pi and the peripherals from the hub, and cut the power to the hub when the button on the shim is pressed.  
I got a shim in the meantime, just tried it, and it worked!  
Wired up as in this pic:

 ![IMG_20180811_195416199-01](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/f/fb782c21d4523e37b2cf4ebc700cfd278e6aef84.jpeg)

---

<div class="post-metadata">

### Author: ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)
#### Post date: [August 12, 2018, 9:06am UTC](https://forums.pimoroni.com/t/on-off-shim-possible-to-shut-off-power-to-usb-hub/8280/5 "2018-08-12T09:06:41Z")

</div>

OOoooh! Now I understand.

You’re bonkers in the best kind of way. Great little hack!
