davelawrence
Posts: 12
Joined: Thu Dec 10, 2015 5:14 pm

USB insertion causing reboots

Wed Mar 15, 2017 8:19 pm

In the early days there were reports of the RPI rebooting on plugging in certain USB devices, e.g.

viewtopic.php?f=63&t=23205

Is this issue still present on modern (3B) hardware?

If so, what are the current recommended work-arounds?

Thank you,

User avatar
DougieLawson
Posts: 40240
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: USB insertion causing reboots

Wed Mar 15, 2017 8:33 pm

Less likely with a RPi3B because it's got 1200mA available to power USB devices. Most, in spec, USB 2.0 devices should never pull more than 500mA on insertion. Unfortunately USB 3.0 devices don't stick to that rule and some USB 2.0 devices don't bother to meet the spec either.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

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

Re: USB insertion causing reboots

Wed Mar 15, 2017 9:06 pm

It should also be mentioned that on Pi models B+/2B/3B there's a USB current limiting switch which will suspend the USB Vbus supply if USB peripherals draw too much current.

Given an adequate power supply, ie one which can meet the Pi's USB 1200mA-across-4-ports plus SoC & peripherals requirements, the Pi's SoC will not experience brownout/reboots which plagued the earlier models.

The great majority of the 12.5 million Pis out in the wild have that extra circuitry.

davelawrence
Posts: 12
Joined: Thu Dec 10, 2015 5:14 pm

Re: USB insertion causing reboots

Wed Mar 15, 2017 9:17 pm

Thank you for the responses.

As our Pi's are part of embedded control systems on customer sites (not just sitting on a dev bench), we need to try and eliminate the possible of brown-outs. Would you advise we use a 5V injector into the USB?

Thanks,

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

Re: USB insertion causing reboots

Wed Mar 15, 2017 9:27 pm

Ensure the Pis have an adequate supply via the micro-USB port & that's your job done.

If you are so concerned, put a blanking plate over any/all of the four USB ports which are not required.

User avatar
DougieLawson
Posts: 40240
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: USB insertion causing reboots

Wed Mar 15, 2017 9:36 pm

davelawrence wrote: As our Pi's are part of embedded control systems on customer sites (not just sitting on a dev bench), we need to try and eliminate the possible of brown-outs. Would you advise we use a 5V injector into the USB?
You should always try to power the pi through the microUSB as that's on the safe side of the polyfuse.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

davelawrence
Posts: 12
Joined: Thu Dec 10, 2015 5:14 pm

Re: USB insertion causing reboots

Wed Mar 15, 2017 11:29 pm

Hi,

Sorry, I think I didn't explain my question properly: would an additional 5V supply e.g.

https://linitx.com/product/mikrotik-5v- ... 493g/12849

eliminate the possibility completely?

(We are powering the board via the micro-USB connector.)

Thank you,

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

Re: USB insertion causing reboots

Thu Mar 16, 2017 12:29 am

1) The current limit on the Pi3B should eliminate the power glitch problem, assuming that the Pi's supply is rated properly (2.5A at 5 to 5.25V).
2) Injecting extra power for USB should also prevent the Pi rebooting. If the injector disconnects the downstream USB from the Pi's 5V, supply glitches can't get back that way.
3) In either case it is difficult to guarantee what an arbitrary (rogue) USB device will do through the drivers when plugged in. To be 100% safe, prevent connection of external USB devices. If that is undesirable, accept the (probably small) risk of problems.
4) I don't think anyone can quantify the increased security of an extra supply over using the Pi's supply. Only you can evaluate the cost if something does go wrong, and therefore what level of risk is acceptable. But since the risk is probably not quantifiable, in the end you pays your money and takes your choice.
Location: 345th cell on the right of the 210th row of L2 cache

davelawrence
Posts: 12
Joined: Thu Dec 10, 2015 5:14 pm

Re: USB insertion causing reboots

Thu Mar 16, 2017 10:47 am

Thank you everyone for your advice! Very much appreciated.

alphanumeric
Posts: 2673
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: USB insertion causing reboots

Thu Mar 16, 2017 12:48 pm

I made up my own custom USB cables for my Pi Bread Boarding rig. The male end that plugs into the Pi only has DATA + - and Ground wired. The +5V is not wired up. The female end that I plug my devices in has +5V and Ground wired in from my power pack, and the DATA + - from the Pi. Power for my USB devices comes from my power pack not the Pi. I use the same 5V 10A power pack to run my Pi, 7 inch touch screen, an audio amp, and USB devices. I had a bunch of the audio cables you use to go from PC optical drives to the motherboard. They are one twisted pair with a shield. They worked perfect for me as I only needed 3 wires. The shield I wired to ground. I just cut the stock connectors off and used my own USB plugs.
https://www.adafruit.com/categories/274

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

Re: USB insertion causing reboots

Thu Mar 16, 2017 2:22 pm

alphanumeric wrote:I made up my own custom USB cables for my Pi Bread Boarding rig. The male end that plugs into the Pi only has DATA + - and Ground wired. The +5V is not wired up. The female end that I plug my devices in has +5V and Ground wired in from my power pack, and the DATA + - from the Pi. Power for my USB devices comes from my power pack not the Pi. I use the same 5V 10A power pack to run my Pi, 7 inch touch screen, an audio amp, and USB devices. I had a bunch of the audio cables you use to go from PC optical drives to the motherboard. They are one twisted pair with a shield. They worked perfect for me as I only needed 3 wires. The shield I wired to ground. I just cut the stock connectors off and used my own USB plugs.
https://www.adafruit.com/categories/274
I'm not sure if you are suggesting using audio cable for power or only for data. So:
Audio cable should be good for the data connection on a short lead, but may be too thin for power use -- even a short length could show considerable voltage drop.
Use the thickest convenient cable for power connections, which don't need to be screened.

(I'm not sure whether the USB spec requires screening, but it is of limited value for twisted pair data wires anyway.
You may need and probably should have an 0V (Ground) connection between boards, the screen is convenient for this.)
Location: 345th cell on the right of the 210th row of L2 cache

alphanumeric
Posts: 2673
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: USB insertion causing reboots

Thu Mar 16, 2017 2:31 pm

The audio cables only carry DATA. I use separate beefier wires for power.
There is a picture here, showing the cables, https://1drv.ms/i/s!AjOYwiwlwDtpgq9OQZeDo3z3ALzEuw
Lower left you can see a red wire and a gray colored cable going into a USB connector.
Full build pictures here, https://1drv.ms/f/s!AjOYwiwlwDtpgq9LUHdGiiRpn7dr2Q

Return to “Troubleshooting”