# Pushbutton Circuit - Triggers Event when no button press

I have been using the circuit below. I have noticed there are times the circuit will trigger on its own without any button press. Sometimes it can trigger a few times within an hour. The components are soldered onto a PCB Board. I have my raspberry pi GPIO set as a pull down (GPIO.PUD_DOWN). The interrupt event is triggered on GPIO.RISING and I have a SW bouncetime of 50 seconds. The 3.3V source is connected to the 3.3V and GND rails on the Raspberry Pi. The Raspberry Pi is connected to a wall outlet using a 5V 3A adapter. The wires connecting the GPIO pin to the pushbutton are stranded copper. The distance between the GPIO pin to the pushbutton is about 3-5 inches. I have a PiCamera, 5V 0.5A Motorboard, 10mA Fan and 4 leds (<5mA total) connected to the Raspberry Pi as well in case load would be an issue. Power consumption is about 4 Watts on average.

Is my pull down resistor too low? Possibly a Raspberry Pi GPIO issue? Something else to look into or change circuit wise?

Interrupt Setup via Python:

GPIO.setup(button_gpio,GPIO.IN, pull_up_down=GPIO.PUD_DOWN)

• 50 seconds of bounce time? Are you breadboard ? – Curious KP Sep 17 '20 at 17:43
• @KiranPhalak I just overshot the number a lot to hopefully guarantee no bouncing signal. It was not the case. So I need to pinpoint the true cause here. I am using a PCB for my circuit. – SChand Sep 17 '20 at 17:55
• Where does the 3.3V come from? The Pi? If not, do you have it grounded to the Pi correctly? – Scott Seidman Sep 17 '20 at 17:58
• Typically this circuit would have a capacitor across R1 to debounce environmental noise. 1uF, 0.1uF or 10nF. The capacitance value depends on what rise time can be tolerated for at the GPIO input. That would be my first try. – user30884 Sep 17 '20 at 18:03
• @user30884, switches don't typically have capacitors across them. It depends on the environment but there's almost always no need. A capacitor causes a slow rise and/or fall time and that's not helping a digital input, particularly if it's not a Schmitt trigger input. Do debouncing in digitally.and remove unnecessary capacitor part and cost. – TonyM Sep 17 '20 at 18:18