[HomeBrew] Shaft encoder lesson
James C. Garland
4cx250b at muohio.edu
Tue Mar 28 20:12:45 EST 2006
Richard,
I'm not familiar with the requirements of your project, but I'd
imagine you'd need a quadrature encoder. If you turn the shaft on
quadrature encoder at a constant rate, the A and B outputs will
produce square waves that are 90 degrees out of phase with each
other. The software in the DDS microprocessor can use these two
outputs to tell how much you've turned the shaft, and also whether it
was turned in a CCW or CW direction. One output is sufficient to tell
the rate of rotation, but both outputs are needed to determine the
sense of rotation (CW or CCW).
YOu might be able to use your optical encoder in this application.
Basically, your optical encoder will also have A and B outputs and a
GND, but also a Vo pin, which you would normally connect ot +5V. The
A & B outputs would then be either 5V or 0V, depending on the shaft
position. WIth any luck, you should be able to control your DDS with
these outputs.
You can look up the grey code and hexdecimal codes on Google to get a
good explanation. I'd be very surprised if your DDS circuit used any of these.
73,
Jim Garland W8ZR
At 05:50 PM 3/28/2006, you wrote:
>** Please do NOT cross-post messages when posting to HOMEBREW **
>
>Greetings to all on list.
>I am in need of your expertise regarding mechanical shaft encoders.
>I am building a DDS VFO project and it calls for a mechanical
>encoder with three pins.
>Output A, Com, Output B. so far so good.
>I already own an optical shaft encoder, but I do not know how to
>adapt it to the circuit.
>
>Question:
>
>When I go to the Digikey site to order a mechanical
>"Grayhill" encoder, I find they come in different flavours, such as
>hexadecimal, 2 bit, grey, and quadrature. I have no idea what I need.
>
>The encoder will feed a 16F628, A to RA0, B to RA1 and com to RB4
>
>Please- what is the difference between the encoder types? Am I
>asking a question that takes a textbook chapter to answer?
>any comments appreciated
>
>Richard VA3NDO
>_______________________________________________
>HomeBrew mailing list
>HomeBrew at mailman.qth.net
>http://mailman.qth.net/mailman/listinfo/homebrew
More information about the HomeBrew
mailing list