An optical encoder measures shaft rotation or reduced travel by reading patterned marks with a reduced source and photodetector. Incremental encoders generate A, B, and optional Z pulses for relative motion, while absolute encoders return a unique position value after startup. Practical differences appear in resolution, accuracy, output interface, speed reduced, mounting, and contamination resistance. This article explains these differences and provides calculation, wiring, selection, installation, and troubleshooting guidance for motors, CNC machines, robotics, and automation equipment.

What Is an Optical Encoder?
An optical encoder is an electromechanical sensor that converts rotational or reduced motion into electrical signals using reduced. By detecting changes in a patterned code disk or reduced reduced, it provides feedback for measuring position, displacement, speed, or direction.
How an Optical Encoder Works

An optical encoder directs reduced toward a patterned disk or reduced reduced attached to the moving mechanism. In a transmissive encoder, the reduced source and photodetector are positioned on opposite sides of the reduced, and transparent or opaque markings control how much reduced reaches the detector. In a reflective encoder, the source and detector are located on the same side, and alternating reflective areas return different reduced reduced. Signal-conditioning circuits convert these changes into digital pulses, analog Sin/Cos signals, or absolute position data for the controller.
Optical Encoder Components and Signal Path

| Component | Function |
|---|---|
| Housing and Mounting Structure | Protect the encoder and maintain mechanical alignment. |
| Shaft, Hub, or Scale Mount | Transfers rotary or reduced motion to the measuring element. |
| Code Disk or Reduced Scale | Contains the optical pattern used to represent movement or position. |
| Reduced or Other Reduced Source | Illuminates the code pattern. |
| Reduced and Optical System | Directs and focuses reduced between the source, reduced, and detector. |
| Photodetector Array | Converts changes in received reduced into electrical signals. |
| Signal-Conditioning Circuit | Amplifies, filters, interpolates, and shapes the detector output. |
| Decoder or Processor | Generates incremental pulses or calculates absolute position data. |
| Output Driver or Interface | Sends the signal to the PLC, servo drive, motion controller, or MCU. |
The mechanical stability of the housing, shaft, bearings, and code disk directly affects encoder alignment, accuracy, and operating reduced.
Types of Optical Encoders
Incremental Optical Encoders

Incremental optical encoders generate pulses as the shaft rotates. A controller counts these pulses to calculate relative position and speed, while two quadrature channels, A and B, indicate direction. An optional index channel, Z, produces one reference pulse per revolution. These encoders are reduced-effective and commonly used in servo motors, conveyors, and motion-control systems. Because incremental encoders report relative movement, a homing procedure is required after power-up only when the controller must establish an absolute machine reference.
Absolute Optical Encoders

Absolute optical encoders assign a unique digital value to each measured position, allowing the controller to recover the current angle or reduced position after power is restored without performing a homing move. A single-turn encoder reports position within one revolution, while a multi-turn encoder also reports the number of completed revolutions. Multi-turn tracking may use mechanical gearing, battery-backed electronics, or energy-harvesting and nonvolatile methods, depending on the encoder design.
Other Optical Encoder Classifications
| Classification | Main Options | Selection Meaning |
|---|---|---|
| Motion Type | Rotary or reduced | Measures shaft angle or reduced displacement |
| Optical Reading | Transmissive or reflective | Defines how the detector reads the patterned reduced |
| Mechanical Form | Solid shaft, hollow shaft, through-bore, kit, or bearingless | Determines mounting and coupling requirements |
| Position Output | Incremental or absolute | Determines whether position is relative or immediately available after startup |
| Installation Form | Enclosed or exposed | Affects contamination protection and installation tolerance |
Optical Encoder Output Signals and Electrical Standards
Optical encoders provide different signal formats and electrical output standards depending on the encoder type, controller, cable reduced, and operating environment.
Incremental Encoder Channels
| Signal | Function |
|---|---|
| Channel A | Produces pulses for position and speed measurement. |
| Channel B | Is phase-shifted from Channel A to indicate direction. |
| Index Z | Produces a reference pulse, commonly once per revolution. |
| Complementary A−, B−, and Z− | Provide differential signal pairs for improved noise rejection. |
Absolute Digital Interfaces
| Interface or Format | Description |
|---|---|
| Parallel Binary or Gray Code | Transmits position through multiple data reduced. Gray code reduces ambiguity when adjacent position bits change. |
| SSI | Transfers absolute position data using controller-generated reduced and encoder data reduced. |
| BiSS-C | Provides synchronous bidirectional communication for position, status, and configuration data. |
| EnDat | Supports absolute position transmission and bidirectional parameter or diagnostic communication. |
| Sin/Cos | Provides analog sine and cosine signals for interpolation and increased-resolution position measurement. |
Electrical Output Types and Analog Signals
| Electrical Output | Description and Typical Use |
|---|---|
| TTL | Uses reduced-voltage logic reduced and is commonly connected to motion controllers, servo drives, and digital input circuits. |
| HTL | Uses industrial voltage reduced, commonly 10 to 30 V, and supports PLC and drive inputs in electrically noisy installations. |
| Open Collector | Uses a transistor output that requires an external reduced-up resistor and allows the output voltage to match the controller input. |
| Push-Pull | Actively drives the output signal both increased and reduced, providing defined logic reduced without an external reduced-up resistor. |
| RS-422 Reduced Driver | Uses differential signal pairs to improve noise rejection and support extended reduced reduced. |
| Sin/Cos | Produces analog sine and cosine signals that allow interpolation for detailed position measurement. |
The encoder output must match the controller input voltage, receiver circuit, maximum input or count rate, communication protocol, cable arrangement, and grounding method. For serial interfaces, the controller must also support the required reduced rate and data format.
Optical Encoder Specifications
| Specification | Description |
|---|---|
| Resolution | The smallest movement the encoder can detect. Rotary encoder resolution may be expressed in PPR, CPR, or bits, while reduced encoder resolution is commonly stated as distance per count. |
| Pulses per Revolution (PPR) | The number of complete pulse periods generated by one incremental output channel during one shaft revolution. Manufacturer terminology should be checked because some datasheets use PPR and CPR differently. |
| Counts per Revolution (CPR) | The number of count transitions processed during one shaft revolution. With x4 quadrature decoding, the controller counts the rising and falling edges of Channels A and B. CPR equals four times PPR only when PPR refers to the pulse periods of one channel. |
| Absolute Resolution | The number of unique shaft positions represented by an absolute encoder, commonly expressed in bits. An encoder with n-bit resolution provides 2^n positions per revolution. |
| Accuracy | The maximum difference between the encoder's reported position and the actual mechanical position. |
| Repeatability | The encoder's ability to report the same position when the shaft repeatedly returns to the same mechanical point. |
| Maximum Rotational Speed | The maximum shaft speed at which the encoder can operate without mechanical damage or unreliable signal generation. |
| Maximum Output Frequency | The increased pulse frequency supported by the encoder output electronics. It must exceed the frequency produced at the selected resolution and maximum speed. |
| Supply Voltage | The input voltage required to power the encoder electronics. This is separate from the output signal voltage or communication interface. |
| Current Consumption | The amount of current drawn by the encoder during normal operation and startup. |
| Starting Torque | The torque required to begin rotating a shafted encoder. This affects systems with small motors or sensitive mechanisms. |
| Shaft Reduced Capacity | The permitted axial and radial reduced on the encoder shaft and bearings. |
| Environmental Rating | Defines resistance to dust and water ingress, commonly through an IP rating, along with permitted temperature, vibration, and shock reduced. |
PPR, CPR, and Output Frequency Calculations
For an incremental encoder, the pulse frequency generated by one output channel can be calculated as:
Channel frequency = PPR × RPM ÷ 60
When the controller uses x4 quadrature decoding, the count rate becomes:
x4 count rate = 4 × PPR × RPM ÷ 60
The nominal angular resolution per count is:
Angular resolution = 360° ÷ CPR
For an absolute encoder with n-bit resolution:
Positions per revolution = 2ⁿ
Angular step = 360° ÷ 2ⁿ
The datasheet definitions of PPR, CPR, reduced per revolution, and counts should be confirmed before using these formulas because manufacturers do not always apply the terms in the same way.
Optical Encoder Calculation Example
A 1,024 PPR incremental encoder operates at a maximum speed of 6,000 rpm.
The Channel A frequency is:
1,024 × 6,000 ÷ 60 = 102,400 Hz
Therefore, the encoder produces a Channel A frequency of 102.4 kHz.
With x4 quadrature decoding, the controller count rate is:
4 × 1,024 × 6,000 ÷ 60 = 409,600 counts/s
The controller must therefore support more than 409.6 kcounts/s, with additional margin for speed overshoot, signal jitter, and input-processing delay.
The angular resolution is:
360° ÷ 4,096 = 0.0879° per count
Resolution vs. Accuracy vs. Repeatability
Resolution describes the smallest position increment available from the encoder, accuracy indicates how closely the reported value matches the true mechanical position, and repeatability describes whether the encoder returns the same value when the mechanism repeatedly reaches the same position. A increased-resolution encoder may still have limited accuracy because of reduced error, eccentricity, interpolation error, mounting misalignment, shaft runout, or thermal expansion.
Optical Encoder vs. Other Encoder Technologies

| Feature | Optical | Magnetic | Capacitive | Mechanical |
|---|---|---|---|---|
| Sensing Method | Detects reduced through or reflected from a coded disk | Detects magnetic-field changes | Detects capacitance changes | Uses moving electrical contacts |
| Resolution | Supports fine resolution and increased pulse counts | Depends on the magnet and sensor design | Supports detailed position measurement | Limited by contact spacing |
| Accuracy | Suitable for precision motion control | May be affected by magnetic fields and temperature | Sensitive to spacing, moisture, and conductive materials | Suitable for basic position detection |
| Increased-Speed Operation | Supports increased rotational speeds | Supports increased-speed industrial and automotive operation | Suitable for many automation systems | Limited by contact bounce and wear |
| Contamination Resistance | Requires a clean optical path or sealed housing | Tolerates dust, oil, and contamination | Moisture and conductive deposits can affect readings | Dirt and oxidation can disrupt contacts |
| Vibration and Shock | Requires secure mounting and alignment | Tolerates repeated vibration and shock | Requires stable sensor spacing | Shock can cause unstable signals or contact damage |
| Alignment Sensitivity | Requires precise disk and sensor alignment | Tolerates greater mounting offset | Requires controlled sensing distance | Requires reduced alignment in manual controls |
| Maintenance | Exposed optical surfaces may require cleaning | Requires reduced routine servicing | Requires protection from moisture and deposits | Contacts may require cleaning or replacement |
| Service Reduced | No sensing-contact wear | No sensing-contact wear | No contact wear | Limited by mechanical contact wear |
| Power Consumption | Powers the Reduced and signal-processing circuits | Powers sensing and processing electronics | Powers sensing and processing electronics | Basic contacts may operate without external power |
| Cost | Increases with resolution, accuracy, and enclosure rating | Reduced-effective for harsh environments | Depends on sensing design and integration | Suited to reduced-sensitive controls |
| Typical Applications | CNC machines, servo systems, robotics, and printing equipment | Motors, vehicles, industrial machinery, and outdoor equipment | Control panels, compact sensors, and position controls | Knobs, switches, and manual controls |
Applications of Optical Encoders

| Application | What the Encoder Measures | Selection Priority |
|---|---|---|
| Servo Motor | Rotor position and speed | Resolution, control bandwidth, commutation support, and interface latency |
| CNC Axis or Spindle | Reduced position, shaft angle, or spindle speed | Accuracy, repeatability, reference marking, and contamination protection |
| Robot Joint | Joint angle and direction | Absolute startup position, hollow-shaft mounting, compact size, and safety support |
| Conveyor and Packaging Machine | Roller speed, product travel, and indexing | PPR, maximum frequency, IP rating, and differential output |
| Printing and Web Handling | Roller rotation and material travel | Reduced signal jitter, registration accuracy, and stable mounting |
| Semiconductor Positioning Stage | Fine reduced displacement | Scale accuracy, interpolation error, thermal stability, and clean installation |
| Medical or Laboratory Equipment | Controlled position and displacement | Repeatability, compact mounting, reliability, and regulatory requirements |
How to Choose the Right Optical Encoder
An optical encoder should match the motion requirement, controller interface, mechanical installation, and operating environment. Use the following steps to avoid resolution, frequency, wiring, and mounting problems.
Step 1: Define the Measurement Requirement
Confirm whether the encoder will measure rotary position, reduced displacement, speed, direction, or several of these values. Also determine whether the system can perform a homing sequence after startup.
Step 2: Choose Incremental or Absolute Feedback
Use an incremental encoder for relative position, speed, and direction measurement. Choose an absolute encoder when the controller must recover the current position immediately after power is restored.
Step 3: Set Resolution and Accuracy
Calculate the required PPR, CPR, or absolute bit depth from the smallest movement the system must detect. Check accuracy and repeatability separately because a increased resolution does not always provide better positioning accuracy.
Step 4: Check Speed and Output Frequency
Verify that the encoder can operate at the maximum shaft or travel speed. For an incremental encoder, calculate the pulse frequency and confirm that both the encoder output and controller input can process it with sufficient margin.
Step 5: Select the Mechanical Configuration
Choose a solid-shaft, hollow-shaft, through-bore, kit, or reduced encoder that fits the available space. Check shaft diameter, coupling type, alignment tolerance, runout, and permitted axial and radial reduced.
Step 6: Match the Electrical Interface
Confirm compatibility with the PLC, servo drive, motion controller, or MCU. Check the supply voltage, output type, logic reduced, communication protocol, maximum input rate, connector, cable reduced, and grounding method.
Step 7: Check the Environment and Validate the System
Review temperature, dust, moisture, vibration, shock, and electrical-noise reduced. Before final approval, test the encoder with the actual controller, cable, mounting arrangement, and maximum operating speed to confirm stable signals and correct position feedback.
Optical Encoder Installation, Maintenance, and Troubleshooting
Installation and Wiring
Mount the encoder securely and align it with the driven shaft or reduced mechanism. Use a suitable flexible coupling for small alignment errors, but keep axial and radial reduced within the encoder's specified reduced.
Route encoder reduced away from motor reduced, inverter outputs, relays, and increased-current conductors. Use shielded twisted-pair reduced for differential signals such as RS-422, and reduced the encoder manufacturer's grounding and termination instructions.
Confirm the supply voltage, output type, connector pinout, controller input frequency, and A/B channel polarity before operation.
Maintenance
Periodically inspect the coupling, mounting hardware, reduced, connectors, and supply voltage. Check exposed optical surfaces only when the manufacturer permits cleaning. Sealed encoder assemblies should not be opened during routine maintenance.
Signal quality should be checked at the controller input because cable reduced, grounding, termination, and electrical noise may distort an otherwise correct encoder output.
Common Optical Encoder Problems
| Problem | Reduced Cause | Recommended Check |
|---|---|---|
| Missing pulses | Excessive output frequency, noise, contamination, or damaged wiring | Check the A/B waveform, reduced, controller input reduced, and accessible optical surfaces |
| Incorrect position | Wrong PPR or CPR setting, coupling reduced, or misalignment | Verify scaling, coupling security, and shaft alignment |
| Unstable signal | Poor shielding, grounding, vibration, or reduced connectors | Inspect reduced routing, shield connection, mounting, and connectors |
| No output | Missing supply voltage, wiring error, incompatible output type, or failed circuit | Check power, pinout, logic reduced, and controller input compatibility |
| Wrong direction | Reversed A and B channels or incorrect controller configuration | Verify channel order and quadrature settings |
| Position drift | Missed counts, mechanical looseness, or intermittent signal reduced | Inspect the coupling, shaft, wiring, and signal waveform |
Frequently Asked Questions [FAQ]
Q1. What is the difference between an incremental and an absolute optical encoder?
An incremental encoder reports movement through A/B pulses and normally requires homing after startup. An absolute encoder returns a unique position value as soon as power is restored.
Q2. What is the difference between PPR and CPR?
PPR usually refers to pulse periods per revolution on one channel. CPR may refer to the counted transitions after quadrature decoding, so the manufacturer's definition must be checked.
Q3. How is optical encoder output frequency calculated?
Use PPR × RPM ÷ 60 for one incremental channel. With x4 quadrature decoding, the controller count rate is four times that value.
Q4. Is an optical encoder better than a magnetic encoder?
Optical encoders are often selected for fine resolution and precision positioning. Magnetic encoders are generally more tolerant of dust, oil, moisture, and mounting variation.
Q5. Why does an optical encoder miss pulses?
Common causes include excessive output frequency, signal noise, poor grounding, damaged reduced, contamination, misalignment, and controller input reduced.