coolstuff
Posts: 20
Joined: Wed Mar 08, 2017 6:36 pm

USB ports not grounded?

Wed Mar 08, 2017 6:42 pm

Hello all,

I setup my raspberry pi 3 model b+ a couple of days ago, all was fine until I tried to plug in a USB device.... I cant touch the ports with anything metal without the pi shorting out and turning its self off. I don't know what to do, so please help :|

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

Re: USB ports not grounded?

Wed Mar 08, 2017 7:09 pm

all metal shell connectors of any PI (USB, HDMI Ethernet) are always electrically connected to the main ground plane of the PI.
However, that ground plane is isolated from earth, except if it is earthed through the ground-wires of the HDMI cable, and though the monitor's power supply to the earth-prong of your TV's power cable.

Maybe you are statically charged, and discharge to the PI's ground when you touch any of the grounded parts, like any metal shell of the PI's connectors.

coolstuff
Posts: 20
Joined: Wed Mar 08, 2017 6:36 pm

Re: USB ports not grounded?

Wed Mar 08, 2017 7:12 pm

mahjongg wrote:all metal shell connectors of any PI (USB, HDMI Ethernet) are always electrically connected to the main ground plane of the PI.
However, that ground plane is isolated from earth, except if it is earthed through the ground-wires of the HDMI cable, and though the monitor's power supply to the earth-prong of your TV's power cable.

Maybe you are statically charged, and discharge to the PI's ground when you touch any of the grounded parts, like any metal shell of the PI's connectors.
How would I fix this?

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

Re: USB ports not grounded?

Wed Mar 08, 2017 7:23 pm

mahjongg wrote:all metal shell connectors of any PI (USB, HDMI Ethernet) are always electrically connected to the main ground plane of the PI.
[slightly off-topic]except for the camera connector lugs on the Zero 1.3 & W.

I know there are proper ground points aplenty, but the end result of my literal wiring shortcut took me a while to fault find...[/ot]

coolstuff
Posts: 20
Joined: Wed Mar 08, 2017 6:36 pm

Re: USB ports not grounded?

Thu Mar 09, 2017 8:15 am

Bump - Anyone have a suggestion?

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: USB ports not grounded?

Thu Mar 09, 2017 8:51 am

Earthing is a dark art. Get it wrong and you end up with more problems than if you don't do it.

Generally the answer is that you should have exactly one earth point for everything. If your Pi is earthed through the HDMI lead, then that is all you need or should have. It is a feature of most of the Pi power supplies that they do not earth the zero volt wire. Which means that if you do not have a HDMI cable connected, or if that particular monitor does not earth the HDMI shell, then you don't have any earth.

In industry, the earth point is a single stud in the metal case to which everything is connected, including the zero volts cable. However with a plug-in power-supply there is no safe way to emulate that -- you can't get at the earth pin. There are ways and means, but none that anyone can recommend because they involve somewhat unsafe practises. If you knew how to do them safely, you wouldn't need to be told how.

Probably the safest way is to replace your power supply with one that does earth the zero volts line or at least brings the Earth out where you can get at it. But those are (a) expensive compared to a plug-in one, (b) have live voltages around that you need to wire up and, (c) don't come with micro-USB plugs.

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

Re: USB ports not grounded?

Thu Mar 09, 2017 11:13 am

What is it that your touching the ports with? What are you using for power and how is it connected? Anything connected to the GPIO pins?

coolstuff
Posts: 20
Joined: Wed Mar 08, 2017 6:36 pm

Re: USB ports not grounded?

Thu Mar 09, 2017 4:34 pm

alphanumeric wrote:What is it that your touching the ports with? What are you using for power and how is it connected? Anything connected to the GPIO pins?
I have ground and 5V going in through the GPIO pins and its whenever anything metal touches the USB/Ethernet port shell.
Earthing is a dark art. Get it wrong and you end up with more problems than if you don't do it.

Generally the answer is that you should have exactly one earth point for everything. If your Pi is earthed through the HDMI lead, then that is all you need or should have. It is a feature of most of the Pi power supplies that they do not earth the zero volt wire. Which means that if you do not have a HDMI cable connected, or if that particular monitor does not earth the HDMI shell, then you don't have any earth.

In industry, the earth point is a single stud in the metal case to which everything is connected, including the zero volts cable. However with a plug-in power-supply there is no safe way to emulate that -- you can't get at the earth pin. There are ways and means, but none that anyone can recommend because they involve somewhat unsafe practises. If you knew how to do them safely, you wouldn't need to be told how.

Probably the safest way is to replace your power supply with one that does earth the zero volts line or at least brings the Earth out where you can get at it. But those are (a) expensive compared to a plug-in one, (b) have live voltages around that you need to wire up and, (c) don't come with micro-USB plugs.
So basically what you're saying is that I might as well just buy a new pi? Is there not a work around?

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

Re: USB ports not grounded?

Thu Mar 09, 2017 4:57 pm

A work around for what?

What you are claiming doesn't make sense, are you saying that when you touch the metal shells of the PI with anything made out of metal, like a simple fork, the PI resets?
That doesn't make sense, there are just two scenarios I can imagine when that would happen:
  • You are charged with electrostatic electricity when you do, for example its freezing outside so humidity of the air is very low, and just before you touch the PI you have taken off your nylon jacket
    *or*
  • There is a loose contact somewhere, and just the mechanical shock of touching the PI sends shock-waves though the PI that break that contact

coolstuff
Posts: 20
Joined: Wed Mar 08, 2017 6:36 pm

Re: USB ports not grounded?

Thu Mar 09, 2017 5:44 pm

mahjongg wrote:A work around for what?

What you are claiming doesn't make sense, are you saying that when you touch the metal shells of the PI with anything made out of metal, like a simple fork, the PI resets?
That doesn't make sense, there are just two scenarios I can imagine when that would happen:
  • You are charged with electrostatic electricity when you do, for example its freezing outside so humidity of the air is very low, and just before you touch the PI you have taken off your nylon jacket
    *or*
  • There is a loose contact somewhere, and just the mechanical shock of touching the PI sends shock-waves though the PI that break that contact
I mean if it helps I have a composite display and a powerboost also connected.

Its literally as simple as whenever it comes in to contact with anything metallic it shuts its self down and turns on again moments later... I don't know how else to explain it..

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

Re: USB ports not grounded?

Thu Mar 09, 2017 6:01 pm

What are you using for power and why is it connected to the GPIO Pins?

coolstuff
Posts: 20
Joined: Wed Mar 08, 2017 6:36 pm

Re: USB ports not grounded?

Thu Mar 09, 2017 6:27 pm

alphanumeric wrote:What are you using for power and why is it connected to the GPIO Pins?
Its being powered through the GPIO pins because I want to use it for portable use. Powers coming straight out of the wall in to a powerboost and then break-out board which splits ground and power. Pi gets 5v and the display gets 5v. It worked fine one day and then I came back to it the next and now the pi is allergic to metal.

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

Re: USB ports not grounded?

Thu Mar 09, 2017 6:29 pm

Allergic to metal?

NONSENSE!

if it's really "allergic to metal" then it must be some kind of magic, no device can be "allergic" to being touched by metal.
Except perhaps when that "metal" is somehow connected to a large electric voltage, relative to the PI, but nothing you have yet stated supports that theory.

I'm still taking this seriously though, so I have to ask, if you have a multi meter (voltmeter) what happens (what do you read on the meter, set to measure AC Volts) when you touch one probe of it to a metal shield of the PI (any one of the metal connectors of the PI), and you connect the other probe electrically to some place that is connected to ground, say a metal water tap, or to the ground wire of your electrical system or if you have nothing in place that is earthed, use a wire connected to a metal stake in the ground.
Does the meter show a voltage, for example say 50 Volt AC...
In that case remove the HDMI cable, and measure again.
Is the 50V AC gone?
If so, then the ground of your TV has a dangerous voltage relative to earth, perhaps you forgot to connect your TV to an earthed wall socket, or your electrical installation has a grounding fault.

P.s. two more questions:
where do you live by the way? Is your mains net 110V or 240V
What do you mean by "powerboost"? If you are powering it from mains, what is the device that provides electrical isolation between mains and your PI?
If your "powerboost" looks like this:
Image
then its incredibly dangerous to connect it directly to mains, so what powers the powerboost? Batteries?

coolstuff
Posts: 20
Joined: Wed Mar 08, 2017 6:36 pm

Re: USB ports not grounded?

Thu Mar 09, 2017 7:34 pm

mahjongg wrote:Allergic to metal?

NONSENSE!

if it's really "allergic to metal" then it must be some kind of magic, no device can be "allergic" to being touched by metal.
Except perhaps when that "metal" is somehow connected to a large electric voltage, relative to the PI, but nothing you have yet stated supports that theory.

I'm still taking this seriously though, so I have to ask, if you have a multi meter (voltmeter) what happens (what do you read on the meter, set to measure AC Volts) when you touch one probe of it to a metal shield of the PI (any one of the metal connectors of the PI), and you connect the other probe electrically to some place that is connected to ground, say a metal water tap, or to the ground wire of your electrical system or if you have nothing in place that is earthed, use a wire connected to a metal stake in the ground.
Does the meter show a voltage, for example say 50 Volt AC...
In that case remove the HDMI cable, and measure again.
Is the 50V AC gone?
If so, then the ground of your TV has a dangerous voltage relative to earth, perhaps you forgot to connect your TV to an earthed wall socket, or your electrical installation has a grounding fault.

P.s. two more questions:
where do you live by the way? Is your mains net 110V or 240V
What do you mean by "powerboost"? If you are powering it from mains, what is the device that provides electrical isolation between mains and your PI?
If your "powerboost" looks like this:
Image
then its incredibly dangerous to connect it directly to mains, so what powers the powerboost? Batteries?
Its not connected directly to the mains, that would be stupid, I use this https://www.raspberrypi.org/products/un ... er-supply/ which goes to a micro usb breakout which goes to the powerboost. I dont have a multimeter to hand right now, but in a few days I will.

I'm not using a big TV, its a tiny 3.5" composite display.

Im in the UK.

mosespi
Posts: 508
Joined: Mon May 12, 2014 3:35 pm
Location: 34,-118
Contact: Website

Re: USB ports not grounded?

Thu Mar 09, 2017 7:52 pm

Maybe something is loose in your power circuit? Remove that powerboost and just try it with your standard USB input. Maybe there is a power enable input or something that is momentarily cutting your power on your converter, and is effected by some stray power coming in from your 'metal' object.

I too would be curious what this 'metal' is that you have problems with? Is it a connector to some other equipment? Or.. like someone asked.. does a simple fork make your Pi reset? It sort of makes sense that a Pi would be afraid of a fork (yes, silly joke).

BTW, if this is related to static electricity.. which it may be.. you should really stop. I don't have any knowledge of how tolerant or not a Pi is to static discharge.. but most electronics/semiconductors do not like to be 'zapped'.

Regards,
-Moses
Power problems? MoPower UPS for the Pi
http://www.allspectrum.com/mopower/

coolstuff
Posts: 20
Joined: Wed Mar 08, 2017 6:36 pm

Re: USB ports not grounded?

Thu Mar 09, 2017 8:06 pm

mosespi wrote:Maybe something is loose in your power circuit? Remove that powerboost and just try it with your standard USB input. Maybe there is a power enable input or something that is momentarily cutting your power on your converter, and is effected by some stray power coming in from your 'metal' object.

I too would be curious what this 'metal' is that you have problems with? Is it a connector to some other equipment? Or.. like someone asked.. does a simple fork make your Pi reset? It sort of makes sense that a Pi would be afraid of a fork (yes, silly joke).

BTW, if this is related to static electricity.. which it may be.. you should really stop. I don't have any knowledge of how tolerant or not a Pi is to static discharge.. but most electronics/semiconductors do not like to be 'zapped'.

Regards,
-Moses
Its literally anything metallic. I first discovered it when trying to plug in a usb mouse, then I tapped it with my screwdriver and a pair of scissors all with the same result. I will try removing parts of the circuit one by one to try and single out the problem as you suggested.

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

Re: USB ports not grounded?

Thu Mar 09, 2017 8:08 pm

Tap it with the eraser end of a pencil, or something else non metallic and see what happens.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 6055
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: USB ports not grounded?

Thu Mar 09, 2017 8:48 pm

Can you post a photo of the (physical) layout of your setup? (If everything's just arranged on the bench/desk/table/... in a "bird's nest" fashion I wouldn't be too surprised that you're getting odd behaviour.)
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's & P400. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

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

Re: USB ports not grounded?

Fri Mar 10, 2017 4:50 pm

coolstuff wrote: Its not connected directly to the mains, that would be stupid, I use this https://www.raspberrypi.org/products/un ... er-supply/ which goes to a micro usb breakout which goes to the powerboost. I dont have a multimeter to hand right now, but in a few days I will.

I'm not using a big TV, its a tiny 3.5" composite display.

Im in the UK.
Thank god for that, And yes that would be -very- stupid, but it would explain why you are seeing this bizarre phenomenon. Glad you were not in danger (much).
I can only imagine that the (only) reason why metal makes a difference is that it is a good conductor, as you do provide a sudden path to ground when you touch it with something conductive.
I get the feeling that for some yet unknown reason the PI (all electrical parts of it) are charged up (slowly) relative to earth. You not using a monitor means that the PI doesn't have *any* connection to ground (meaning earth) so its possible it is slowly charged up (with energy from from mains I presume) to some high potential, As all the wiring and the PI itself form a small parasitic capacitance with ground as the other "capacitor plate", which is suddenly discharged when it finds some path to ground, even if your body forms a large resistance to ground. what you could do to try this theory, is to have a conductor with minimal mass (a thin metal wire) and touch the shell with that, it would (hopefully) not generate a mechanical shock, but it would still be a path to ground, if such a minimal touch has the same effect then that would rule out the "loose contact with mechanical vibration" theory.
Try connecting a GPIO GND pin with a (long) wire to something that is grounded (more or less, could be a metal object on the ground for example, it doesn't have to be a low resistance path to ground.
That should fix the "if I touch it with a metal object it resets" problem, as it prevents building up a large charge on the PI.

Why is builds up this charge is still a mystery though.

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

Re: USB ports not grounded?

Fri Mar 10, 2017 5:15 pm

coolstuff wrote:
mahjongg wrote:Allergic to metal?

NONSENSE!

if it's really "allergic to metal" then it must be some kind of magic, no device can be "allergic" to being touched by metal.
Except perhaps when that "metal" is somehow connected to a large electric voltage, relative to the PI, but nothing you have yet stated supports that theory.

I'm still taking this seriously though, so I have to ask, if you have a multi meter (voltmeter) what happens (what do you read on the meter, set to measure AC Volts) when you touch one probe of it to a metal shield of the PI (any one of the metal connectors of the PI), and you connect the other probe electrically to some place that is connected to ground, say a metal water tap, or to the ground wire of your electrical system or if you have nothing in place that is earthed, use a wire connected to a metal stake in the ground.
Does the meter show a voltage, for example say 50 Volt AC...
In that case remove the HDMI cable, and measure again.
Is the 50V AC gone?
If so, then the ground of your TV has a dangerous voltage relative to earth, perhaps you forgot to connect your TV to an earthed wall socket, or your electrical installation has a grounding fault.

P.s. two more questions:
where do you live by the way? Is your mains net 110V or 240V
What do you mean by "powerboost"? If you are powering it from mains, what is the device that provides electrical isolation between mains and your PI?
If your "powerboost" looks like this:
Image
then its incredibly dangerous to connect it directly to mains, so what powers the powerboost? Batteries?
Its not connected directly to the mains, that would be stupid, I use this https://www.raspberrypi.org/products/un ... er-supply/ which goes to a micro usb breakout which goes to the powerboost. I dont have a multimeter to hand right now, but in a few days I will.

I'm not using a big TV, its a tiny 3.5" composite display.

Im in the UK.
Doesn't the power boost already have a Micro USB power input? Why use the Micro USB breakout? Why not just plug your power adapter in directly? A picture of your setup may help a lot?

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: USB ports not grounded?

Fri Mar 10, 2017 5:39 pm

mahjongg wrote:I can only imagine that the (only) reason why metal makes a difference is that it is a good conductor, as you do provide a sudden path to ground when you touch it with something conductive.
Another possibility is that the metal object acts as an aerial and injects a large RF voltage onto the ground plane. Although I would guess there must be a powerful transmitter somewhere close by for that to happen.

It doesn't much matter though because the cure is the same in both cases.

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

Re: USB ports not grounded?

Fri Mar 10, 2017 5:44 pm

Some info on how its all wired up may help? What's connected to what contacts on the power boost for instance. Maybe its a wiring issue?

coolstuff
Posts: 20
Joined: Wed Mar 08, 2017 6:36 pm

Re: USB ports not grounded?

Fri Mar 10, 2017 6:44 pm

mahjongg wrote:
coolstuff wrote: Its not connected directly to the mains, that would be stupid, I use this https://www.raspberrypi.org/products/un ... er-supply/ which goes to a micro usb breakout which goes to the powerboost. I dont have a multimeter to hand right now, but in a few days I will.

I'm not using a big TV, its a tiny 3.5" composite display.

Im in the UK.
Thank god for that, And yes that would be -very- stupid, but it would explain why you are seeing this bizarre phenomenon. Glad you were not in danger (much).
I can only imagine that the (only) reason why metal makes a difference is that it is a good conductor, as you do provide a sudden path to ground when you touch it with something conductive.
I get the feeling that for some yet unknown reason the PI (all electrical parts of it) are charged up (slowly) relative to earth. You not using a monitor means that the PI doesn't have *any* connection to ground (meaning earth) so its possible it is slowly charged up (with energy from from mains I presume) to some high potential, As all the wiring and the PI itself form a small parasitic capacitance with ground as the other "capacitor plate", which is suddenly discharged when it finds some path to ground, even if your body forms a large resistance to ground. what you could do to try this theory, is to have a conductor with minimal mass (a thin metal wire) and touch the shell with that, it would (hopefully) not generate a mechanical shock, but it would still be a path to ground, if such a minimal touch has the same effect then that would rule out the "loose contact with mechanical vibration" theory.
Try connecting a GPIO GND pin with a (long) wire to something that is grounded (more or less, could be a metal object on the ground for example, it doesn't have to be a low resistance path to ground.
That should fix the "if I touch it with a metal object it resets" problem, as it prevents building up a large charge on the PI.

Why is builds up this charge is still a mystery though.
Aight, so I tried this and I'm not entirely sure what happened.

I took a long wire as you suggested and connected it to a large metal case I had lying around and then ground on my pi. I then plugged it in and it turned on for a good half a second and then off again. I removed the wire and now it refuses to power on. Is it dead?

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

Re: USB ports not grounded?

Fri Mar 10, 2017 7:44 pm

Take the power boost out and plug your power pack in directly to the Pi and see what happens?

coolstuff
Posts: 20
Joined: Wed Mar 08, 2017 6:36 pm

Re: USB ports not grounded?

Fri Mar 10, 2017 8:06 pm

alphanumeric wrote:Take the power boost out and plug your power pack in directly to the Pi and see what happens?
Awesome, it appears to be cured! I'm pretty sure the powerboost is dead though. I have a couple of questions though:

1. How do I prevent this from happening again?
2. does it periodically have to be connected to a large metal object?

Return to “Troubleshooting”