Precision Angular Position Measurement using Gray Code
By: Techno Team | Supervisor: Dr. Osama Tharwat
A shaft encoder, also known as a rotary encoder, is a device that converts the angular position or motion of a shaft into an electrical signal. This project implements an absolute shaft encoder using Gray code to determine the precise angular position of a rotating shaft.
The disk is divided into 8 sectors, each containing three segments that are either hollow (1) or solid (0). This pattern follows a Gray code sequence where only one bit changes between adjacent positions, preventing errors during transitions.
Absolute Encoders provide the exact position of the shaft at any given moment. Each position corresponds to a unique binary code, allowing position determination even after power loss.
Incremental Encoders only provide relative position changes through pulse counts and require a reference point to determine absolute position.
Controller
Rotation source
Power source
Pattern detection
Output display
Circuit assembly
The shaft encoder uses three IR sensors to detect the pattern on the rotating disk. The Arduino reads these values to determine the absolute position, counts full rotations, and calculates rotational speed based on time between detections.
Download the complete project report including circuit diagrams, code, and implementation details.
Download Full Report (PDF)Full rotations detected
Current shaft speed
Absolute angular position