aetebet
Posts: 3
Joined: Sat Dec 15, 2012 8:23 pm

Pi Crashes When USB Is Connected

Sun Dec 16, 2012 1:52 am

I've been setting up my Pi as a home media center but it's hit a roadblock. Whenever USB device is plugged in, it shuts off. Here is my setup

512mb Model B Pi

Micro Center 16GB Class 10 SD Card

Latest Raspbmc

Currently connected to an old TV through RCA

Power is supplied with an HTC phone adapter rated at 1A and 5V

My USB hub is an Inland 10 port hub. Originally the USB cable to the Pi was sending power upstream and causing the Pi to read as on. I cut the power cables in the USB and only left data and it no longer shows up as receiving power from the hub. Plugged into the hub is a Logitech mouse and keyboard, Tenda wireless adapter, and USB cable to an external hard drive that is powered through an AC adapter.

However whenever any sort of USB device is inserted, removed, or even jiggled a little the entire system crashes. The two red LED's stay on but the display blacks out and the keyboard no longer inputs. Once shut down it takes about a minute before it will reboot. I've tried a Kindle wall adapter, Samsung, and plugging in to the USB hub. All produce the same result

Any ideas?

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

Re: Pi Crashes When USB Is Connected

Sun Dec 16, 2012 3:12 am

If an USB device is plugged in directly into the PI, what you are actually doing is introducing a very short (milliseconds) short between 5V and GND. The reason is that such an USB device has discharged capacitors that can cause the equivalent of a hard short during the time they are charged from the PI, its know as the "inrush current problem" in the industry.
The original PI had two polyfuses which limited the inrush current but they were removed as the resistance of the polyfuse was deemed too high. But now there is no resistance at all left. There is a small (47uF) capacitor located near the USB but its capacity is too low to prevent the 5V dipping to below 3V, and the larger 220uF elco near the power input, is too far away to deliver current in time.

The advice I can give, is to avoid hot plugging USB devices directly into the PI, if you must hot plug, do it into the powered hub, if the Hub is well designed it should survive hot plugging., and the PI won't be affected.

aetebet
Posts: 3
Joined: Sat Dec 15, 2012 8:23 pm

Re: Pi Crashes When USB Is Connected

Mon Dec 17, 2012 11:09 pm

Thanks! That helped and it stayed stable for a day or so. But now it won't even boot, just the red light comes on...

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: Pi Crashes When USB Is Connected

Tue Dec 18, 2012 2:04 am

Stupid Question, could the inrush current problem cause a USB port to stop working?

I have been hotplugging occasionally, while my powered hub is on order :/ Wonder if thats the reason one of my ports has died :(
dan3008 wrote:Pays your money, takes your choice

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am

Re: Pi Crashes When USB Is Connected

Tue Dec 18, 2012 3:56 am

aetebet wrote:Thanks! That helped and it stayed stable for a day or so. But now it won't even boot, just the red light comes on...
Likely it was writing to the SD Card when it lost power and corrupted it put new image on card and see if it loads.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

aetebet
Posts: 3
Joined: Sat Dec 15, 2012 8:23 pm

Re: Pi Crashes When USB Is Connected

Wed Dec 19, 2012 8:52 pm

Flashed a new image of Raspbmc to the SD card and no boot...

My Pi is temporarily mounted to a wooden board using the mounting holes, is it possible that one of the standoffs or screws is causing a short?

Balfy
Posts: 10
Joined: Tue Dec 18, 2012 7:25 pm

Re: Pi Crashes When USB Is Connected

Thu Dec 20, 2012 5:20 pm

I am a new user but have found a solution to my problem which was the same as yours. I first started my Pi on a regular phone charger and it operated ok but when I played a video it would start skipping. The phone charger was rated at .7a.

I want to play videos and I had bought the recommended power supply from Allied Electronics that was rated at .85a. It didn't have a patch cord with it so I wired one up. Things got worse, every time I plugged anything in it would reboot. It would not boot with the keyboard dongle or other USB device plugged in.

I looked around in my old power supply box and found one that was rated at 5v and 2.5 amp. More than needed but so what. I wired up my microusb connector to it and now it plays videos without locking up. It is much more stable I have not been able to crash my rPi yet while using it.

I bet a more robust power supply will solve your problems.

CPOKashue
Posts: 52
Joined: Fri Sep 28, 2012 6:13 pm

Re: Pi Crashes When USB Is Connected

Mon Feb 11, 2013 3:37 pm

I came here to post because I just had the "upstream powers the pi even when the hub is off" issue with an Inland powered hub. It would be nice if there was some way to make the Pi NOT draw power from the front ports; my $15 inland hub is now just a power switch attached to my old USB hub.

Anyhow I power my pi using a Belkin F5U700 and I have never experienced any of the issues associated with low power flow. This hub also expands the Pi (unlike the Inland it does not use a full USB cable upstream and does not supply power in this way) and is running the receiver for my mouse/keyboard and 2 game controllers. I did have a wireless fob in there but it died; I just ran an ethernet cord from the router on top of my home theater down to the pi inside and haven't missed it.

lukehutch
Posts: 1
Joined: Tue Aug 11, 2020 3:59 am

Re: Pi Crashes When USB Is Connected

Tue Aug 11, 2020 4:01 am

Is it possible to solder a large capacitor across the power rails to prevent the "inrush problem"? If so, what capacitance is probably needed?

User avatar
PeterO
Posts: 6095
Joined: Sun Jul 22, 2012 4:14 pm

Re: Pi Crashes When USB Is Connected

Tue Aug 11, 2020 5:48 am

lukehutch wrote:
Tue Aug 11, 2020 4:01 am
Is it possible to solder a large capacitor across the power rails to prevent the "inrush problem"? If so, what capacitance is probably needed?
If you search/google you will find several threads about this in the intervening 7 years since this thread was last active.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

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

Re: Pi Crashes When USB Is Connected

Tue Aug 11, 2020 3:28 pm

lukehutch wrote:
Tue Aug 11, 2020 4:01 am
Is it possible to solder a large capacitor across the power rails to prevent the "inrush problem"? If so, what capacitance is probably needed?
Modern PI's like the RPI3 and RPI4 have special USB power control IC's, which prevent the inrush current problem, but the zero doesn't have such a chip,. perhaps a 470uF cap near the microUSB ports will help somewhat, or use a powered USB hub.

Return to “Troubleshooting”