Saturday, February 11, 2012

Investigating Rotary Incremental Quadrature Encoders

My interest in encoders started when I noticed that the volume control knob on my home stereo receiver/amplifier was acting strangely.

After some years of trouble free operation, I noticed that when I turned it on, and discovered that "the kids" had cranked the volume up to an intolerable level before turning it off, my frantic attempts to spin the volume knob in the CCW direction to lower the volume had the effect of increasing it even more!

Some experimentation revealed that by turning the knob very slowly CCW, the volume could be lowered. Turning the knob in the CW direction did not exhibit this behavior--that worked normally.

I mentioned this to my Electrical Engineer friend Gus. He asked me "Is the knob the kind that turns endlessly in either direction?" I told him it was, and he guessed it was probably a "rotary quadrature encoder".

Now, in my years as an Instrumentation & Controls technician, I had some exposure to shaft encoders on large machinery. Most of the ones I had seen simply output a switch contact to signal that a shaft or gear was either turning or not turning. Only a few of the ones I'd seen actually sent a signal range indicating the speed, direction or amount of rotation.

And I'd seen a float type level gauge for above-ground petroleum storage tanks. I'm referring to the trusty Varec 2900 Automatic Tank Gauge, with optional 2900 Float Tape Transmitter.  This device has a metal tape connected to a float inside the tank, going up and over two pulleys, and back down the outside of the tank (inside a metal tube) to a "head unit", where there is a spring to keep the tape under tension, without lifting the float out of the liquid, or preventing it from following the liquid level as it moves up or down.

Inside the head unit is a mechanical system which uses the motion of the metal tape to operate a large display, much like the old mechanical odometers found in automobiles. This provides a local display for reading the tank level visually.

The optional Float Tape Transmitter contained a circular wheel, much like a printed circuit board, with concentric rings of conductive traces linked together. Electrical spring contacts (we called them fingers) would ride on these rings and send either a "continuity" or "non-continuity" (as the encoder wheel was turned by the mechanical gauge) to an electronic circuit board that would convert that information into an analog signal range of 4 to 20 milliamps  of DC current--4 for "tank empty" and 20 for "tank full", and all the levels between those two points.

That signal could then be sent far away to a control room, to drive a remote display indicating the tank level, and perhaps optionally sound an alarm if the tank got "too full" or "too low", or turn pumps on and off, to maintain some desired level. 

OK, back from memory lane. Let me continue with a discussion of some terms I discovered.

This term "quadrature" sparked my curiosity, so I started searching the internets for more information. The first thing I learned is there are different words to describe encoders: Linear, Rotary, Absolute, Incremental, and Quadrature.

Linear and Rotary describe the type of motion the encoder detects. A linear encoder might report on the movement of some machine part that only moves in a straight line--forward and backwards, like the print head of a printer. A print head moves back and forth across the paper, depositing drops of ink, and its position and speed must be controlled precisely. Rotary, as the name suggests, means that the encoder is detecting motion in something that...(you guessed it) rotates.

Absolute and Incremental describe the manner in which the encoder detects and reports on the motion being observed. The example I gave, of a float type tank level gauge, would be an "absolute" encoder.

That means that for each position detected, there is a unique combination of bits (remember the multiple fingers reading "on" and "off"? That's a group of bits that can be read as numbers.)

Incremental, on the other hand, means the encoder can only detect changes--a change in distance (linear) or angle (rotary) from the previous to the current position, or the speed (and perhaps direction) of movement (linear) or rotation. You wouldn't be able to tell the exact position from that information.  You wouldn't know "where you are" unless you knew "where you were" and "how far you went".

So, I learned that my malfunctioning volume knob is an example of a Rotary Incremental Quadrature Encoder.

In my next post, I'll try to explain in more detail how encoders are made, and how they work.





No comments:

Post a Comment