he he It work fine Darrel !!
perhaps a another question,the optical coder has only one output TTL.
I count the pulses with the pin RB0/INT but how to know if it turns in a direction or the other?
he he It work fine Darrel !!
perhaps a another question,the optical coder has only one output TTL.
I count the pulses with the pin RB0/INT but how to know if it turns in a direction or the other?
Unless you have some other way of knowing which way it's going, I don't think you can.
If it needs to keep track of absolute position in both directions, you'll probably need a "Quadrature Encoder".
<br>
DT
Hello all
1) Which is the method of programming used for to know the directions of rotation with these optical coders?
2)the next opticals coders agree?
thank's
2) I don't think the encoders in the picture are direction sensing (Quadrature). You need an encoder with two output signals, out of phase with each other.
1) With a quadrature signal (phase a and phase b, offset by 90 degrees) you can tell direction by watching which phase goes high first. Count pulse for distance, just like you are doing now. Google quadrature encoder ...all kinds of info available
You can get "absolute" encoders, which give a unique bit pattern for each position of rotation. I think there are some encoders which give a step and direction signal also, but I might be thinking of stepper drivers!
Last edited by dmairspotter; - 28th December 2005 at 15:50.
Index usually gives a pulse at one particular point in each turn of the encoder, like a "home" signal.
The encoder in the photo is not a quadrature encoder. quadrature encoders have two channels (usually called A and B) and sometimes also an index as full revolution reference, and as you see (read) in the photo, it has only the full revolution reference (index) and 1 channel (channel A). you can get nice and cheap motors with quadrature encoders in the surplus market.
You may want to have a look at US Digital website, to find appropriate encoders.
I would also suggest you to use PIC18FXX31 family. They have built-in quadrature encoder interface module with distance, direction and speed. Much easier to deal with and with extra features like noise protection too. I'm personally using PIC18F4331 and it work great with stepper + quad. encoder.
Hope this can help!
J-P
Huh? Last question was 8 months ago ? (Ooooooops)
Last edited by GrandPa; - 13th October 2007 at 15:41.
Bookmarks