Rotary encoder

From Open Source Ecology
Jump to: navigation, search

Rotary Encoder


A rotary encoder converts mechanical rotation of a shaft to electronic signals which can be processed -- typically by an Arduino microcontroller in this context -- for display, machine control, or feedback purposes.

Mature technologies (commercially available) for rotary encoders include

  • optical incremental (quadrature)
  • optical absolute (parallel, gray code)
  • mechanical contact (brush)
  • AC magnetic (resolver, synchro, inductosyn)
  • DC magnetic (hall effect)
  • AC Capacitive

An enormous variety of products are available over a huge range of performance parameters, including

  • Resolution
  • Accuracy
  • Rotational speed
  • size (outside diameter, shaft diameter, thru hole diameter)
  • power requirements

links to existing commercial products

GVCS applications

OSE Encoder Concepts

note: this page was started because I wanted a place to document some brainstorming I had done on the rotary capacitance encoder design. Please add other conventional and/or unconventional concepts as appropriate -- ChuckH

Rotary capacitance encoder ("Capacitive resolver")

This idea addresses a goal to design a high-resolution, fairly accurate encoder that can be made with a minimum of precision equipment (e.g. manual layout, simple lathe work) and minimum purchased electronics outside the "OSE standard" Arduino platform. This design has a base resolution of 48 cycles per revolution and should support ~100x electronic interpolation for a resolution of 1/4800 rev (0.075 degree).

CapEncoderRotor.png CapEncoder.png

Simplified Schematic

The design includes 4 stationary outer electrode rings, offset 1/4 of a tooth pitch, driven by 2-phase square waves A+ A- B+ B-. One rotating inner electrode. All electrodes are splined (e.e. toothed). Buffer the hi-z rotating electrode signal, filter with tuned circuit, and measure its phase to interpolate within 1 spline tooth pitch. (This has been called the "phase analog technique" when used with resolvers. [1]) Electronics can be arduino, development code at File:Cap encoder.ino . Special electronic parts: 1 FET(buffer), inductor, capacitor. Expected carrier freq: 10kHz. Use arduino capture/compare function to measure time of zero crossings. CapEncoderSpiceModel

Electrical Simulation Model

Lay out circle of equally spaced hole centers (say ~3" BC, 48 holes on 7.5-degree spacing) on jig plate. Can use compass/straightedge techniques at large radius. Transfer hole pattern to 4 stator sheets 1/16 thk and one rotor sheet 1/4 thk. Bore ID of stator sheets (as stack). Turn OD of rotor sheet leaving .010 radial clearance. ID of rotor can be bored out to large clearance for large shaft if desired. Note that all parts must be insulated from each other and from ground.


  • Averaging over full circumference should reduce sensitivity to spline tooth pitch errors and mounting eccentricity.
  • Sharply tuned filter should make rotor waveform approx true sinewave. Reactance modulation waveform depends on tooth geometry and is not precisely sinusoidal; empirically calibrate encoder.

Accuracy refinement: Lay out so stator tooth crest is inside bolt circle dia, making slight hourglass tooth profile. Consider this as an internal gear. Make another gear with fewer teeth, relatively prime to stator tooth count, that will mesh inside. Running these two gears in mesh with lapping compound should bring teeth into precisely uniform spacing. After lapping, clean 4 stators and assemble them as above.

Rotary Encoders and Linear Motion

Although precise linear encoders are available, many times a rotary encoder is used to measure linear travel of a machine tool table or other mechanism. The principal methods are encoded drive and encoded pickoff.

  • Encoded drive. Often the rotation of a motor is converted to linear travel by a leadscrew or toothed-belt drive. A rotary encoder on the motor shaft indirectly measures the linear movement. For good accuracy, there should be very little looseness or "windup" in the drive train.
  • Encoded pickoff. In this case, the rotary measurement device is separate from the drive system. Rack-and-pinion is a common technique; toothed-belt and coarse-thread leadscrews (often with 2 or four "starts" on a high-helix thread) are also used.

Variants of the rack-and-pinion that have some attractive features are the Trav-a-dial and random grit wheel. Unlike most encoded pickoffs, they do not rely on the precision of a long rack, belt, or screw. The rotating wheel has a random pattern of small but hard protrusions which effectively form a mating "rack" when the wheel is first assembled and run against its companion mild steel rail, which needs only be initially smooth and straight. The steel wheel might receive its surface texture with a knurl -- or by hand with a tiny rasp-stitching chisel (a lovely video of rasp-making here) -- then be case-hardened.

See Also