Optical Quadrature Encoder Circuit

Here is the circuit diagram for a quadrature encoder I made using two phototransistors. I’m using this for the Cylinder Balancing Robot Project.

Encoder Schematic

Schmitt triggers filter the output and adjustments can be made with the three potentiometers–one for adjusting the LED current and one for adjusting the output for each phototransistor. Here is the finished board.

Encoder Circuit Board

I notches out of an index card because it ended up working better than a black and white pattern on the card. Here is a diagram I made planning the circuit board.

Circuit Board Plan

How it Works

See my previous article, Photointerruptor Test Circuit, to see how the circuitry works.

A quadrature encoder works by measuring two square wave signals which are ninety degrees out of phase and advance as the wheel turns.  These two signals are generated by the two photointerruptors

It is called a quadrature encoder because the two signals are always in one of four states.

Quadrature encoder waveform oscilloscope trace with the different states labeled.

By detecting the transitions between states, we can detect clockwise and counterclockwise steps.

A diagram of all the possible state changes on the two lines (A and B). "0" denotes no change, "+" denotes a clockwise step, "-" denotes a counterclockwise step, and "E" denotes an error.

About these ads

About Keegan

Hi, I'm Keegan.
This entry was posted in Circuits, Science Fair and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s