I have built a circuit that measures time between two 5V pulses. It works good but I'm having problems with voltage spikes that comes from the AC mains. And it triggers the interrupt pin on the PIC.
When turning on/off another power supply on my test bench I get a voltage spike around 5V on the DC side of my AC/DC. I'm using a TracoPower TMP 7105 switch mode supply and there is a built in filter in the device socket.
How should I avoid false readings on the interrupt pin? Filter the signal? Or try fixing the noise somewhere else?
EDIT #1: I understand that I may have explained some things to badly. I have tried to run the circuit with a battery and the noise disappears, sadly is that not a possible solution.