Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I have the RPi B+. 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 wifi 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 wifi 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?

share|improve this question

5 Answers 5

up vote 6 down vote accepted

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).

share|improve this answer
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 at 5:33

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.

share|improve this answer

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.

share|improve this answer
    
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. –  ppumkin Jul 27 at 18:10
    
Great answer thanks, so will every port on a USB hub output 5V 500ma?? (USB 2.0) –  c_breeez Jul 30 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 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 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 at 14:21

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).

share|improve this answer
    
They removed the polyfuses in revision 3 (revisions list) to allow backfeeding from a USB hub. Unless you're referring to other fuses elsewhere? –  Bob Jul 27 at 11:27
    
@Bob the USB polyfuses may have been removed, but not the main power polyfuse, which limits the total current. –  Milliways Jul 27 at 11:31
    
Ah, right, thanks. –  Bob Jul 27 at 11:36

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.