Copyright © 1990-2019 quirkfactory.com. All rights reserved.
Single-Track Absolute Encoder is a do-it-yourself (DIY) absolute shaft encoder (rotary encoder) utilizing a single-track Gray encoding. It can be used to measure angular movement (for joints in robotic constructions, for example).
- Making the Sensors
- Laying out the Board
- Create Plastic Strips
- Gluing the Sensors
- Making the Encoder Disk
- Final Assembly
BackgroundI decided to build an absolute optical encoder for a robotics project. An absolute encoder has advantages over designs that use potentiometers and incremental encoders, and I wanted to take advantage of those.
The final construction is a 7-bit encoder measuring 8 inches (20cm) on each side, capable of resolving angular changes in approximately 3 degree increments.
Gray EncodingOptical encoders often make use of Gray encoding, which reduce the possibility for positional ambiguity by changing the state of only one sensor for each shift in angular position.
A straightforward approach is to lay the gray code pattern out in a circular pattern as shown in this 5-bit example. Optical sensors can then be positioned so as to detect the black/white patterns in the disk.
This method requires careful alignment of a series of optical emitters and receivers, which either shine through (or reflect off) the encoding pattern.
Single-Track EncodingA variation of Gray encoding called single-track Gray codes aligns the encoding patterns on the outer edge of a disk. The patterns are arranged such that the sensors detect unique patterns when placed at equal angles around the edge of the disk.
This has several nice properties:
- angular error is minimized at the outer radius of the disk
- pre-aligned emitter/detector pairs may be used, simplifying construction
Other WorkSee this nice Optical Encoder Project page by Piotr Mitros which has a nice compact design for an incremental (not absolute) encoder.