# Absolute Encoder Working Principle

The optical disk of the absolute encoder is designed to produce a digital word that distinguishes N distinct positions of the shaft.

# Absolute encoder Working Principle

For example, if there are 8 tracks, the encoder is capable of producing 256 distinct positions or an angular resolution of 1.406 (360/256) degrees.

The most common types of numerical encoding used in the absolute encoder are gray and binary codes. To illustrate the acion of an absolute encoder, the gray code and natural binary code dsisk track patterns for a simple 4-track (4-bit) encoder are illustrated in Fig 2 and 3.

The linear patterns and associated timing diagrams are what the photodetectors sense as the code disk circular tracks rotate with the shaft. The output bit codes for both coding schemes are listed in Table 1.

Decimal code Rotation range (deg.) Binary code Gray code
0 0-22.5 0000 0000
1 22.5-45 0001 0001
2 45-67.5 0010 0011
3 67.5-90 0011 0010
4 90-112.5 0100 0110
5 112.5-135 0101 0111
6 135-157.5 0110 0101
7 15.75-180 0111 0100
8 180-202.5 1000 1100
9 202.5-225 1001 1101
10 225-247.5 1010 1111
11 247.5-270 1011 1110
12 270-292.5 1100 1010
13 292.5-315 1101 1011
14 315-337.5 1110 1001
15 337.5-360 1111 1000

Table 1. 4-Bit gray and natural binary codes

The gray code is designed so that only one track (one bit) will change state for each count transition, unlike the binary code where multiple tracks (bits) change at certain count transitions. This effect can be seen clearly in Table 1.

For the gray code, the uncertainty during a transition is only one count, unlike with the binary code, where the uncertainty could be multiple counts.

Since the gray code provides data with the least uncertainty but the natural binary code is the preferred choice for direct interface to computers and other digital devices, a circuit to convert from gray to binary code is desirable.

Figure 4 shows a simple circuit that utilizes exclusive OR gates (XOR) to perform this function.For a gray code to binary code conversion of any number of bits N, the most signficant bits (MSB) of the binary and gray code are always identical, and for each other bit, the binary bit is the exlcusive OR (XOR) combination of adjacent gray code bits.

Encoder MCQ