3
\$\begingroup\$

I have a Raspberry Pi and it requires a Externally Powered USB hub to run Portable HDD on it. So what if I connect +5 and GND port of the USB Client to external power source of 5V-1A directly rather then connecting them to the USB Host ? OR What if I use a transistor as a switch and for source isolation ? Will this work or not ? Or Do I have to give power to D+ and D- ports too ?

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
3
\$\begingroup\$

Connect the data lines from the USB port to the device, connect the ground of the external power supply to the USB ground and connect the external supply positive line to the device side USB supply only

Here is one example that shown the described connection scheme using a linear regulator as power source (limited to 1A that may not be enough) but you can use any 5v source.

enter image description here


In order to switch the power of the USB client when the plug is removed you can use a mosfet that turns on when the plug is inserted to the PC.

When there is no Vcc voltage in the base of the transistor the resistor R1 works as a pullup and keeps the mosfet off by keeping the gate high.
When the plug is inserted the PC side Vcc is applied to the base of the transistor so the current that flows through it creates a voltage drop across R1 and turns on the mosfet.

Note that the mosfet should be a logic level type that turns fully on with -5v Vgs.
Also the input should not exceed the max allowable Vgs (usually 20v but this is absolute max)

enter image description here


Another alternative is when a switching regulator is used that has a control pin, in that case the PC side Vcc supply can be used as a signal to turn the regulator on when the USB plug is connected.
The following schematic (I've modified the USB plugs slightly) shows such an example using a 1A switching regulator but the same principle applies to switching regulators of higher current.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Can you explain how does this work ? I didn't get why connecting D+ but not Vcc and GND to external power ? \$\endgroup\$ – Parth Parikh Dec 29 '13 at 11:19
  • \$\begingroup\$ @ParthParikh D+ and D- are the data lines, they transfer all the data between the device and PC. On the other hand the Vcc of the PC USB plug is just a power source so instead of getting the power from the PC you connect your own power supply. The ground connection is needed so that all devices have a common reference point (the PC, the device and the external power supply). \$\endgroup\$ – alexan_e Dec 29 '13 at 11:23
  • \$\begingroup\$ @ParthParikh I just noticed that the schematic is messed up, give me a minute to correct it. \$\endgroup\$ – alexan_e Dec 29 '13 at 11:25
  • \$\begingroup\$ This might be on the web, but it is nonsense. The pin names are non-standard, but assuming - and + mean the D- and D+ data pins, it makes no sense to supply power to D+! My best guess is that the author confuses the + and VCC pins. (And note that 1A with 7V drop means 7W: get a sizeable heatsink for the 7805!!) \$\endgroup\$ – Wouter van Ooijen Dec 29 '13 at 11:27
  • \$\begingroup\$ @WoutervanOoijen You are absolutely right, I was just searching for a relevant schematic that showed what I was describing and didn't notice that the shown connections were wrong. I have removed the linked article and updated with a schematic I made using a linear regulator as an example but surely an external supply using a switching regulator would be more efficient. \$\endgroup\$ – alexan_e Dec 29 '13 at 11:36

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.