User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: USB Port Current Boost (solved)

Tue Sep 04, 2012 8:29 pm

I haven't seen anyone post this during the discussion, but the reason that an HDD won't run properly directly through one USB port on an unmodified Pi, but will through a powered USB hub port, is because an HDD has a motor. A motor is a piece of wire essentially shorting the power bus at startup/stall, but the impedance increases until a steady RPM is achieved. At that point, current draw is reduced to its minimum, modulo small current pulses due to the head actuator servo moving the heads. The instantaneous current draw of an HDD at power-up can easily put it in a state where it can't complete its internal startup sequence if a computer (the Pi) is also drawing significant current.

Although I haven't seen any reports of direct-connected HDDs keeping a Pi from booting, that wouldn't surprise me, either, as the HDD startup current can cause boot problems in other devices. At TiVo, where we could have up to two 5.25-inch high-capacity hard drives pulling amps of current at startup of a digital video recorder (DVR), the motherboard is designed to delay bootup for a number of seconds until the drives reach "cruise" RPM. That also allowed us to use a power supply with much lower current capacity, which translates to less expensive components and lower overall product cost, as well as increased reliability/lifespan due to reduced power consumption and heat generation.

For those who may be wondering why I haven't chimed in on this thread much earlier, I'm already on record many months ago about how important an adequate power source is to system stability and strongly recommended using a powered USB hub for any devices more electrically complex than low-end wired keyboard, mice, trackpads, etc. While the mods are interesting, they clearly violate the original intent of the Pi and I'm not sympathetic to people insisting that they should be able to plug just any kind of USB device into the on-board ports. See the end of the previous paragraph about reliability/lifespan, power consumption, and heat generation as to why this may prove to be a long-term issue (it may take months or years, but reduced lifespan is reduced lifespan).
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

Saulverde
Posts: 15
Joined: Fri Aug 17, 2012 12:18 am

Re: USB Port Current Boost (solved)

Wed Sep 05, 2012 3:40 pm

is there a downside to just laying a bridge of solder over the top of the polyfuses? I'm not that great at soldering and I find this much easier than trying to solder a small jumper in the space.

I could use a longer wire and make it easier but it looks more noticeably sloppy that way.

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

Re: USB Port Current Boost (solved)

Wed Sep 05, 2012 4:11 pm

I find it difficult to bridge a big item such as these with just solder.
Try bending a thin piece of wire an inch or so long, so that it reaches the solder on either end of the fuse, and long enough that you've got something to grab hold of. Solder one end to the fuse, then the other, then chop off the extra length

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: USB Port Current Boost (solved)

Thu Sep 06, 2012 5:28 am

Pretty much the same as @Burngate used.
I use a several inch piece of jumper wire. Strip more wire than I need. Hold it atop one side of the polyfuse. Lay some solder on top of the end of the polyfuse first. Solder the free end into place. Now cut the other end loose from the rest of the wire and solder that down on the other end. This works as a jumper over the polyfuses. I removed the polyfuse and used this method, but it is the same practice to just go over top of the fuses. Exactly the same effect.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

User avatar
Ed Raket
Posts: 164
Joined: Mon Apr 30, 2012 4:28 pm

Re: USB Port Current Boost (solved)

Thu Sep 06, 2012 7:35 am

I found that bridging the polyfuses with 0-Ohm links (copperwire), makes the Pi reboot when hotplug'in a Edimax wifi adapter, wich means it won't install anymore with MrEngman's brilliant script. I replaced the copperwire with 1-Ohm resistors, and all works well. So the hotplugg'in coused a powersurge that reset's the Pi, if the Capicitator between the fuses was a lot larger than this would probably be pevented. So my advice to you all would be to use 1-Ohm resistors to bridge the polyfuses ;)

p.s.
Can anyone with 0-Ohm links confirm these hotplug problems? then it could be noted wiki-wise.

User avatar
Montala
Posts: 675
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)

Re: USB Port Current Boost (solved)

Thu Sep 06, 2012 7:54 am

I think we have to be careful not to jump to any quick conclusions, or make any incorrect assumptions here.

My Raspberry Pi is currently 'as supplied', and when I plugged in a wi-fi adapter into a powered hub recently the Pi rebooted which, as you said, tends to mess up the script somewhat!

I think it is (as always!) down to power levels, but it does look as if a bit more research is required in this area.

thsBavR10
Posts: 233
Joined: Sat Jul 21, 2012 3:11 pm

Re: USB Port Current Boost (solved)

Thu Sep 06, 2012 8:32 am

Ed Raket wrote:I found that bridging the polyfuses with 0-Ohm links (copperwire), makes the Pi reboot when hotplug'in a Edimax wifi adapter, wich means it won't install anymore with MrEngman's brilliant script. I replaced the copperwire with 1-Ohm resistors, and all works well. So the hotplugg'in coused a powersurge that reset's the Pi, if the Capicitator between the fuses was a lot larger than this would probably be pevented. So my advice to you all would be to use 1-Ohm resistors to bridge the polyfuses ;)
p.s.
Can anyone with 0-Ohm links confirm these hotplug problems? then it could be noted wiki-wise.
Hi Ed Racket,
i can confirm this.
First i bridged my polyfuses (old board), than i noticed the reboots on inserting the Edimax WiFi.
Later i found your suggestion for 1-Ohm resistors, since this modification i didn't have this reboots.

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: USB Port Current Boost (solved)

Thu Sep 06, 2012 11:45 am

thsBavR10 wrote:
Ed Raket wrote:I found that bridging the polyfuses with 0-Ohm links (copperwire), makes the Pi reboot when hotplug'in a Edimax wifi adapter, wich means it won't install anymore with MrEngman's brilliant script. I replaced the copperwire with 1-Ohm resistors, and all works well. So the hotplugg'in coused a powersurge that reset's the Pi, if the Capicitator between the fuses was a lot larger than this would probably be pevented. So my advice to you all would be to use 1-Ohm resistors to bridge the polyfuses ;)
p.s.
Can anyone with 0-Ohm links confirm these hotplug problems? then it could be noted wiki-wise.
Hi Ed Racket,
i can confirm this.
First i bridged my polyfuses (old board), than i noticed the reboots on inserting the Edimax WiFi.
Later i found your suggestion for 1-Ohm resistors, since this modification i didn't have this reboots.
Well that is very interesting. I also have an Edimax clone dongle. I was looking at getting a 500ma polyfuse, mostly for cosmetic reasons, but I now see it may or may not work because the low end resistance might be a bit too small, so I may also go with just a 1 ohm resistor

And this is why. Here is the resistance range of a typical 1812 polyfuse:

140ma hold current as in original pi = 1.5 - 6 ohm.

500ma hold current as a replacement = 0.15 - 1 ohm.
Last edited by pjc123 on Thu Sep 06, 2012 12:11 pm, edited 1 time in total.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

User avatar
Montala
Posts: 675
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)

Re: USB Port Current Boost (solved)

Thu Sep 06, 2012 11:56 am

We are sure though, are we not, that the Foundation (or the designers of the board) have recently made the decision to replace the fuses, at manufacturing level, with solid links, rather than resistors, or higher current carrying fuses?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5287
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: USB Port Current Boost (solved)

Thu Sep 06, 2012 12:06 pm

Montala wrote:We are sure though, are we not, that the Foundation (or the designers of the board) have recently made the decision to replace the fuses, at manufacturing level, with solid links, rather than resistors, or higher current carrying fuses?
The rev 2 boards have the fuses missed out (so equivalent to zero ohm links). I think a 1 or 0.5 ohm resister would have been a better choice, however at the time the rev 2 PCBs were revised (a number of weeks ago) that information wasn't known.
The board wasn't designed for more than single current (100mA) devices to be directly connected.
With the modded board a high current device might work normally, but can reset the board if hotplugged. The suggestion is that high current devices are not used, or only plugged in before boot.

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: USB Port Current Boost (solved)

Thu Sep 06, 2012 12:50 pm

pjc123 wrote: Well that is very interesting. I also have an Edimax clone dongle. I was looking at getting a 500ma polyfuse, mostly for cosmetic reasons, but I now see it may or may not work because the low end resistance might be a bit too small, so I may also go with just a 1 ohm resistor

And this is why. Here is the resistance range of a typical 1812 polyfuse:

140ma hold current as in original pi = 1.5 - 6 ohm.

500ma hold current as a replacement = 0.15 - 1 ohm.
I see that the proper resistor (1.5 ohm, 1/2 Watt, Surface Mount) is in stock in the next size up from 1215 (2010 size) which would still fit on the solder pads just fine. Thanks for catching that problem by the way.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

User avatar
Ed Raket
Posts: 164
Joined: Mon Apr 30, 2012 4:28 pm

Re: USB Port Current Boost (solved)

Thu Sep 06, 2012 1:47 pm

pjc123 wrote:
pjc123 wrote: Well that is very interesting. I also have an Edimax clone dongle. I was looking at getting a 500ma polyfuse, mostly for cosmetic reasons, but I now see it may or may not work because the low end resistance might be a bit too small, so I may also go with just a 1 ohm resistor

And this is why. Here is the resistance range of a typical 1812 polyfuse:

140ma hold current as in original pi = 1.5 - 6 ohm.

500ma hold current as a replacement = 0.15 - 1 ohm.
I see that the proper resistor (1.5 ohm, 1/2 Watt, Surface Mount) is in stock in the next size up from 1215 (2010 size) which would still fit on the solder pads just fine. Thanks for catching that problem by the way.
You can allso use "normal" 1-Ohm resistors and solder them over the existing polyfuses, or like me first remove the polyfuses. Check this picture;
Image

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: USB Port Current Boost (solved)

Thu Sep 06, 2012 2:42 pm

I used 500ma replacements on my early board. When powered normally it had no reset problems. When back powered it did have reset problems. This was due to too low of voltage as my TP1/TP2 readings were just 4.25v. I placed the 700ma that I had removed from F3 next. Stil the same but voltage moved up to 4.35v when back-powered. When powered normally it worked just fine with no resets. That fuse tested out at .82 ohms.

I have now jumpered F2 and F1 still has a 500ma. I now do not have resets either back-powered or when powered normally. Back-powered voltage at TP1/TP2 is as low as 4.71v when everything (HDD, keyboard/mouse, USB stick) is plugged into hub. I get 4.95v (1.1A F3) when normally powered. Input is 5.02v.

I believe the best way to go is with just a little resistance, if you need to hot plug your device. I would try the 0.5ohm. As @mahjongg stated, lower might work also. You just need some resistance to curtail inrush current. A larger capacitor at the USB might also help. Too bad this information did not help in the revision of the board!

Edit: my hot plug issues happened when inserting a USB key, a low powered device, into the RasPi or the hub.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

semtex
Posts: 63
Joined: Sat Mar 03, 2012 4:54 am

Re: USB Port Current Boost (solved)

Fri Sep 07, 2012 4:59 am

Wow, was it really that simple?!

I've tried multiple power supplies and several different wireless desktop combos but always had problems with multiple key presses and especially with mouse clicks not being recognised. It was unusable... so I didn't! (My Raspi is velcro'd to the back of my monitor, hence the desire for a wireless keyboard and mouse.)

This evening I replaced the two fuses with wire et voila! Problem solved, no multiple key clicks and a responsive mouse. Also tried hot-plugging the wireless dongle and USB memory stick several times and there was no reboot.

Capital :D

User avatar
jbeale
Posts: 3469
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: USB Port Current Boost (solved)

Sat Sep 08, 2012 5:56 am

For what it's worth, in case of relevance.
The USB spec says USB devices can have only a maximum of 10 uF capacitance, but USB hosts must have a minimum of 120 uF. The purpose is for USB hot plugging, so the device doesn't suddenly drag the host's power down too low while it's capacitors are charging through the USB cable. -from PaulStoffregen's Kickstarter Page
The R-Pi has 220 uF on its +5V line, so it SHOULD be ok per USB spec- except if that large cap (C6) is out of spec, or was knocked off by accident, or if the USB device violates the spec. Many people have cracked off C6 because its position invites use as a handle or thumb-rest while connecting the micro-USB power cable. I measured my own Pi's +5V->GND total in-circuit capacitance at 259 uF, which seems OK. Electrolytic caps usually have loose tolerances, like +/-20% or -10/+50%.

User avatar
Ed Raket
Posts: 164
Joined: Mon Apr 30, 2012 4:28 pm

Re: USB Port Current Boost (solved)

Sat Sep 08, 2012 8:35 am

jbeale wrote:For what it's worth, in case of relevance.
The USB spec says USB devices can have only a maximum of 10 uF capacitance, but USB hosts must have a minimum of 120 uF. The purpose is for USB hot plugging, so the device doesn't suddenly drag the host's power down too low while it's capacitors are charging through the USB cable. -from PaulStoffregen's Kickstarter Page
The R-Pi has 220 uF on its +5V line, so it SHOULD be ok per USB spec- except if that large cap (C6) is out of spec, or was knocked off by accident, or if the USB device violates the spec. Many people have cracked off C6 because its position invites use as a handle or thumb-rest while connecting the micro-USB power cable. I measured my own Pi's +5V->GND total in-circuit capacitance at 259 uF, which seems OK. Electrolytic caps usually have loose tolerances, like +/-20% or -10/+50%.
But... The cap that handles the USB supply is on the exact opposit corner of the PCB in-between the polyfuses, so NOT C6 but C32 and this cap is only 47uF. This cap should be >120uF...

So this would be ideal... :mrgreen:
Image

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

Re: USB Port Current Boost (solved)

Sat Sep 08, 2012 9:33 am

Ed Raket wrote:... The cap that handles the USB supply is on the exact opposit corner of the PCB in-between the polyfuses, so NOT C6 but C32 and this cap is only 47uF. This cap should be >120uF...
Given the board is ~3 inches, at speed of light = 1ft/ns I don't think that's going to make much difference.

I've no idea about the inductance of the track between them, but I would expect the main limitation on how well C6 can hold the 5v up is going to be its internal impedance rather than its distance from the USB socket

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

Re: USB Port Current Boost (solved)

Sat Sep 08, 2012 9:37 am

jbeale wrote:... Electrolytic caps usually have loose tolerances, like +/-20% or -10/+50%.
Can't remember where I got it from, but I thought bog standard ones were generally +10/-50%. So 220uF could be anywhere between 242uF and 110uF

User avatar
Ed Raket
Posts: 164
Joined: Mon Apr 30, 2012 4:28 pm

Re: USB Port Current Boost (solved)

Sat Sep 08, 2012 9:54 am

Burngate wrote:
Ed Raket wrote:... The cap that handles the USB supply is on the exact opposit corner of the PCB in-between the polyfuses, so NOT C6 but C32 and this cap is only 47uF. This cap should be >120uF...
Given the board is ~3 inches, at speed of light = 1ft/ns I don't think that's going to make much difference.

I've no idea about the inductance of the track between them, but I would expect the main limitation on how well C6 can hold the 5v up is going to be its internal impedance rather than its distance from the USB socket
In your way of thinking, the USB wil "pull" it's power from C6. The problem with this is that before C6 can respond the voltage drops on the PCB "powersurge" and this couses the Pi to restart. This has been tested by several Pi owners allready. If C32 was bigger, or you use a resistor to "control" the powersurge then the voltagedrop on the soc is minimal and the Pi does not reset. AKA= hotplug proof ;)

I might be talking "apples" while you are talking "oranges" here tho.... :D

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

Re: USB Port Current Boost (solved)

Sat Sep 08, 2012 10:33 am

You plug in your USB device, with its own cap uncharged.

Current flows to charge it up, and will primarily come from C6 and C32, causing the 5v rail to dip.

How far it dips will depend on the size of the USB device cap, so for example if it's 264uF (equal to the nominal value of C6 and C32 in parallel) then instantaneously the 5v rail will reach 2v5.

What happens then depends on how low it goes.

The 3v3 regulator will only hold its output within a certain range of 5v. Below that, the 3v3 will dip, causing unknown problems.
Other USB devices may not like the dip, but on the other hand may have enough capacitance to mitigate the dip.
The 5v goes to various points on the SoC, and a dip on those can have unknown effects.

Putting a small (~1R) resistor in the USB power path will extend the time (R*C - with 250uF and 1R that's 250us) in which the caps equallise their voltages, and reduce the current out of them during that time. During that time the psu can provide increased current, holding the 5v rail closer to 5v

In some ways a better solution would be to use an inductor instead of a resistor. I've used a 10uH choke, and it works. But it's a one inch cube, and looks rather unsightly.

The track between C6 and C32 can be significant if its resistance is high enough to allow those two caps to have different voltages. But the 3v3 regulator is close to C6 and so will be fed from a voltage closer to that on C6 than that on C32. What the SoC recieves depends on where on the track it is connected.

The time constant of that track and the two or three caps will be in the order of 40*r us, where r is the resistance of the track. No knowledge but plenty of guesswork gives me less than 0.1R which gives us <4us. I call that instantaneous.

User avatar
Ed Raket
Posts: 164
Joined: Mon Apr 30, 2012 4:28 pm

Re: USB Port Current Boost (solved)

Sat Sep 08, 2012 11:20 am

Burngate wrote:But the 3v3 regulator is close to C6 and so will be fed from a voltage closer to that on C6 than that on C32. What the SoC recieves depends on where on the track it is connected.
Thank you for your detailed explanation! i did not know that the 3v3 regulator was closest to C6, but now i understand what you mean. I now allso understand what my resistors do exactly ;)

Cheers

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2848
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: USB Port Current Boost (solved)

Mon Sep 10, 2012 5:24 pm

I just "did the deed" on one of my Pis. Glad to say it survived the heat treatment, although it ain't pretty. Look at those huge gobs of solder :lol: ...
Image

The sticky keyboard issue (that only arose after switching to Raspbian and overclocking to 900) stopped immediately. 8-)
Alex Eames RasPi.TV, RasP.iO

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: USB Port Current Boost (solved)

Mon Sep 10, 2012 9:54 pm

:o
Ostendo ignarus addo scientia.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12023
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: USB Port Current Boost (solved)

Mon Sep 10, 2012 10:03 pm

alexeames wrote:I just "did the deed" on one of my Pis. Glad to say it survived the heat treatment, although it ain't pretty. Look at those huge gobs of solder :lol: ...
Image
Looks like a nice enough job. Everything that needed to be connected is connected, and nothing that shouldn't be connected connects, thats really all that matters.
Some solder joints could have had a little bit more heat, to flow better (it doesn't matter anymore that the polyfuses will get hot when you do).

User avatar
jbeale
Posts: 3469
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: USB Port Current Boost (solved)

Wed Sep 12, 2012 8:13 pm

Just for clarity, can I confirm the problem device is the "EDIMAX EW-7811Un" as for example this ?

Without taking one apart, just based on the size of it I'd guess it has a ceramic capacitor on it's +5V input. Ceramic caps tend to have low ESR (equivalent series resistance) like for example 0.1 to 0.01 ohms. Without having one I can't measure it, but maybe the capacitor value is about 10 uF and let's be generous and say the ESR is 0.1 ohms (might be 10x lower = 10x worse). The R-C time constant for (10 uF * 0.1 ohms ) is 1 microsecond. At the moment of connection this capacitor will draw (5V / 0.1 ohms) = 50 Amps (!) but after several microseconds, the capacitor would be mostly charged up (not accounting for external resistance like traces and connectors and the external power supply itself).

Now on the R-Pi side, we have a large electrolytic cap of 220 uF but electrolytics have high ESR, for example 0.5 ohms. In that case, the Pi's big cap could only supply an instantaneous maximum of 5V / 0.5 ohms = 10 A into a short-circuit. So in that case, at the moment of connecting the USB plug we have a 5:1 resistive divider based on the relative ESR of the two caps, and on a microsecond time scale the +5V supply rail becomes +1 V. It would not be quite that bad due to connector and trace resistance, and my ESR assumptions are somewhat arbitrary, but you can see the problem. Can be fixed with more series resistance or inductance between USB device and R-Pi supply rail, OR (at higher cost) a large-ish, and very low ESR cap close to the USB connectors.

UPDATE: I do have a small Ralink RT5370 WiFi adaptor and I measured it to have 8.4 uF capacitance from +5 to GND, and they are ceramic caps. I don't have an ESR meter but ceramics always have low ESR. Here is a photo of it in case of interest. The two dark rectangles towards the right are ferrite beads, the ceramic caps are smaller at the extreme right. https://picasaweb.google.com/1099282360 ... 9813612466

Return to “General discussion”