MrNice
Posts: 72
Joined: Thu Oct 17, 2013 10:18 am

RPi2 USB current output specifications

Fri Feb 05, 2016 12:29 pm

HI,

I run Kodi on my RPi2B with a 2TB Samsung 2.5" USB connected.
When I play some HD audio files, I get drops every few minutes.
I tested with other HD, powered hub, there is no drop.
In config.txt, max_usb_current=1 is set.
USB specification with max_usb_current=1 is 1200 mA, 4.75V mini (5.00V +-5%)

After lot of trys, I did some measurements on the Pi2, booted on Kodi but not playing, nothing else plugged in the USB ports:
Pi without load: => PP1/PP5= 5.3V
Pi with USB load= 730 mA => PP1/PP5= 5.1V - USB voltage= 4.8V (resistor ~ 6.6 ohms)
Pi with USB load= 1110 mA => PP1/PP5= 5.0V - USB voltage= 4.6V
I don't have more resistors to test with other values.
Conclusion:
The power supply is good,
The Pi is out of specification.

Is there someone who did the same measurement?

Edit: More test
With max_usb_current=0
Pi with USB load~ 6.6 ohms => PP1/PP5= 5.3V - USB voltage= 0.2 to 0.4V

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5578
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: RPi2 USB current output specifications

Sat Feb 06, 2016 1:20 pm

MrNice wrote: ...
After lot of trys, I did some measurements on the Pi2, booted on Kodi but not playing, nothing else plugged in the USB ports:
Pi without load: => PP1/PP5= 5.3V
Pi with USB load= 730 mA => PP1/PP5= 5.1V - USB voltage= 4.8V (resistor ~ 6.6 ohms)
Pi with USB load= 1110 mA => PP1/PP5= 5.0V - USB voltage= 4.6V
I don't have more resistors to test with other values.
...
Edit: More test
With max_usb_current=0
Pi with USB load~ 6.6 ohms => PP1/PP5= 5.3V - USB voltage= 0.2 to 0.4V
How did you measure the "USB load current"? (Ie. what with?).
Whilst I haven't measured the loading behaviour of any Pi's USB ports directly, FWIW, you may find these tests of various powered USB hubs of interest (esp. the "extended tests" one set of which was using a model B2 Pi):
http://www.cpmspectrepi.webspace.virgin ... st_Results
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Scraph
Posts: 22
Joined: Fri Feb 05, 2016 1:39 am

Re: RPi2 USB current output specifications

Sat Feb 06, 2016 2:53 pm

< redacted due to being based on wrong documentation >
Last edited by Scraph on Sat Feb 06, 2016 3:33 pm, edited 1 time in total.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi2 USB current output specifications

Sat Feb 06, 2016 3:17 pm

You're looking at the wrong schematic Scraph, that's the old Model B Rev 2 not Model 2B.

The schematics for the 2B haven't been published, but Burngate (afaicr) buzzed out the circuit some time back. It uses a single 2553 current limit switch, with selectable (by GPIO pin) 600/1200mA min output trip shared by all four ports.

Edit: viewtopic.php?f=29&t=126925&p=850190&hi ... nt#p850190

MrNice
Posts: 72
Joined: Thu Oct 17, 2013 10:18 am

Re: RPi2 USB current output specifications

Sat Feb 06, 2016 8:17 pm

To be accurate:
I have a multimeter Fluke 79 (last calibration long time ago, this is why I write only 1 decimal digit)
For 730mA I have few resistors in parallel total around 6.6 ohms
For 1110mA I did a constant current limiter with a LM317.
For the both I first did a current measurement to check the value (current meter in serial) then in a second step took the voltage.
I have only few resistors values and can't adjust to 600 nor 1200mA.

This link is also valuable
http://hackaday.com/2015/04/06/more-pow ... usb-ports/

Tomorrow, I'll test again audio with 1 USB connected to RPi for signal and another connected to a power supply for the 5V (1 female and 2 males, Y USB cable I'll make with large section wire).

Do you have the possibility to check the same current output from your RPi2?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5578
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: RPi2 USB current output specifications

Sat Feb 06, 2016 8:39 pm

Two additional points to consider:
The 600mA/1200mA current limits are "shared" between the four ports.
When only a single port is in use it's not clear (to me) from other USB hub behaviour/specs. (in general) that more than ~500mA will be available without some "driver negotiation". Cheap "powered hubs" appear to have all their ports (power rails) wired in parallel and can rely on the external PSU to provide any current limiting**. Or, to put it another way, "passive loading" may not be a good (enough) test.
Trev.
** eg. the Sweex hub & PSU here:
posting.php?mode=reply&f=29&t=135214
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi2 USB current output specifications

Sat Feb 06, 2016 9:02 pm

@FTG it seems common to ignore the negotiation re USB power requirements & just plumb all inserted devices in to the USB Vbus unregulated. Same goes for any Pi with 4 USB ports - they all get 600/1200mA nominal whether or not they request 100mA only.

That 600/1200mA figure for the Pi could do with some of your methodical investigation. I suspect from reading the 2553 datasheet that there may be less brownout headroom than the Pi2's designers had intended: 2000mA polyfuse less 1200mA USb = 800mA for the SoC + Camera. Seems plenty. But that 1200mA could be up to 1400mA according to the 2553 datasheet, leaving just 600mA for the 2836 + camera on a Pi2.

User avatar
Burngate
Posts: 6284
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: RPi2 USB current output specifications

Sun Feb 07, 2016 5:08 pm

Sorry to but in.

Just taking one of your results - 1110mA, you're seeing 0.4v drop from the test-points to your measurement point.
My calculator makes that 360 m-ohms

The AP2553 datasheet has (typical) 70mΩ, max around 150mΩ, so somewhere there's 200 - 300mΩ un-accounted for.
Is it possible that some of that is the USB cable if you're using one, and contact resistance in the plug/socket?

MrNice
Posts: 72
Joined: Thu Oct 17, 2013 10:18 am

Re: RPi2 USB current output specifications

Mon Feb 08, 2016 11:48 am

@Burngat. I didn't think about that, you are right. However with a SOT26 package Switch On-Resistance is Typ 70, Max 135 m-ohms.

So I did the measurement again with more test points.
No load
PP1-PP5 (input voltage) = 5.31V
PP48/49/50/51- +V (USB pins on the board) = 5.26V
With load 1110 mA
PP1-PP5 (input voltage) = 5.00V
PP48/49/50/51- +V (USB pins on the board) = 4.71V
Male USB connector (solder wire points) = 4.67V
On wires (same as in my previous post) = 4.65V

Comment: All the USB +-V points are in parallel
Maths
Wire/connectors drop => 4.71-4.65=0.06 => 0.06/1.11= 54 m-ohms
Inside Pi drop => 5.00-4.71=0.29V => 0.29/1.11=261 m-ohms
Whatever the output voltage, the current will be 1110mA, less than the supposed limitation, so I should have a potential difference max: 0.135*1.11=150 m-ohms.
So I understand that the supposed limit is not 1.2A but less. It should be interesting to see the graphic Vout=f(current out) around the limit. How quick is the bend?
Is my RPi out of specification or is the usual behaviour? Where I could ask other people to do the same tests?

I did other tests:
Hardware:
Power supply APPLE Model 1399. 5V, 1A USB output
Enclosure ORICO 2.5" USB3 output type USB3.0 micro-B (2 of them n1 and n2)
2 USB cables type micro-B to type A
HD Samsung 2TB 2.5" ref ST2000LM003
HD Toshiba 120GB 2.5" ref MK1237GSX HDD2D62
Y USB cable home made: 1 female to male1 with +-V only large cross-section wire, male2 with +-data and -V
RPi2 powered with NorthPada Power supply 5V 2A (not relevant in the bellow tests)

Tests:
PS APPLE:
No load 5.08V, @1110 mA 4.94 V
Enclosure n1 with Samsung
Whirling, not playing 5.04V
Playing 5.01V and every 6-7 seconds drop to 4.98V. This is what I can see but not sure how low the voltage goes for short time. I don't have a scope.
Audio drops happen every few minutes always when the voltage drops.
Enclosure n2 with Samsung
Whirling, not playing 5.04V
Playing 5.04V and every 6-7 seconds drop to 5.01V.
Less audio drops than with enclosure n1

Enclosure n1 with Toshiba
Whirling, not playing 5.04V
Playing 5.01V I can't see any voltage drop
NO audio drop
Enclosure n2 with Toshiba
Whirling, not playing 5.04V
Playing 5.04V I can't see any voltage drop
NO audio drop

At this point I can say that Samung HD takes more than Toshiba
Enclosure n1 takes more than n2

Test to confirm:
Power supply Sitecom Model WN10U-050 connector round from USB hub
No load 5.26V
@1110 mA 5.16V
Enclosure n1 with Samsung (the worse couple)
Whirling, not playing 5.24V
Playing 5.24V and every 6-7 seconds drop to 5.20V.
NO audio drop

Conclusion:
My objective is to use RPi without powered hub with the 2TB Samsung HD. Right now I can't.
To reach to this goal:
Or my RPi is out of spec and I can change it under guarantee
Or I try the hack in the above link (add a resistor // to R4) and I'll lost the guarantee

Please I need you comments, ideas and if you can the some tests with load.
Many thanks

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi2 USB current output specifications

Mon Feb 08, 2016 12:22 pm

If you take a look at page 10 of the AP2553 datasheet you'll see that without accounting for Rlim component tolerance, there's around 200mA variation from part to part in the current trip. When last I looked at this I suspected the variation was north of 1200mA, but I may be wrong and it's south of it.

Edited to add: Rlim is 39k, or half that for the higher current limit: viewtopic.php?f=63&t=100423&p=860316&hi ... ic#p698682

MrNice
Posts: 72
Joined: Thu Oct 17, 2013 10:18 am

Re: RPi2 USB current output specifications

Mon Feb 08, 2016 1:31 pm

Thanks for this info gregeric

With the formula I find I limit Min 1184 mA. With the graphic, not clear, I find 965 mA.
So my Pi is between, I can't argue for that.

So I could add a resistor // R4: (formula)
75K => 1476 mA
68K => 1507 mA
Is 500 mA for the Pi2 itself enough?
But what about the poly fuse in the input current? What is the current limit and voltage drop?

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi2 USB current output specifications

Mon Feb 08, 2016 2:04 pm

Just done the sums again. With Rlim=19.5k, Imin=1184mA, Imax=1370mA, Ityp=1278mA so north of 1200mA as I recalled. The graph's a bit fuzzy, can't read values off that. A variation in component tolerance could account for a lower limit, but I don't think you've found your trip current value yet, the supply will be cut, not droop.

Your PSU's regulation seems poor, or the cable not so good?

As your proposed mods as to whether 500mA is enough for the Pi2 itself, that depends on what you are doing with it eg heavy cpu+gpu usage, camera attached etc.

MrNice
Posts: 72
Joined: Thu Oct 17, 2013 10:18 am

Re: RPi2 USB current output specifications

Mon Feb 08, 2016 2:21 pm

The APPLE power supply was only for the previous measurement. The power supply I use for the RPi is NorthPada 5V 2A:
Pi without load: => PP1/PP5= 5.3V
Pi with USB load= 730 mA => PP1/PP5= 5.1V - USB voltage= 4.8V (resistor ~ 6.6 ohms)
Pi with USB load= 1110 mA => PP1/PP5= 5.0V - USB voltage= 4.6V
Just good I think
I use the RPi just as media player with wifi USB and FLIRC +HD, nothing else.

Right now I don't know what could be the behaviour of the poly fuse. The guy in this page says the limit is 700mA.
http://www.megahard.pro/blog/raspberryw ... waredesign.
Do you have any info on this component?

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi2 USB current output specifications

Mon Feb 08, 2016 2:32 pm

I assume it's a 2A rated part, and that the RPi2 power is similar to that of the B+: https://www.raspberrypi.org/documentati ... matics.pdf

You'll have to find the ds of some similar fuse to see how its resistance varies with load.

MrNice
Posts: 72
Joined: Thu Oct 17, 2013 10:18 am

Re: RPi2 USB current output specifications

Sat Feb 13, 2016 3:25 pm

Hi,

I did more measurements.

I added a 82 kohms // to R4. Not easy to do and I'd not recommend to do that with a solder iron that I used...
With the results, I'd guess I have hardly 100 mA more available in the USB spec, 5V +-5%
I was not expecting the same curve for the two R lim. Loss of voltage is the same... so very small gain in current at 4.75 V.
I have a sheet with values but I don't know what extension is allowed, not csv, txt, xls :?

Now I will test playing.

MrNice
Posts: 72
Joined: Thu Oct 17, 2013 10:18 am

Re: RPi2 USB current output specifications

Thu Feb 18, 2016 3:29 pm

As it is not possible to add an attachment in this forum, I copy the values in a code tag, so you can import in a spreadsheet and draw the graphics.

Code: Select all

	R lim = 19.5 ohms				R lim = 15.7 ohms			
Load (mA)	PP1-PP5 (V)	PP1-PP35 (V)	USB pins	USB outside connector	PP1-PP5 (V)	PP1-PP35 (V)	USB pins	USB outside connector
0	5.31		5.26		5.31		5.26	
192	5.26	5.24	5.17	5.17	5.26	5.24	5.18	5.17
316	5.23	5.20	5.11	5.10	5.23	5.20	5.11	5.10
337	5.22	5.19	5.10	5.09	5.22	5.19	5.10	5.09
374	5.21	5.18	5.08	5.07	5.21	5.18	5.09	5.07
412	5.19	5.16	5.06	5.05	5.20	5.17	5.07	5.05
454	5.18	5.15	5.04	5.03	5.19	5.16	5.05	5.03
557	5.15	5.12	4.99	4.98	5.15	5.12	5.00	4.98
632	5.14	5.09	4.96	4.94	5.14	5.09	4.96	4.94
716	5.10	5.05	4.92	4.89	5.11	5.07	4.92	4.89
778			4.88	4.86	5.09	5.05	4.89	4.86
839	5.06	5.02	4.85	4.83	5.08	5.03	4.86	4.83
897	5.05	5.00	4.82	4.80	5.06	5.01	4.83	4.80
920	5.05	5.00	4.82	4.79	5.06	5.00	4.82	4.78
976	5.02	4.96	4.79	4.76	5.04	4.98	4.79	4.76
1070	4.99	4.94	4.74	4.71	5.01	4.95	4.74	4.70
1113	4.99	4.92	4.69	4.66	5.00	4.94	4.73	4.68
1121	4.99	4.92	4.69	4.65				
1141	4.99	4.92	4.66	4.61				
1149	4.95	4.91	4.64	4.49	4.99	4.92	4.70	4.63
1166	5.28	5.27	0	0	4.98	4.92	4.69	4.63
1238	5.28	5.27	0	0	4.97	4.90	4.67	4.62
1302	5.28	5.27	0	0	4.95	4.87	4.63	4.56
1364	5.28	5.27	0	0	4.92	4.84	4.58	4.50
1425	5.28	5.27	0	0	5.28	5.27	0	0
1446	5.28	5.27	0	0	5.28	5.27	0	0
there are tab as delimiter between values.
No current gain at 4.75V. It doesn't worth to hack the Pi even with a smaller resistor, the voltage drop will be more important.
There is an oscillation between 0 and ~4.5V when the output drops.

Have a look and add your comments.

DaedalusMWProject
Posts: 1
Joined: Thu Feb 18, 2016 4:47 am

Re: RPi2 USB current output specifications

Thu Feb 18, 2016 3:36 pm

For What Its Worth:

When I was doing my preliminary setups for my ADAQ Pi, I went through the obligatory power study on the board (2B+). Knowing that 3.3v is easily influenced regardless of the circuit and likely has an equally narrow tolerance for it, I resolved early on to isolate it when possible. Running naked at full MIP rates, these were my observations:

1. Raspi is sensitive to cable length. Any wires you use should be short as possible. Power, NIC, Video - everything with wires.
2. Any data bursting on any port (especially SD writes) spikes internal buses - you aren't going to see that with a typical multimeter. As a result, any readings you see are only valid under a sustained load condition. If you want this thing to perform, you have got to feed it properly.
3. Power requirements are different for SD Cards. I setup for high speed, high density cards and noticed an immediate voltage change - not much but then when one begins plugging stuff in, it all adds up.
I ended the setup this way:
3A Switching power supply - adjusted to 5.223V feeds the mUSB power port.
Raspi runs itself, a 3.3v RTC and GPIO buffers. Nothing else. USB Hub, HDMI 7", Arduino and a row of PICs are independently powered.
Retransmits across a number of ports dropped to zero when Raspi earned a metal case.
There are timing issues on the USB; it is running perfectly at 1.1 Specs for me. A number of USB components on the market spend way too much time polling. When the included WiFi dongle was in the hub but not connected to a network, Raspi would hang execution on the WiFi poll. Easy answer - if your not using it - remove it.

Hardware ringout succeeded. Performance is flawless. Hat tip to the Foundation - good numbers are hard to find these days.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi2 USB current output specifications

Thu Feb 18, 2016 4:41 pm

Hi - I graphed the figures out, looks like your power supply + cable has an equivalent resistance of ~0.3 Ohm, with the Pi's USB power train adding another 0.26 Ohm.

I agree, not much point bumping up the current trip level as it is. Do you have other PSU's with better regulation & cables with lower resistance to try?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5578
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: RPi2 USB current output specifications

Thu Feb 18, 2016 5:56 pm

gregeric wrote:Hi - I graphed the figures out, looks like your power supply + cable has an equivalent resistance of ~0.3 Ohm
...
Which is fairly typical of most PSU/Powerbank + (short) cable combinations:
http://www.cpmspectrepi.webspace.virgin ... plies.html
http://www.cpmspectrepi.webspace.virgin ... dPSUs.html
http://www.cpmspectrepi.webspace.virgin ... 2FChargers
The "Official PSU" appears to be somewhat better at 0.2 ohms (including its long cable):
http://www.cpmspectrepi.webspace.virgin ... _Models.29
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

MrNice
Posts: 72
Joined: Thu Oct 17, 2013 10:18 am

Re: RPi2 USB current output specifications

Fri Feb 19, 2016 11:12 am

You are right, gregeric, my PSU is a bit low under load, but still in the spec, almost are the same however this is the only parameter we can change.
I agree, "Official PSU" could be better.

Back to the original point.
I had audio drops when playing Kodi.
With the hack I still had the drops, I am not surprised.
But I was advised to use a software workaround:
Add advancedsettings.xml with <buffermode>1</buffermode>
See http://kodi.wiki/view/HOW-TO:Modify_the_video_cache
And now every music file plays fine, no drop ... and no need to hack :D
I'll keep the 82Kohms // R4, I don't want to touch the hardware again.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi2 USB current output specifications

Fri Feb 19, 2016 11:29 am

Glad you found a solution. It's been a worthwhile exercise anyway.

Seems the ideal power supply for the Pi would be one supplying 5V0 unloaded, & with an internal resistance of -0.26 Ohm (ie output voltage rises slightly with load) so that the voltage at the USB ports was close to 5V0 whatever the current drawn.

MrNice
Posts: 72
Joined: Thu Oct 17, 2013 10:18 am

Re: RPi2 USB current output specifications

Sun Feb 21, 2016 1:54 pm

Hi,

I got 3 PSU, Samsung Travel adapter with USB female connector:
A) Model: ETA-U90JWE, 5.0V 2.0A
B) Model: ETA-U90EBE, 5.0V 2.0A
C) Model: EP-TA10HWE, 5.3V 2.0A

and a bunch of USB cables.
I did some measures on the PSU alone:
Output voltage at an opened male connector with load:

Code: Select all

Load R	(A@5V)	A	B	C
0	0	5.10	5.11	5.33
40	0.125	5.20	5.20	5.35
20	.250	5.21	5.20	5.36
10	.5	5.35	5.27	5.39
5	1	5.42	5.35	5.35
3.33	1.50	5.53	5.47	5.56
2.5	2	5.67	5.60	5.62
2	2.5	4.64	4.78	4.68
These PSU are very good, voltage doesn't drop, however maybe a bit too hight, 5.67 max @2A at worst.
One cable is 1m long with 23AWGx2C and 30AWGx2C. If I count 200 mohms (2 connectors and cable), I have at worst
0.1V drop @0.5A so 5.29V
0.2V drop @1A, so 5.22V
0.3V drop @1.5A so 5.26V
0.4V drop @2A so 5.27V
Maybe the worst is when Pi is idle, min current so 5.35V.

I had a look at https://learn.adafruit.com/introducing- ... wer-supply for the RPi B+.
If the RPi2 has the same power regulation, it could be good.

Is it save to use them with the RPi2?
Any more info, any real use?

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi2 USB current output specifications

Sun Feb 21, 2016 2:50 pm

Factor in that you'll drop some voltage in the cable from PSU to Pi - I'd be happy to use any of those with my RPi2.

User avatar
davidcoton
Posts: 4879
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: RPi2 USB current output specifications

Sun Feb 21, 2016 4:24 pm

The specification for the Pi is 5V+/- 5%, which is 4.75--5.25V.
Your adaptor C is permanently above that range (until you exceed its 2A rating). This might damage your Pi, I would not use it though you might think the risk is acceptable.
The other two are not bad at low currents, but the regulators over-compensate above 0.5A (A) and 1.0A (B). Therefore I would not use A, and I would be cautious with B -- make sure that the cable losses are enough to keep the voltage at the Pi within specification. This will depend on the actual load on your system. Back up your calculation with actual measurement (BTW, how well is your meter calibrated?) Over voltage would be expected to reduce the life of the Pi, but whether that is significant, WJDK. Obviously, the higher the voltage, the quicker the damage.
Signature retired

MrNice
Posts: 72
Joined: Thu Oct 17, 2013 10:18 am

Re: RPi2 USB current output specifications

Sun Feb 21, 2016 4:47 pm

In this case better to use a thin cable.
Calibration of my Fluke 79 has been done loooonnng time ago, I'd say 20 years! :oops:

So still a bit hesitant, but I'll do some measures with the B

@gregeric
If you have a friend working in housekeeping in a hotel, there are plenty in lost and found, never claimed. :D

Return to “Advanced users”