imsdal70
Posts: 41
Joined: Wed May 30, 2018 9:16 pm

555 timer for button debouncing

Tue Jun 15, 2021 4:50 am

Will LMC 555 timer with Vcc=3V configured in ( one-shot ) mode or monostable mode work as a button debouncer connected to pi? I was thinking about clean GPIO interrupt, ( falling or rising edge )

User avatar
pasman1
Posts: 197
Joined: Mon Aug 10, 2020 3:01 pm
Location: Poland

Re: 555 timer for button debouncing

Tue Jun 15, 2021 4:59 am

yes.

you may test software debouncer with

Code: Select all

bouncetime
parameter.
Pi4 Linux raspberrypi 5.10.17-v8+

imsdal70
Posts: 41
Joined: Wed May 30, 2018 9:16 pm

Re: 555 timer for button debouncing

Tue Jun 15, 2021 8:48 am

thanks, I will give it a try with a 555. Software debouncer is a useful advice but sometimes I find it tricky to decide what debounce time to set.

imsdal70
Posts: 41
Joined: Wed May 30, 2018 9:16 pm

Re: 555 timer for button debouncing

Fri Jul 02, 2021 9:58 am

I have a working button debounce circuit based on the LMC 555 timer Vcc = 3,3V. It's configured in monostable mode with a positive pulse T = about 0,1 sec. When the 555 is not triggered it's output pin 3 stays LOW. Se attached picture. I have configured Pi with an interrupt, (falling edge ). What concerns me before I connect pin 3 555 to GPIO is if I should worry about how to set the GPIO ports during the initialization:

Code: Select all

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

or

GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)

Does it matter how I set pull up or pull down? Given LOW at pin 3, 555 startuptime?
Attachments
SDS00006.png
SDS00006.png (13.96 KiB) Viewed 231 times

drtechno
Posts: 262
Joined: Fri Apr 09, 2021 6:33 pm

Re: 555 timer for button debouncing

Sat Jul 03, 2021 12:21 pm

imsdal70 wrote:
Fri Jul 02, 2021 9:58 am

Code: Select all

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

or

GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)

Does it matter how I set pull up or pull down? Given LOW at pin 3, 555 startuptime?
not really because any pull up or down the output on the cmos 555 will act like a loading resistor to vcc or gnd . The ones internal to the gpio array is 100K btw.

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