Posts: 12
Joined: Wed Dec 03, 2014 9:52 pm

GPIO and grounding issue

Mon May 16, 2016 12:22 am

I've run into an issue using my RP 2 as a remote switch via the GPIO pins. Basically it comes down to the fact that the AC outlets in the building (its old) do not have an earth ground. They seem to ground to whatever the framework the outlet is connected to, in this case wood. The Pi relies on the ground from the monitor, I know that, but since neither has a proper earth ground, the GPIO seems to spike when other electronics in the room are turned on or off, causing the GPIO pin to toggle from low to high, causing unwanted actions in my remote switch system.

Hopefully this makes sense.

Is there a way this can be resolved without having the wiring in the building updated (this isn't an option)? I know its an issue with the floating ground that is being generated in the system, but I cannot come up with a solution. I thought about a decent sized capacitor between the buildings "ground" and the monitor to stabilize the voltage through the spike, but no luck.

Any help or ideas would be appreciated.


User avatar
Posts: 335
Joined: Wed Feb 03, 2016 3:36 pm
Location: HU

Re: GPIO and grounding issue

Mon May 16, 2016 9:58 am

Grounding is not a good idea. The pi power supply is isolate the pi from the ground contact, because they are double isoleted and has only two contacts in the mains. The solution is not grounding, rather using double isolated staff controlled. Your spikes comes from the grounded controlled staff.

(Double isolation means mains is isolated from eachothers and additionally there is an isolator round the two of them)
on a Raspberry B+ with whezzy, two Zero with Jessie Light

Posts: 141
Joined: Fri Feb 26, 2016 9:20 am

Re: GPIO and grounding issue

Mon May 16, 2016 12:23 pm

reply to piefairy on GPIO and grounding
The spike noise that causes error comes onto the signal pin vs ground pin then even if that ground is earth grounded the noise is still onto the signal pin. What you have to do is to shield the signal line vs the ground of Pi and your device in common. And in case of the noise is like spike shaped then it involves high frequency component and such spike travels and might be bigger along with your ground line that becomes as an antenna.

Return to “Troubleshooting”