Debouncing of an Interrupting Device to prevent Multiple Triggering - how?

The LOW-level trigger mode could still be used; but, it is at the expense of hardware/software should the situation requires such an arrangement.

The reality is any device causing an interrupt should NEVER have a bounce problem. Chose a different device or add electronics at the device to solve the problem.
Paul

Being a major in hardware, I perform varieties of experiments and present those to my pupils to see at which one they feel interested and the learning goes accordingly.

The present problem, in fact, came from the pupils when they observed multiple interrupts at LOW-level trigger mode, which I was unable to solve and then naturally asked the Forum for ideas. Myself usually uses either FALLING edge or RISING edge trigger mode and use hardware debouncer (the one-shot, Fig-1) to overcome the ~20 ms bouncing period of the mechanical type "Interrupting Device (the switch K1)"


Figure-1:

Very good! The software solution may work for this particular device, but the next one will perform differently and so will the one 100 from now. Your solution solves the problem at the source.
Paul

1 Like

I was taught back in the 1970's by electrical engineers (at that time) far more experienced than me to never use 74123s. Why are you insisting on adding hardware to a solution that is not needed? Likewise in the earlier post #38 you added a flip-flop just so you could use LOW rather than FALLING trigger. Why fight what the microcontroller will do for you free? Please learn how and where to to use interrupts properly. Strive for the lowest cost (minimal parts) and simplest (easiest to maintain) solution rather than the lazy one.

If it still doesn't work with a clean design, it's time to grab an oscilloscope to see what is really happening with K1 because it's not readily apparent.

If I had "real" students, I would be happy if they took away from this lesson, the idea that interrupts are not the best way to sample a manual switch.

Beautiful!

The idea was not to sample the state of the external swicth; rather, it was to inject LOW level interruptng signal in order to verify the functionalities of the supported trigger modes as is shown in Fig-1. Moreover, people should have the liberty to experiment their ideas on prototypes?


Figure-1:

If that is the lesson, it's better performed with stable signals. For example, generated by another Arduino or else looped back from another pin configured for output.

I would save the entire mess of switch bounce for a different lesson. Of course, questions and experimentation is wonderful. When I went to school, one student accidentally made his amplifier into an RF transmitter (audible in everyone's project in the lab). Then when the oscillator project came along, he couldn't make it work. :slight_smile:

1 Like

Noted with thanks.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.