Rotary Encoders - MDHSRobotics/TeamWiki GitHub Wiki

Rotary (or shaft) encoders are commonly used in servo motors to converts the angular position of a shaft/axle to an analog or digital code

There are two primary types of rotary encoders:

  • Absolute

    Indicates the current position of the shaft

  • Incremental (or relative)

    Only reads the motion, which is used later to get the speed, distance, position, etc. Used when a shaft’s rotation is unlimited and needs to be read.

Different Types of Encoders

| Conductive | Optical | On Axis Magnet |Off Axis Magnet| |--- |--- |--- |--- |--- | |Copper tracks are put on a PCB and used to encode the info | Done by shining a light on a photodiode through slits in a disc | Uses a specially magnetized 2 pole neodymium magnet. | Uses a rubber bonded ferrite magnet attached to a metal hub | | |Fairly Rare | Common | Requires a custom motor shaft | Flexible to be used in many applications, can be programmed to accept many pole widths | | | | Sensitive to dust | | less fragile than optical | |

Ways to Encode Shaft Position

Standard Binary Encoding

Uses 3-Bit Binary

Sector Contact 1 Contact 2 Contact 3 Angle
0 off off off 0-45
1 off off on 45-90
2 off on off 90-135
3 off on on 135-180
4 on off off 180-225
5 on off on 225-270
6 on on off 270-315
7 on on on 315-360

--

Gray Encoding

Uses 3-Bit Binary

Sector Contact 1 Contact 2 Contact 3 Angle
0 off off off 0-45
1 off off on 45-90
2 off on on 90-135
3 off on off 135-180
4 on on off 180-225
5 on on on 225-270
6 on off off 270-315
7 on off off 315-360

References

####Read

####Watch