7

I have the Raspberry Pi B+, and it has four USB ports.

At the moment I am powering an Arduino Mega, a small RFID reader and a keyboard. I plan to also power a Wi-Fi dongle and an Arduino Uno.

Will this just work? I mean it does work. But I was wondering why people use powered USB hubs. I heard some people say Wi-Fi dongles sometimes need a powered USB hub to have good range.

Essentially, what are the advantages of a powered USB hub? and should I get one for my use situation?

Peter Mortensen
  • 2,004
  • 2
  • 15
  • 18
c_breeez
  • 213
  • 1
  • 2
  • 6

5 Answers5

8

There are a few factors to consider here:

  • The power input to your Pi is probably through a wall adapter or PSU. You should check the rating of the adapter/PSU. If it is in the range of 1.5A to 2A, then your problem is partially solved.
  • Next in play, is the polyfuse and regulator on board the Pi. As per specifications on Adafruit, the B+ can handle upto 2A of current. In the model B, this was closer to 1A to 1.2A which was insufficient to power a USB hub, depending on number of devices connected.
  • Then, come your actual USB devices. The power utilization varies by a lot depending on what you are using. The power usages of some common devices are:
Wired Keyboards  50 - 150 mA
Wired Mice       Upto 50 mA
Wifi Adapters    100 to 250 mA     (May be even more variable)
Sound Cards      Upto 100 mA
Pi Camera        250 mA 
Arduino Uno      30 mA to 500 mA   (The upper limit in this case is due 
                                    to USB 2.0 restrictions)
Arduino Mega     40 mA to 500 mA   (Has a polyfuse that prevents higher 
                                    current draw when powered using USB)
RFID Readers     20 mA and higher  (This can vary a lot depending on technology,
                                    current standards, and operating settings of 
                                    the device)

So, you need to know the power characteristics of all your peripherals to estimate whether you need a powered hub or not. If power/current input is greater than power/current requirement, then you do not need a powered hub.

Current Input = Wall Adapter Rating (Max 2A for the B+)
Current Required = Sum of Current Needs of all devices + 700 mA (For the Pi itself)

I have used current and power interchangeably in this post as all USB devices operate at 5V, which is equal to the supply voltage.

If you know the power rating of you device, and do not know the current rating, you can quite easily perform the conversion.

P = V * I

In the case of USB devices, V will be 5V. So, the current rating becomes:

I = P / 5

In your specific case, my estimation would be:

Current Input = 1A to 1.2A  (if you did not purchase a higher rated adapter with the B+)

Current Required = Keyboard + Wifi + Uno + Mega + RFID + Pi
                 = 100 + 100 + 200 + 200 + 20 + 700 (Taking conservative values)
                 = 1320 mA

So, you will need a powered USB hub (if your power adapter is rated at <1.2A).

asheeshr
  • 246
  • 2
  • 9
  • 1
    I am not totally sure of the current ratings of the B+. If anybody has accurate numbers, please update this post along with your reference. – asheeshr Jul 27 '14 at 05:33
5

My opinion is that, yes you should. Especially since you are powering an Arduino and a WiFi dongle.

The reason why some often you need a power USB hub is because the RPi itself doesn't have enough juice to power a lot of high amp devices. I have a webcam attached to mine with a Bluetooth dongle and without my hub, the dongle doesn't allow devices to connect to it.

The advantages to having one is that you can be confident that if you have a problem with devices, that it is not a power problem. (I read on a forum, where someone fired their board because of power being drawn, i doubt it) Often, dongles need a certain current to work properly or to their best.

I would recommend you buy one, but if everything works and you have no problems then great. But when you power things that need more amps with your Arduino or you decided to use the GPIO, it is good to have the Hub to put less stress on the RPi and for it to be Consisting powered and reliable.

Rguarascia
  • 190
  • 1
  • 1
  • 7
3

The USB 2.0 specification allows a device to request up to 500mA on a standard usb 2.0 port (although many allow for "charging" ports with higher current).

the Pi cannot supply 500mA on even a single USB port, much less the 4 that it has, so it's very easy to request more power than the Pi can supply, which is where a powered USB hub comes in.

In addition to allowing the Pi to power multiple devices, USB hubs also output the same 5v and high current that the Pi needs to power itself, providing a convenient way to power the Pi, which makes them even more popular.

user2813274
  • 1,289
  • 1
  • 12
  • 22
  • Yea its a shame the new B+ does not have a dedicated power track going to the USB ports with the advantage of using a 4A power pack. Then USB would just bloody work properly. – Piotr Kula Jul 27 '14 at 18:10
  • Great answer thanks, so will every port on a USB hub output 5V 500ma?? (USB 2.0) – c_breeez Jul 30 '14 at 14:08
  • @c_breeez they should be able to, however that is a maximum, not a minimum, and not all devices can support it - for example any usb hub that is not powered can't support it, since it only receives a max of 500ma from the host, and it splits that amongst multiple ports – user2813274 Jul 30 '14 at 14:11
  • But in theory a powered one should support 5V 500ma to each port? The one ive bought is powered but has a 5V 2a PSU and 7 ports. Will it be able to provide 5V 500ma consistently to each. Sorry about nagging questions, just wondering whether to use an external psu on my arduino or just power if off the hub – c_breeez Jul 30 '14 at 14:14
  • @c_breeez The total power your hub has available is 2A = 4x 500mA + 500mA (from host), so 2.5A which is enough to power 5 ports - luckily most devices don't draw a full 500mA, but some may need to, in which case your hub won't be able to support them on all it's ports at the same time. – user2813274 Jul 30 '14 at 14:21
  • Awesome thanks for the help and patience. Great job explaining. By host do you mean the pc the hub is connected to? In my case rpi b+. Thanks again for your time – c_breeez Jul 30 '14 at 14:22
  • @c_breeez - if the devices attached to the hub are used by your Pi, then the Pi is the host, however the Pi is a poor host that cannot supply 500mA on it's usb ports, so drop the above numbers accordingly - also drop another 1A if your pi is being powered by the usb hub, leaving you 1A of power for your USB devices - which is still enough for most things, just not tons of things like portable hard drives that are usb-powered – user2813274 Jul 30 '14 at 14:26
  • Thanks alot brilliant answers. Cleared a lot up for me, im powering lots of stuff of a hub, i think i might run my arduinos of dc power pack to save some power for other things. Thanks – c_breeez Jul 30 '14 at 14:28
2

Provided you have a good PSU you don't need one with the B+.
The earlier Pi Model B had limited current. There is a ~1A polyfuse, which meant that only 1A - current needed by Pi (~700mA) was available.

The B+ can supply 600mA (more if re-configured).

Milliways
  • 59,890
  • 31
  • 101
  • 209
2

To improve on Some Random User's post:

First off: That's 5 devices. A Pi, even a B+, can't handle that many - only 4 ports. Moving on.

The Model B Pi has regulators (as Milliways mentioned, ~1A polyfuse) that will kill the Pi to protect the circuitry if a surge of power is detected.

Hot-plugging (plugging in a USB device while the host device is running) will cause a sudden jump in current requested, which often will trip these regulators. However, those regulators also control the flow of power, causing there not to be enough power for both running the Pi and powering the USB ports.

This is a known issue, at least with the Model B. You're using the Model B+, which has a new power circuit which is much more efficient and saves ~.5A - 1A so you can now supply more power to the USB ports and crashing your Pi via power surges is much less on an issue.

However, as you are already doing connecting one Arduino and a Mega at that (as well as an RFID tag, I agree with Some Random User. You're gonna need the extra power a powered (powered being key here, otherwise you're still just drawing from the Pi) hub can provide if you want to run 5 devices.

The devices may still run, but they probably won't be getting the full power they need, so they will probably end up running below average, if they don't crash out-right.

RPiAwesomeness
  • 3,001
  • 4
  • 30
  • 51