High Frequency clipping

Discussion in 'The Projects Forum' started by yassser, Sep 26, 2012.

  1. yassser

    Thread Starter Member

    Jul 25, 2011
    91
    0
    Hello ,

    I'm trying to interface a 5000 pulse per revolution rotary encoder to a microcontroller , the encoder output is a square wave (logic 0 : 0v , logic 1 : 12v) , i need to clip this signal to 5v for the microcontroller , the frequency of the encoder signal is up to 300 KHz (depending on the encoder rotation speed) .

    the encoder outputs two signals (as the figure shows) , at the positive edge of signal A , I check on the value of signal B , if its 1 it means the encoder is revolving in one direction , if it is 0 , it is revolving in the other direction , and according to that i can increment or decrement the value of the variable (in the mc) representing the angular displacement of the encoder.

    [​IMG]

    i first used a fast mosfet (2n7000) to do the clipping (Figure 2) , its on-time and off-time is 10ns , i tested it , it works well in low frequencies , but when the frequency exceeds 70KHz , the counting variable starts decreasing while the encoder is revolving in the positive direction , which means that at the positive edge of the signal A , B is 1 , but it was read as zero , because the switching is not fast enough .

    [​IMG]

    this limits the speed of the encoder to a lower value than it can .

    i then thought about using the zener clipping circuit(Figure 2) , but i read that zener clipping circuits are also not reliable in high frequencies .

    is there a better way to clip high frequency signals (300KHz)

    thanks very much
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    Keep the series resistor R18.
    Install a Schottky diode from R18 to +5V (cathode to +5V).
     
  3. yassser

    Thread Starter Member

    Jul 25, 2011
    91
    0
    thanks very much
     
  4. wayneh

    Expert

    Sep 9, 2010
    12,100
    3,034
    This may be a stupid question, but why not just use a resistor voltage divider to drop the voltage from 12 to 5?
     
Loading...