lordloh
Posts: 13
Joined: Thu Sep 13, 2012 11:27 pm

Raspberry Pi Reboots on inserting a USB device.

Sun Nov 18, 2012 8:20 pm

My Raspberry Pi Reboots on plugging in some USB devices. I do not think it is a power supply problem - I am using a 5v 30A power supply (ATX SMPS) and I have see it occur across two OS releases - (debian & Raspbian).

The devices I have used are EDiMAX WiFi dongle and RTL2832 USB dongle.

What might be the reason for the reboot and how do I avoid it?

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Raspberry Pi Reboots on inserting a USB device.

Sun Nov 18, 2012 8:41 pm

My Raspberry Pi Reboots on plugging in some USB devices. I do not think it is a power supply problem - I am using a 5v 30A power supply (ATX SMPS) and I have see it occur across two OS releases - (debian & Raspbian).
Connecting certain USB devices especially wifi dongles can cause a sudden drop in supply voltage at TP1/TP2 because of a spike in current demand when they're turned on.
If the voltage drop is big enough the PI would effectively reboot as if you pulled the plug and put the plug back in.
It doesn't matter if you have a 30A or 3000A power supply the F3 polyfuse would always limit maximum current consumption of around 700mA.
What might be the reason for the reboot and how do I avoid it?
-make sure it's connected to the USB port before you turn on the PI
-use a USB powered hub
-bridge the F3 polyfuse (voids warranty)
-power the PI using the GPIO 5v pins (voids warranty??)
-replace C6 capacitor for something a bit more beefier i.e. 3300uF (220uF is frankly useless in this instance)

Richard S.

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

Re: Raspberry Pi Reboots on inserting a USB device.

Mon Nov 19, 2012 12:09 am

Don't hot plug USB devices directly into the PI, if you must hot plug plug into a hub instead!

Its called "the rush in current problem", and it makes that the current PI itself is non "hot pluggable", note that the revision 1 PI was hot pluggable, as the two polyfuses prevented any rush in current because the fuses had a non zero resistance. But in the current board there is literally zero resistance between the PI's 5V supply, and any USB device you plug in, that means that if you plug in any USB device with empty power decouplers, (which act as a complete short for a very small time) then you are actually simply shorting the 5V when you plug de USB device in.

The polyfuses in the revision 1 board however caused much greater problems than this problem, and for that reason have been removed.
Its possible and likely the hot-plug problem will be solved in a (final?) redesign of the PI by placing tiny resistors (smaller than 1 Ohm) back in the power path to the USB device.
However, if you have an USB hub plugged into the PI, its normally protected against the rush-in current so you can safely plug in an USB device into the hub.
As the current PI only has two ports normally there is no need/possibility to hot plug anything in anyway, (without a hub) as the two ports are reserved for a mouse and a keyboard, unless you want to hot plug the keyboard. If you want to plug anything in beyond that you would already use a hub, and as said, you can hot plug safely into a hub.

leuvarus
Posts: 1
Joined: Fri Nov 08, 2013 6:14 pm

Re: Raspberry Pi Reboots on inserting a USB device.

Fri Nov 08, 2013 6:18 pm

Thank you so much @redhawk (Richard S.) for your valuable answer. I was worried wondering if my board had a malfunction but now I understand the reasons for it to reboot :mrgreen:

User avatar
Emanuele
Posts: 180
Joined: Wed Aug 03, 2011 5:28 pm
Contact: Website

Re: Raspberry Pi Reboots on inserting a USB device.

Sat Nov 09, 2013 12:57 pm

I had the same problem and I suspected it was a spike of current, but I am glad that I have checked this thread anyway.

I actually do hot-plug some devices directly (well, using a 20 cm cable I had around to avoid stressing the Raspberry Pi connector) on my Model A and I was even planning to recommend it! Is the advice not to hot-plug still relevant for current models (I got mine about two weeks ago)? Is Model A the same/better/worse compared to Model B? Are low-power devices OK?

Here is some context. I have two use cases for my Model A. First, I use it for OpenGL ES cross-development using a wifi dongle and ssh (that's why I have found this post). However, I also use it for my hobby open source project (see viewtopic.php?f=56&t=59273); it's not quite there yet, but here is the "reference" scenario that is driving the project:

You have:
  • An old wired USB keyboard
  • An old phone charger (500mA-750mA)
  • An old TV taking composite output
  • An old USB flash card that has been replaced by a bigger one
  • A useless SD card (8M) that came with an old camera
  • A USB gamepad and/or a bluetooth dongle (optional)
I reckon that with a Model A, you could just use all of this without buying any additional stuff. Here is the workflow I have in mind:
  1. Game programming with the wired keyboard
  2. Testing using the keyboard to move the player
  3. Swap keyboard/USB flash/keyboard to make a backup
  4. Swap keyboard/gamepad (or just power on with the gamepad plugged in) to play the game with the gamepad
  5. Swap keyboard/bluetooth dongle/keyboard to install the game on a feature phone
The actions when swapping could be automated using udev rules.

Is this workflow feasible? Or is hot-plugging really not recommended?

alwynallan
Posts: 1
Joined: Mon Nov 12, 2012 11:17 pm

Re: Raspberry Pi Reboots on inserting a USB device.

Sat Feb 21, 2015 11:28 pm

I have a skinny USB extension cable supplied free by Logitech with a wireless mouse. Devices that crash the RPi when plugged directly don't cause a problem with the extension. The extra resistance in the skinny cable must limit the inrush current.

klricks
Posts: 6593
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Raspberry Pi Reboots on inserting a USB device.

Sun Feb 22, 2015 2:00 am

alwynallan wrote:I have a skinny USB extension cable supplied free by Logitech with a wireless mouse. Devices that crash the RPi when plugged directly don't cause a problem with the extension. The extra resistance in the skinny cable must limit the inrush current.
You are replying to a very old thread which mostly applies to the older A & B models. The B+ and Pi 2 have a USB power control circuitry which eliminated most of the hot plug crash issues.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23709
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi Reboots on inserting a USB device.

Sun Feb 22, 2015 10:52 am

Indeed. Thanks for the comment, but this thread is mostly out of date.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Return to “General discussion”