Filter Noise in 500ns pulse, encoder

Thread Starter

Vindhyachal Takniki

Joined Nov 3, 2014
594
1. I have a encoder, which has A,B & Z output. It is 12V powered. Datasheet says encoder can go upto 300Khz at full speed.
To work with microcontroller(3.3V) but encoder is 12V so I have added a 1000hm series resistor & 3.3V zener diode. Only used A & Z, didn't use B in my circuit.

2. Now I have to detect when rising edge of Z when it comes. But problem is there is random noise comes, which gives false interrupt to microcontroller. The wire length between microcontroller & encoder is around 90cm. I think this could be the problem. However this is case of Z output only, in output A I don't have this problem. it don't give any problem.

3. Attached is pd f. Page 1 shows that I rotate motor at maximum speed, the correct output which I need to detect. Page2 & 3 the noise which cause false trigger to MCU. Page 4 shows correct output at lesser speed.

4. How to remove this noise & correctly detect the rising edge. I had placed 0.01uf or 0.1uF also, but in that case correct waveform never appears. Always noisy waveform appears?

5. Currently I have placed 1000ohm & 3.3V zener , what is the correct way to reduce 12V at such high speed?
 

Attachments

Last edited:

sailorjoe

Joined Jun 4, 2013
364
Vindhyachal, compensated probes means they are adjusted so that their impedance is balanced. On good oscilloscope probes there is a small screw near the tip that you can turn to change the tip capacitance to match the rest of the probe cable. If you don't do it, a good square wave signal will have some over shoot and undershoot, just like in your first photo.

However, you've done some of the obvious things like adding a bypass capacitor to the signal to try to squelch the noise. But the noise is pretty hefty. Can you determine where it's coming from? If yes, then see if you can eliminate it at the source, but usually that's not an option. Instead, consider using a small shielded cable, or even a twisted pair, for your wire from the encoder to the microcontroller. Also, try putting the resistor and 3.3V zener diode near the encoder signal on that same cable. Let us know if that works or not.
 
Top