Optical encoders are devices used to measure angular position and velocity in various applications, such as robotics, CNC machines, motor control systems, and more. They work based on the principle of light detection, using a rotating disc with alternating transparent and opaque segments to encode angular position information. There are two main types of optical encoders: incremental encoders and absolute encoders. Let's explore how each of them measures angular position and velocity:
Incremental Encoders:
Structure: Incremental encoders consist of a light source (usually an LED), a rotating disc with alternating transparent and opaque segments (also known as the encoder disc or encoder wheel), and a photodetector (such as a photodiode or phototransistor).
Light and Detection: The light source shines light through the encoder disc, and the photodetector is positioned on the other side to receive the light passing through the disc.
Pulses: As the encoder disc rotates, the transparent and opaque segments cause the light to be periodically interrupted, generating pulses. These pulses are electrical signals that can be interpreted as digital square waves.
Resolution: The number of pulses generated per revolution of the encoder disc determines the encoder's resolution. Higher resolution encoders produce more pulses and offer finer position measurement.
Counting: To measure the angular position, a counter circuit is used to count the number of pulses generated by the encoder as it rotates. The direction of rotation can be determined by observing the order in which the pulses are received (rising or falling edges).
Absolute Encoders:
Structure: Absolute encoders also consist of a light source, encoder disc, and photodetector, but they have a more complex disc pattern. The disc contains multiple tracks, each representing a different bit of the encoder's binary code.
Gray Code: Absolute encoders use Gray code, a binary code in which adjacent codes differ by only one bit. This ensures that even if the disc is between positions, the readout will still correspond to a valid position, avoiding ambiguity.
Unique Codes: Each angular position corresponds to a unique binary code, so the absolute encoder can instantly determine the exact position upon power-up or initialization.
Parallel or Serial Output: Absolute encoders may have parallel or serial outputs, depending on how the binary code is transmitted to the control system.
For measuring angular velocity using both types of encoders, the system tracks the changes in position over time. By measuring the time between consecutive pulses (in the case of incremental encoders) or interpreting the changes in the absolute code (in the case of absolute encoders), the rotational velocity can be calculated. The faster the pulses or code changes, the higher the angular velocity.
In summary, optical encoders use light and patterns on a rotating disc to generate electrical signals (pulses or codes) that represent the angular position of the encoder. Incremental encoders provide relative position information and require a reference point for initialization, while absolute encoders offer absolute position readings without the need for a reference point. Both types of encoders can also measure angular velocity based on changes in the position information over time.