2

I have a Raspberry Pi 3 with an On/Off Shim from Pimoroni. If you're not familiar: it's basically a little device that gets soldered onto the first 12 GPIO pins and allows you to use a built-in (or external) momentary power button to turn the Pi on or off. I've used them quite a bit, they work great.

However this particular Pi has a powered USB hub plugged into it, which I need for 2 USB webcams and comm. with a 3D Printer .

When the Shim cuts power to the Pi, the Pi actually still remains powered (i.e. red LED on Pi remains on, and I have an LED on a 3v3/ground GPIO pin that remains on, too) - but I'm guessing it's too little, because the Pi isn't operational and the Shim won't cause the Pi to "snap out of it" when it tries to provide power again.

I have to unplug the Pi and the USB hub and replug them in to get it to work again. This applies to shutdowns and usually reboots (I think it has worked a few times, though).

Is there anything I can do to make the Pi ignore the power that is provided from the USB hub?

(tl;dr; pertinent info is bold)

Thanks

EDIT: I have an open question on the Pimoroni forums. The suggestion there is to just snip the 5v wires from the USB to only use the data lines. I got some spare USB cables, so no biggy if it doesn't work. Will report back shortly.

  • This is a bit confusing because USB hubs generally have a special connection for the host (marked with a red dot here) which, if the hub has its own power, really should have no power in it, and I'd bet because of that most of them aren't so connected (i.e., there's no wire on the + terminal to start with). Otherwise, this is a bit like a device that tries to provide power to the host instead of vice versa, which would be a very bad thing and no one would intentionally make such a product. – goldilocks Jan 2 '18 at 14:00
4

Theoretically it is impossible to backpower a PI3 (or other modern models).

However tests by a member indicate that if the Pi is powered on, it will remain powered through the hub.

This is arguably a bug in the Pi (actually a consequence of the very simple USB interface, which is a long way from being standards compliant).

There is no "fix", other than using a properly designed hub (which SHOULD NOT supply more than 150mA without negotiation, or NONE to upstream ports).

There is a potential "solution" to include a diode (ideally a Schottky diode or "ideal diode") in the cable.

You can just cut the 5V line in the USB cable, if there is no need to power the hub from the Pi.

  • do we actually need the +5V line, since both sides are powered anyway? Maybe instead of a diode you can just cut it. – Christian Jan 2 '18 at 9:42
  • @Christian, I do believe I need the powered hub in order to power the 2 USB cameras - although I don't necessarily NEED 2 cameras, and one could probably be powered off the Pi. I had some weird issues when I attempted to run both off the Pi before (I don't recall what exactly - it was over a year ago). – Adam Plocher Jan 2 '18 at 10:30
  • Thank you Milliways, that is very interesting. It definitely acts weird, like a bug, or unintentional behavior. From what I can tell, the only way to recover from it is powering off both devices (pi and hub). I will look into another hub and/or the diode you mentioned. I will leave the question open for other suggestions but it sounds like you're familiar with it and I'll be happy to mark the answer shortly. Thanks again! – Adam Plocher Jan 2 '18 at 10:33
  • @AdamPlocher I meant cutting the 5V line between the hub and the pi, not the Hubs power supply – Christian Jan 2 '18 at 11:42
  • Ahh sorry misread that. That makes sense :) - so I did try cutting 5v/red and it's behaving differently now. It proceeds to shutdown and looks like all power is cut for about half a second (no LEDs) and then it boots back up right away. Tried with and without the black wire (ground) connected (not sure if it matters), but it behaved the same way in both cases. Any idea what might cause that? – Adam Plocher Jan 2 '18 at 12:07
3

Thanks to gadgetoid and niko over on the Pimoroni forums it seems the fix was twofold:

  1. Cut the 5v+ wire on the USB cable (assuming you're powering it separately than the Pi)
  2. Add a 1k resistor between pins 1 and 9 on the Pi's GPIO (3v3 and GND)

There is more info about individual hub models here. Mine is the Belkin F5U404 Hi-Speed USB 2.0 4-Port Mobile Hub which they note as being: Faulty/bad design; Leaks current back up the cable to the Raspberry Pi.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.