Filter noise/spikes from interrupt pin

Hello everyone, I was trying a small prototype breadboard Arduino to turn on an LED when a FALLING EDGE occurs on interrupt 0 pin (pin 4) of ATMEGA328P.

I connected a resistor of 10k pull-up on the 5v pin interrupt, I have a small relay driven in dc (externally) that closes to ground for about 1 second on the pin and the MCU recognizes interrupt illuminating the led.

The problem occurs when, for example, near the breadboard occurs a spike caused for example by a closing of a 220vac contact (not connected to breadbord nor even to the microcontroller). In few words, a spark (220VAC contact closure ) leads to trigger the interrupt on the MCU, so I wanted to know if there is a way to filter out with hardware outside noise/spike, so as not to take it into account if it lasts less than 500ms.

74HC14 with an RC filter might do to my case? If not, what do you recommend?

Thanks in advance.


I had a similar issue there.