I have a microcontroller (ESP8266) which has one GPIO pin configured as "INPUT" with enabled internal pullup resistor. If I check the voltage of this pin using an oscilloscope I can see that it's near VCC (3.3v) with very low ripple/noise. A 10cm wire with open end is connected to this GPIO pin. Once I touch the open end of this wire, the GPIO pin "goes crazy". The oscilloscope shows very high noise (peak to peak approx. 2v) and this behavior continues as long as I'm touching the wire.
This also causes an interrupt (which is enabled on this GPIO) to trigger continously, which is my problem I need to solve. I need to "harden" my circuit, that even touching the open end of the wire does not bring any (or very low) interference into the circuit.
I tried to solve this by putting an 100n capacitor across the GPIO pin and GND. The oscilloscope showed, that there is no more interference.
I would like to know, is the approach (fixing it with a cap) correct? And why does touching the open end of the wire cause a pulled-up GPIO pin to go crazy? Is this an EMI issue or whats the explaination for this?
Btw: The microcontroller is powered by a switching power supply. Schematics of the power supply are available in this document on page 2: Schematics
Any comments are greatly appreciated! Thanks