Page 1 of 1

External Interrupt Triggers Multiple Times from One Event

Posted: Tue Apr 28, 2026 8:12 am
by eva_402
Hello everyone,
I connected a comparator output to an MCU external interrupt pin. One threshold crossing should generate a single interrupt, but sometimes multiple interrupts occur from one event.
The input signal has some noise near the threshold.
Questions:
Would comparator hysteresis be the correct hardware fix?
Should I also debounce the interrupt in firmware?
On the PCB side, should comparator reference traces be isolated from noisy digital return currents?

Re: External Interrupt Triggers Multiple Times from One Event

Posted: Wed Apr 29, 2026 1:48 am
by Sprite
Any of those can be a solution, yes.

Re: External Interrupt Triggers Multiple Times from One Event

Posted: Thu Apr 30, 2026 10:42 pm
by lichurbagan
Would comparator hysteresis be the correct hardware fix?
Yes, it will fix thigns ... what’s happening here is:

Input hovers around the threshold
Noise causes the comparator to toggle rapidly
MCU sees multiple edges .... so multiple interrupts

Adding hysteresis (positive feedback) creates two thresholds .... One for rising .... One for falling .... This prevents chatter and ensures one clean transition per event.
Should I also debounce the interrupt in firmware?
Yes ... its recommended but dont rely on it ocmpletely .... Firmware debounce (time filtering or ignore window) helps catch any residual glitches .... But it should not be the only solution .... check this discussion, you will get it: https://www.reddit.com/r/AskElectronics ... ebouncing/

So, Fix in hardware (hysteresis) first .... Then add firmware filtering for robustness
On the PCB side, should comparator reference traces be isolated from noisy digital return currents?
Yes .... very important .... Comparator reference and input nodes are sensitive .... so keep them away from digital switching currents and return paths

Use a clean ground reference (analog ground region if possible) .... I normally prefer seperate gnd and power planes .... depends on the complexity of yoru pcb but if its multilayer .... sepearte clean planes saves from a lot of trouble .... check these guides: https://www.aivon.com/blog/pcb-design/t ... -circuits/ https://www.pcbway.com/blog/Engineering ... lanes.html

Avoid sharing return paths with high-current or fast-switching signals
Keep traces short and shielded by ground where possible