Posts: 1
Joined: Mon Mar 19, 2018 10:05 pm

Incorrect values on GPIO without ground

Mon Mar 19, 2018 10:19 pm


please, when I read GPIO pin:

- empty - read 0 - correct
- connected to +3,3 V - read 1 - correct
- connected to GND - read 0 - correct
- connected to free cable (with unconnected second end) - read 0/1 with high frequency change - WHY?

How it's possible read still zero on unconnected (ungrounded) pin?

I read value through python RPi.GPIO:

Code: Select all

while True:
	print GPIO.input(7)

Posts: 2713
Joined: Fri Jun 08, 2012 6:03 pm

Re: Incorrect values on GPIO without ground

Tue Mar 20, 2018 10:03 am

These unconnected pins are known as floating pins or floating inputs. An unconnected pin is a little antenna that picks up electrical interference from other ICs on the same board, other devices or just background interferance.

https://learn.adafruit.com/circuit-play ... ing-inputs
https://www.mouser.com/blog/dont-leave- ... s-floating

This is why we use pull up/pull down resistors.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: No registered users and 6 guests