Page 1 of 1

Disable power for entire USB hub

Posted: Sun Feb 28, 2016 7:10 pm
by vinaykb.cs
Hi,

I am running
echo 0x01 > /sys/devices/platform/bcm2708_usb/bussuspend to turn power off to USB port on B+ model. Apparently the WLAN powers off but the other USB device which is connected to the USB port still draws current. Please suggest how do disable power from USB compeltely.

Thanks,
Vinay

Re: Disable power for entire USB hub

Posted: Tue Mar 01, 2016 3:19 am
by Goraxium
You may not like the answer... The +5V rail seems to be directly linked to the +5V USB output (at least on my A+).

The only thing I can suggest is that you get a short male to female USB lead, strip a section of the insulation off the middle (preferably without severing the wires inside), cut and strip the +5V wire (usually red), and put a NPN transistor in there, with the base pin hooked up to a GPIO pin (plus whatever resistors may be needed). You'll need to run a program on startup to trigger the transistor and start powering the USB cable (especially if you're using a wifi dongle / keyboard to communicate with the Pi), but it should give you what you want.

[EDIT]
If you don't care about the power ever getting to the hub, or anything else, ignore the transistor part, and just cut a section out of the +5V wire and tape it back up. I've done that before. You'll still need the other 3 to communicate though.

Re: Disable power for entire USB hub

Posted: Tue Mar 01, 2016 4:44 am
by klricks
vinaykb.cs wrote:Hi,

I am running
echo 0x01 > /sys/devices/platform/bcm2708_usb/bussuspend to turn power off to USB port on B+ model. Apparently the WLAN powers off but the other USB device which is connected to the USB port still draws current. Please suggest how do disable power from USB compeltely.

Thanks,
Vinay
The USB on the older B's and A+ is directly connected to the 5V rail however the USB on B+ & 2B and I assume 3B can be turned off according to this thread:
viewtopic.php?f=29&t=93463