Page 1 of 1

Pi naughtily leeching power...

Posted: Thu May 17, 2012 4:52 pm
by FollowingGhosts
So, I was just setting up my Pi, with it plugged into a keyboard with built in hub that also plugged into my USB PSU so the keyboard wasn't being powered by the Pi. I pulled the Micro USB out of the Pi to kill it because it needed moving, but it was still powered through the USB A port. I yanked it out, but it seems to be able to suck power through the USB A port to power the board, I don't dare test this further, but it's intriguing all the same.

Re: Pi naughtily leeching power...

Posted: Thu May 17, 2012 5:29 pm
by theunit
I don't quite understand the setup you have got there.

In my powered USB hub there is a diode connecting the DC in V+ and the USB in V+. This stops the hub from sucking current from the RP if the DC in voltage drops. However, it does not stop the RP from drawing current from the hub if there is no voltage from the RP.

This shouldn't cause a problem as basically the hub is supplying +5V where there should be +5V. Some people have claimed that their RP actually boots up from this power.

Re: Pi naughtily leeching power...

Posted: Thu May 17, 2012 5:32 pm
by FollowingGhosts
Yep, that's what my Pi was doing, it was drawing power from the hub it was connected to. But isn't this going to circumvent some of the power protection circuitry, seeing as the power is going "the wrong way"? And the polyfuses would overheat..or at least, I'd expect them to.

Re: Pi naughtily leeching power...

Posted: Thu May 17, 2012 5:44 pm
by hippy
FollowingGhosts wrote:But isn't this going to circumvent some of the power protection circuitry
Yes, but probably not in a dangerous way. All the power the R-Pi SoC and everything else needs will be coming through a USB fuse rather than the inlet fuse so it could, and likely eventually will, trip that fuse. The rest of the protection circuitry is on the internal +5V rail and will act the same whether power comes through the power inlet, a USB port or GPIO power pins.

Re: Pi naughtily leeching power...

Posted: Thu May 17, 2012 5:47 pm
by FollowingGhosts
IIRC the USB fuse is around 140mA and the Pi power draw is at least twice that, so it won't be doing your polyfuse any favours.

Re: Pi naughtily leeching power...

Posted: Thu May 17, 2012 6:40 pm
by theunit
FollowingGhosts wrote:IIRC the USB fuse is around 140mA and the Pi power draw is at least twice that, so it won't be doing your polyfuse any favours.
Surely the polyfuses must be able to cope with that? A standard USB device can draw 500ma which is more than the RP draws.

Re: Pi naughtily leeching power...

Posted: Thu May 17, 2012 6:49 pm
by tufty
theunit wrote:Surely the polyfuses must be able to cope with that? A standard USB device can draw 500ma which is more than the RP draws.
No. A standard USB device can negotiate with a host and ask it to supply them with 500mA. The host is perfectly within its rights to refuse. In the case of teh Pi, it won't even negotiate. 140mA is all you get (at best).

Re: Pi naughtily leeching power...

Posted: Thu May 17, 2012 7:33 pm
by FollowingGhosts
So, to get the Pi and my USB HDD to be friends at power off, would the USB connection still work if I sever the power connection but leave data lines intact?w

Re: Pi naughtily leeching power...

Posted: Fri May 18, 2012 8:47 am
by bredman
A lot of people have resorted to breaking the red (5v) wire in the cable from the RPi to the USB hub. This seems to solve problems of current leaking in both directions.

Re: Pi naughtily leeching power...

Posted: Fri May 18, 2012 10:04 am
by Flitzpiepe
FollowingGhosts wrote:So, to get the Pi and my USB HDD to be friends at power off, would the USB connection still work if I sever the power connection but leave data lines intact?w
Only kill the +5V - GND should keep connected.
But i suggest on the long run it should be fixed in hardware with diode or fet switch.

Rgds

Jonas

Re: Pi naughtily leeching power...

Posted: Fri May 18, 2012 11:41 am
by Gert van Loo
We had had more reports like this. ("When I plug in the HUB my 5V in the Raspberry-Pi increases"). In principle the HUB should NOT output power on the slave port. But it seems a lot of HUBs still do so. Even the diode is wrong. Basically a USB slave port should only take power, it should never provide power.

Re: Pi naughtily leeching power...

Posted: Fri May 18, 2012 12:10 pm
by FollowingGhosts
The problem is, standards are only as good as the company following them.
I've severed the power line now and the Pi is running happily, the USB cable is too, which is always nice.
Thanks for the help

Re: Pi naughtily leeching power...

Posted: Fri May 18, 2012 12:33 pm
by Flitzpiepe
Gert van Loo wrote:We had had more reports like this. ("When I plug in the HUB my 5V in the Raspberry-Pi increases"). In principle the HUB should NOT output power on the slave port. But it seems a lot of HUBs still do so. Even the diode is wrong. Basically a USB slave port should only take power, it should never provide power.
Building PCs myself, i assure you - specifications are only for the good guys - especially USB standard is not followed very often. Normally (if you have to follow UL rules) there would be a power switch for USB voltage to prevent too high current draw - these are backdriving safe.
Also have eyes on DDC channel from HDMI/DVI - there are also some backdriving paths you should have an eye on.

Rgds

Jonas

Re: Pi naughtily leeching power...

Posted: Fri May 18, 2012 2:06 pm
by mahjongg
If the R-PI is powered both via the USB output port AND via plugging in the R-PI's power cable into an output port of the HUB, then both are fed with exactly the same voltage from the powered HUB to begin with, but the input through the RPI's USB input port will "see" several ohms more than direct route through the real power input, which will only be a fraction of an ohm, lets say 0.1 Ohm, (but it will probably be less for a reasonable cable)..

In this case the current distribution will be inversely proportional to the two "series resistors", (the resistance of the route the polyfuse, versus the resistance of the power cable) so if one is 5 Ohm, and the other 0.1 Ohm, the "direct route" will take 50 times more current than the indirect route!, at 400 mA typical this means that less than 10mA runs through the USB polyfuses.

Conclusion, this setup won't be able to trip the USB polyfuse.



As at 400mA the input resistance of the PI' 5V power input is 5/0.4 = 12.5 Ohm, so that brings into perspective how relevant the 5 Ohms of the polyfuse are.