I'd go for bunalmis' circuit. I think you're dealing with transient noise, actually it's a pain in the you know what.
Keep it simple, use a 4.7k pull up resistor, that is one end of the resistor tied to +5 volts and the other end to the input signal, and a .01 microfarad capacitor tied to the input and ground.
Use it near the input and of course, by all means use shielded cables. Sometime it's a good idea to use ferrite core in series of the input signal too.
I've had a similar problem testing high speed actuator for transient analysis for aircraft applications where the transient spikes would mess up the computer. |