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?
- mahjongg
- Forum Moderator
- Posts: 14600
- Joined: Sun Mar 11, 2012 12:19 am
- Location: South Holland, The Netherlands
Re: Pi Crashes When USB Is Connected
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.
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.
Re: Pi Crashes When USB Is Connected
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...
Re: Pi Crashes When USB Is Connected
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
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
Re: Pi Crashes When USB Is Connected
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.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...
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)
Re: Pi Crashes When USB Is Connected
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?
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?
Re: Pi Crashes When USB Is Connected
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.
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.
Re: Pi Crashes When USB Is Connected
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.
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.
Re: Pi Crashes When USB Is Connected
Is it possible to solder a large capacitor across the power rails to prevent the "inrush problem"? If so, what capacitance is probably needed?
Re: Pi Crashes When USB Is Connected
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
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
- mahjongg
- Forum Moderator
- Posts: 14600
- Joined: Sun Mar 11, 2012 12:19 am
- Location: South Holland, The Netherlands
Re: Pi Crashes When USB Is Connected
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.