0
\$\begingroup\$

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?

Circuit schema

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.

Here is some captured waveforms with only a 100 Ohms 6W resistor as a circuit. Waveform

\$\endgroup\$
  • 1
    \$\begingroup\$ The complexity of solution depends upon your requirement of the circuit. Please specify in detail, what is your specification of pulse of 5V what is the frequency, on time/duty cycle, source of that pulse, etc. \$\endgroup\$ – Vishal P Oct 17 '18 at 9:48
  • 1
    \$\begingroup\$ What 5V spike, if the supply voltage is 5V? \$\endgroup\$ – Marko Buršič Oct 17 '18 at 10:07
1
\$\begingroup\$

Add a 10nF and a 10 or 100k resistor on your sense line.

schematic

simulate this circuit – Schematic created using CircuitLab

depending of how long is your pulse signal, you might want to adjust the values.

Make sure you have common ground between what you sense and your circuit, if you use long cables, twist the pair and use shielded cables.

\$\endgroup\$
  • \$\begingroup\$ I will try that! But will the filter dampen the signal a bit? \$\endgroup\$ – Martin Oct 17 '18 at 12:43
  • \$\begingroup\$ Yes it will, that is why you need to calculate/try correct R and C values and also consider your resistor tied to the ground. If you give you pulse time it can give some idea. \$\endgroup\$ – Damien Oct 17 '18 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.