User avatar
Imperf3kt
Posts: 2762
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Pi zero W appears to reboot when physically inserting USB devices while powered

Sat Apr 06, 2019 5:10 am

I know at least one other user has reported hot plugging HDMI or USB devices made their Pi0 reboot.
At first, I thought they were imagining it, because I had never experienced it myself.

However, I think if I find the posts again, I may have to apologise!
I just powered up a brand new Pi0W from 2017 and accidentally powered it via the USB port, and plugged my USB mouse into the Power port and had a peculiar time.


I was using the official raspberry Pi 2.5A power supply.

I noticed that unplugging things didn't matter, but if I plugged USB in, it rebooted.
I tried two different OTG connectors and two different USB hubs, both of which caused a reboot upon plugging them in. Neither were powered externally (though it is available)
One of the hubs has individually switched ports. If I plugged it in before booting and turned the ports on and off, nothing happened.
I also tried plugging the mouse in directly, without using the hub as I had no need for more than one USB port, and that also forced a reboot.


The only thing I can put it down to was accidentally mixing up the ports on the Pi, but... Why? What would cause the Pi to reboot simply by using the wrong port?
As I understand it, the power port does not have the data pins connected.
Last edited by Imperf3kt on Sun Apr 07, 2019 10:20 pm, edited 1 time in total.
55:55:44:44:4C
52:4C:52:42:41

User avatar
DougieLawson
Posts: 36096
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Pi zero W appears to reboot when plugging USB in power port

Sat Apr 06, 2019 1:08 pm

It's the inrush current for the USB device pulls the 5V line below 4.6V and the GPU will reset.

That happens all the time on my Raspberry Pi 1Bs - so I power off, insert USB thing then power back on with those.

The B+, 2B, 3B, 3B+ and 3A+ don't suffer from that problem as the power management is better.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
bensimmo
Posts: 4172
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Pi zero W appears to reboot when plugging USB in power port

Sat Apr 06, 2019 1:54 pm

It was me, no need to apologise, since its a feature of the Zero devices when changing (and downtime wiggling) uUSB and HDMI devices.

Just for my case
I'd just never seen it using a device on the 5v pins (which is directly wired to the power in and uUSB etc afaik) and only a 70mA ramp up.
Oddly I cannot capture the drop at the Pi end iirc, only the devices after it circuitry of fan and laser kicking in, probably just the limit of my DSO and techniques.

Anyway
For that device (a common SDS011 PM2.5/PM10 Particle Sensor)
The Pi2 and Pi3B+'s cope with it, no problems.
The 3B's reports undervoltage error at device 'wake' time (no problems at device sleep time, so no +be spike?)

The Zero's and A+ reset at device wake time.

I could test the 3A+, B+ and older Pi. But they are no use to the project, just going to have to get micropython and figure out NodeMCUs/ESP. they have no problem either.
Just the Pi is easier to teach with and the ZeroW is the needed Pi.
Last edited by bensimmo on Sat Apr 06, 2019 2:37 pm, edited 1 time in total.

mattmiller
Posts: 2106
Joined: Thu Feb 05, 2015 11:25 pm

Re: Pi zero W appears to reboot when plugging USB in power port

Sat Apr 06, 2019 2:02 pm

@bensimmo - have you replied to the wrong post?

User avatar
bensimmo
Posts: 4172
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Pi zero W appears to reboot when plugging USB in power port

Sat Apr 06, 2019 2:36 pm

Nope, i just rambled on a bit after that.

ref:
viewtopic.php?f=63&t=236676&p=1449707#p1449862

User avatar
Imperf3kt
Posts: 2762
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Pi zero W appears to reboot when plugging USB in power port

Sat Apr 06, 2019 7:32 pm

DougieLawson wrote:
Sat Apr 06, 2019 1:08 pm
It's the inrush current for the USB device pulls the 5V line below 4.6V and the GPU will reset.

That happens all the time on my Raspberry Pi 1Bs - so I power off, insert USB thing then power back on with those.

The B+, 2B, 3B, 3B+ and 3A+ don't suffer from that problem as the power management is better.
That explanation would make sense, if it also happened when I switched the switched usb on, but it doesn't, only if I physically insert it.
55:55:44:44:4C
52:4C:52:42:41

PhatFil
Posts: 1363
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Pi zero W appears to reboot when plugging USB in power port

Sat Apr 06, 2019 7:38 pm

fwiw im pretty sure adding or removing an unattached usb cable is enough to trigger a restart with one of my pi-0 boards..
i have a vivid recollection of standing thinking WTF!! while the system rebooted while i held an unattached braided micro usb lead in my hand..

hippy
Posts: 5934
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Pi zero W appears to reboot when plugging USB in power port

Sun Apr 07, 2019 1:45 am

Imperf3kt wrote:
Sat Apr 06, 2019 7:32 pm
That explanation would make sense, if it also happened when I switched the switched usb on, but it doesn't, only if I physically insert it.
I've noticed that oddity as well; plug something in and there's a re-boot, plug something in with the Vusb power line disconnected and it doesn't when power is then switched through.

I've never mentioned or complained because I haven't got an Official RPF PSU and that was what was likely to get blamed for the issue.

I'm also of the opinion that there's more to it than simply "in-rush current", but it could be that in-rush current could differ between the two cases.

User avatar
bensimmo
Posts: 4172
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Pi zero W appears to reboot when plugging USB in power port

Sun Apr 07, 2019 10:09 am

I just took it as the downside to the device, for £4.50/£9.00
Something had to give.

And yes all mine are on Pi PSU normally (in fact 3 brand new one with the new manufacturer name), makes no difference.

hippy
Posts: 5934
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Pi zero W appears to reboot when plugging USB in power port

Sun Apr 07, 2019 4:14 pm

bensimmo wrote:
Sun Apr 07, 2019 10:09 am
I just took it as the downside to the device, for £4.50/£9.00
Something had to give.
That's how I've sanguinely discounted the issue with 'ho hum, never mind', and haven't cared to investigate further. A $5 board cannot be expected to be perfect in all respects in all circumstances.

That said, my Pi Zero W cost £15, which is more than my Alcatel Pop C1 3.5" LCD Android phone cost, though only by 5p.

And still; it would be nice to know why, what causes it, what would rectify the issue.

User avatar
Imperf3kt
Posts: 2762
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Pi zero W appears to reboot when physically inserting USB devices while powered

Sun Apr 07, 2019 10:21 pm

After some further testing (with the correct ports this time), I have renamed the thread to something more appropriate to the actual issue.

I also want to see if it's related to the power at all, so later today plan to power a usb hub separately and connect just the D+ / D- wires and see what happens.

hippy wrote:
Sun Apr 07, 2019 4:14 pm
.

That said, my Pi Zero W cost £15, which is more than my Alcatel Pop C1 3.5" LCD Android phone cost, though only by 5p.
Last year when 2G cellular network was being shut off here, a local supermarket chain was selling 2G only smartphones for $9. Ten dollars call credit included.
55:55:44:44:4C
52:4C:52:42:41

User avatar
Imperf3kt
Posts: 2762
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Pi zero W appears to reboot when physically inserting USB devices while powered

Tue Apr 09, 2019 10:54 am

Okay, this just got confusing.

I tried a different USB hub, one I hadn't previously used. It uses the old miniUSB connection, so I wasn't worried about cutting it up. The cable was about 30cm and the wires inside were 30awg. I'm not sure if its important or not, but this hub is not Linux compatible.

Upon connecting it, the Pi did NOT reboot.
I pulled it in and out repeatedly for a good minute and it didn't reboot at all.
I then plugged my mouse into the hub, no reboot. I pulled that in and out a few times as well, and plugged it in and pulled the hub in and out again. No reboot, no matter what I did.

I grabbed a longer cable (90cm with 28awg). Instantly, upon plugging it in, the Pi rebooted.
I plugged the hub into the Pi, then after booting, plugged the mouse in. The Pi rebooted.

All I can put it down to is inrush current as mentioned earlier in the thread, I guess. Its confusing me when the difference seems to be a mere cable.
55:55:44:44:4C
52:4C:52:42:41

Return to “Troubleshooting”