1

I have a raspberry pi 3 model without anything attached. If I configure a GPIO as input with the internal pull up resistor enabled, the GPIO reads high as expected. However, the interrupt randomly detectes raising edges. I can even cause them by touching the USB casing (which the RPI connects to ground) with a single wire.

Why? How can I stop that? I already tried

  • an external pull 4kOhm-pull-up resistor
  • a 0.1mF capacitor between 3.3v vcc and gnd
  • a 0.1mF capacitor between gpio and gnd

For clarification: I want to detect my door bell ringing using an opto-coupler. I also want to have as much precision as possible so that I can decode ringing-codes (50ms precision should be enough though). Sadly I get random false positives :(

Henning
  • 111
  • 3
  • 1
    Internal pull-ups are pretty weak. I would try the 4K external pull-up first. But if touching the USB casing causes it to happen you might have an ESD problem. – DKNguyen Jun 15 '19 at 18:39
  • Please provide a schematic that shows the external circuit that's connected to the GPIO pin. If the only components are the 4k pull-up resistor to +3V3 and a 0.1mF cap to ground, then you probably have excessive noise on the power supply, or perhaps some component has been damaged (but not destroyed) by electrical overstress (EOS)--e.g., by an electrostatic discharge (ESD) event from handling the board with your bare hands. – Jim Fischer Jun 15 '19 at 20:07
  • If you have an oscilloscope, use it to observe the voltage the +3V3 power rail and ground and look for voltage droop and voltage spikes. (A multimeter won't work here; you must use an oscilloscope.) And use the oscilloscope to observe the voltage at the GPIO pin, too. – Jim Fischer Jun 15 '19 at 20:07
  • What's connected to the GPIO? This optocoupler? To narrow down, please remove all external connections to this GPIO and keep the interrnal pull up resistor and touch the USB casing again and check whether it triggers. If it does, you touching the (ground of the) power supply causes the problem. Otherwise the external connections to the GPIO or the GPIO itself (EOS) are the cause. – Huisman Jun 15 '19 at 20:49
  • Thanks for your comments :) The phenomen I described happens even if nothing is connected to the GPIO. Touching gnd with my hands doesn't do anything, touching it with one cable from my multimeter does however. It's a good idea though to test this with another pi! – Henning Jun 15 '19 at 20:57

0 Answers0