Author Topic: Filter Noise in 500ns pulse, encoder pulse  (Read 1584 times)

0 Members and 1 Guest are viewing this topic.

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 487
Filter Noise in 500ns pulse, encoder pulse
« on: January 09, 2016, 12:39:26 pm »
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.

3. Attached is pdf. 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?

6. File is here: http://docdro.id/Lg8dA5S
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14199
  • Country: de
Re: Filter Noise in 500ns pulse, encoder pulse
« Reply #1 on: January 09, 2016, 12:52:22 pm »
For the step from 12 V to 3 V a resistive divider (e.g. 1.5 K and 470 Ohms) could be slightly better than resistor and zener diode - it depends on the zener diode.  Up to 300 kHz is not yet that fast. For a fast signal a suitable capacitor parallel the the higher resistor can help a little.

This looks like massive ringing on the line due to reflections on the 1 m of cable. One could try approximate termination. So something like a 100 Ohms series resistor at the decoder and possibly something like 100 Ohms and 10nF in series to GND at the µC side of the capble. 
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Filter Noise in 500ns pulse, encoder pulse
« Reply #2 on: January 09, 2016, 03:38:02 pm »
This looks like massive ringing on the line due to reflections on the 1 m of cable. One could try approximate termination. So something like a 100 Ohms series resistor at the decoder and possibly something like 100 Ohms and 10nF in series to GND at the µC side of the capble. 

This ringing should not trigger any false interrupts, though.

As for the noise, for slow lines (<1 MHz) adding 100 pF to in- and outputs closely to the transition into/outo the system helps. I'd do what Kleinstein suggested, the resistive divider near your MCU, but also add another cap after it, again 50-100 pF or so.
,
 

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 487
Re: Filter Noise in 500ns pulse, encoder pulse
« Reply #3 on: January 11, 2016, 04:04:49 am »
I will try to add 50pf-100pf capacitor at uc end to see the result.
12V is tyoical. It can vart from 9-12V. That's why I had placed a zener, so that it any case it maintain 3.3V.

That 90cm cable is of decoder, I cannpt cut short it, its with the decoder itselg. All I can add circuitry at uc end.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf