I have a Raspberry Pi 3B, a powered USB hub, and an external USB drive. The HDD is connected to the Hub, and the Hub to a power outlet. But going from the Pi, do I really need 2 cables (one for power, going into the micro-USB plug, and another from a big USB to the hub-disk) ? I tried with just the micro USB (to the hub) but the HDD is not detected, and I read somewhere that the Pi's micro USB is "power only".
-
That is correct the Pi's micro USB connector is designed to supply power to the Pi, there are no data lines from the connector. Although it is possible to power the Pi through the GPIO pins. For transferring data you are limited to the USB ports, Ethernet port, or you could use the Pi 3's built-in Bluetooth.– Darth Vader ♦Commented Jul 30, 2016 at 13:06
3 Answers
going from the Pi, do I really need 2 cables (one for power, going into the micro-USB plug, and another from a big USB to the hub-disk)?
Yes, but contra the other answers this doesn't have to do with the nature of the Pi's microUSB connector, it has to do with the way USB hubs in general work. Even if that microUSB connector did accept data, it could not be used for power and hosting at the same time (OTG connections can, but they are a special case).
This is because USB hubs normally have one special connector which is the data uplink connection to the host they are to be used with. The reason there's only one is because you can use a hub to connect multiple slave devices to one master, but not to multiple masters. I.e., you cannot connect a drive to a hub, your desktop to a hub, and your laptop to a hub and access the drive from both computers.
In fact, naively trying to do so might damage the computers, since the USB master-slave relationship is not symmetrical. The issue damage wise is that masters may provide power to slaves but not vice versa. If you try to hook up two computers using the normal ports on a USB hub, the hub will try and power the computer and the computer will try and power the hub. One of the voltage regulators will win and circuitry on the opposite side may then get damaged (which may perhaps lead to damage on both sides).
So the connection from a normal port on the hub to the microUSB power jack on the Pi provides power. You can "backpower" at least some pis (perhaps only older models, I'm not sure) via the normal USB jacks, but this is a risky idea. Further, if you do that, you still won't be connected to the drive because a slave does not connect to a slave on the same hub. Only the master does, and again, there is only one of those.
Generally the data uplink port will be a nonstandard size connector on the hub. There is a picture here with explanation of how this is supposed to be set up. The data uplink cable is the one with red dots. Notice it does not connect to a normal port on the hub.
Make sure you do that properly or again, there is the possibility of damaging the pi and/or the hub.
-
Before that, I thought things were somehow symmetrical, but your master/slave explanations make a lot of sense now ! Actually this is enforced by hardware to a degree, with male vs female USB plugs. This is what prevented me from mis-plugging the 2nd cable: the hub indeed has a special uplink port, and I HAD to use it, lacking a male/male cable.– GnurfosCommented Jul 30, 2016 at 18:27
If this will work at all you need 2 cables. It MAY work with some hubs, but a compliant hub will not supply sufficient current to run the Pi reliably and most non-compliant hubs supply too low voltage.
-
I have been running the Pi (without the HDD) for some time powered from the hub, so it seems "compliant-ish" so far. I'm not sure I understand your reply: are you saying "it MAY work" with just one cable ? Or commenting on powering the Pi from a hub, even with 2 cables ?– GnurfosCommented Jul 30, 2016 at 12:54
-
You need both cables.
I disagree with Milliways statement that it may work with some hubs - the Pi 3's micro USB connector is definitely power only. If you take a look at the 'POWER IN' section of the Pi 3's schematics, in the top left corner of the diagram, you can see that the middle three pins (Data +, Data -, and USB OTG ID) aren't connected to anything.
There is absolutely no way that anything other than power can be transmitted through that connector.
-
And from the regular size USB ports, you can power the Pi but not on startup, from what I read ?– GnurfosCommented Jul 30, 2016 at 13:10
-
-
Even if the pi's microUSB jack took data, you cannot power via a master connection -- masters power slaves and not vice versa, so if you connected the jack as a master to receive data from slave devices on the hub, it would not receive power to turn on the pi. This is a good reason for the jack to be power only; otherwise you'd be encouraging people to backpower via the pins and use that as a data link. OTG connections allow power to a pseudo-master (as with the Pi Zero, and smart phones), but then you need a special hub and to decide what role the Pi is going to play.– goldilocks ♦Commented Jul 30, 2016 at 14:08
-
@goobering the comment "may work with some hubs" is because some hubs have no power control and just provide 5V, so you can draw as much current as the PSU is capable of. My experience with these is, however, that they do not always give 5V. My guess is that they just use diodes for isolation. My answer said "If this will work at all you need 2 cables" and never claimed there was data. Commented Jul 30, 2016 at 23:25