Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

output of optical encoder

Status
Not open for further replies.

shaneelal

Member level 1
Member level 1
Joined
Nov 16, 2004
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
553
optical encoder circuit

I'm using an rs 341-575 optical shaft encoder. The spec sheet has application notes on how to use it to determine speed.
They gave a circuit which the output of the encoder has to pass through.
I'm interfacing the output of this circuit with a PIC18f452. I'm using the PIC to count the pulses to determine speed.
The circuit looks fairly simple. I"m just not sure how to calculate values for it.
from the spec sheet it states
Code:
"The incomming signal from the shaft encoder is filtered by the low-pass network R1,C1 to remove the ac component and leave only the dc level"

Also
Code:
"Resistor R2 has two functions,firstly it ensures the comparator output is high when there is no input,and secondly,by setting a threshold level it improves noise immunity"

The attachment also includes an input and output waveform of the circuit. The A's are the same voltage value.
Those were drawn in paint,does anyone know of a good program to draw waveforms?
The device also has a max operating frequency of 50kHz.
For the low pass filter,what value of cut off frequency should I use?
How can I determine the value of R2?
Any questions plz ask,I thank you for reading.
 

optical encoder output waveform

The two R and a C circuit form the basis for the comparator comparisons. The resistor ratio sets the level and the capacitor does a long term averaging.

As a first try, make the two resistors equal. The capacitor time constant with one half of a resistor value should be several times the slowest rotation pulse period.
 

    shaneelal

    Points: 2
    Helpful Answer Positive Rating
Thanks for replying.What value resistors should I use?
 

In general, the highest values that work. Remember that the input bias current on the comparator flows through them and adds to the offset. This way you can use a small capacitor which will be more economical. The input bias current is 100 nA so if you want 1 mV of additional offset, you should use 20 k ohms for each. If you do not mind 10 mV of additional offset, 200 k ohms will work.
 

    shaneelal

    Points: 2
    Helpful Answer Positive Rating
thank you for your help flatulent.
Why does the time constant with one half of a resistor value have to be several times the slowest rotation pulse period?
 

You want to make sure the slicing reference level is at the 50% point so that any noise on the signal does not make additional output transitions on the comparator.
 

    shaneelal

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top