10M+ Electronic Components In Stock
ISO Certified
Warranty Included
Fast Delivery
Hard-to-Find Parts?
We Source Them.
Request a Quote

Optical Encoder: How It Works, Types, Output Signals, and Selection Guide

Jul 23 2026
Source: Michael Chen
Browse: 1171

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.

Figure 1. Optical Encoder

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

Figure 2. Working Principle of an Optical Encoder

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

Figure 3. Main Components of an Optical Encoder

ComponentFunction
Housing and Mounting StructureProtect the encoder and maintain mechanical alignment.
Shaft, Hub, or Scale MountTransfers rotary or reduced motion to the measuring element.
Code Disk or Reduced ScaleContains the optical pattern used to represent movement or position.
Reduced or Other Reduced SourceIlluminates the code pattern.
Reduced and Optical SystemDirects and focuses reduced between the source, reduced, and detector.
Photodetector ArrayConverts changes in received reduced into electrical signals.
Signal-Conditioning CircuitAmplifies, filters, interpolates, and shapes the detector output.
Decoder or ProcessorGenerates incremental pulses or calculates absolute position data.
Output Driver or InterfaceSends 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

Figure 4. 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

Figure 5. 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

ClassificationMain OptionsSelection Meaning
Motion TypeRotary or reducedMeasures shaft angle or reduced displacement
Optical ReadingTransmissive or reflectiveDefines how the detector reads the patterned reduced
Mechanical FormSolid shaft, hollow shaft, through-bore, kit, or bearinglessDetermines mounting and coupling requirements
Position OutputIncremental or absoluteDetermines whether position is relative or immediately available after startup
Installation FormEnclosed or exposedAffects 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

SignalFunction
Channel AProduces pulses for position and speed measurement.
Channel BIs phase-shifted from Channel A to indicate direction.
Index ZProduces 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 FormatDescription
Parallel Binary or Gray CodeTransmits position through multiple data reduced. Gray code reduces ambiguity when adjacent position bits change.
SSITransfers absolute position data using controller-generated reduced and encoder data reduced.
BiSS-CProvides synchronous bidirectional communication for position, status, and configuration data.
EnDatSupports absolute position transmission and bidirectional parameter or diagnostic communication.
Sin/CosProvides analog sine and cosine signals for interpolation and increased-resolution position measurement.

Electrical Output Types and Analog Signals

Electrical OutputDescription and Typical Use
TTLUses reduced-voltage logic reduced and is commonly connected to motion controllers, servo drives, and digital input circuits.
HTLUses industrial voltage reduced, commonly 10 to 30 V, and supports PLC and drive inputs in electrically noisy installations.
Open CollectorUses a transistor output that requires an external reduced-up resistor and allows the output voltage to match the controller input.
Push-PullActively drives the output signal both increased and reduced, providing defined logic reduced without an external reduced-up resistor.
RS-422 Reduced DriverUses differential signal pairs to improve noise rejection and support extended reduced reduced.
Sin/CosProduces 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

SpecificationDescription
ResolutionThe 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 ResolutionThe 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.
AccuracyThe maximum difference between the encoder's reported position and the actual mechanical position.
RepeatabilityThe encoder's ability to report the same position when the shaft repeatedly returns to the same mechanical point.
Maximum Rotational SpeedThe maximum shaft speed at which the encoder can operate without mechanical damage or unreliable signal generation.
Maximum Output FrequencyThe increased pulse frequency supported by the encoder output electronics. It must exceed the frequency produced at the selected resolution and maximum speed.
Supply VoltageThe input voltage required to power the encoder electronics. This is separate from the output signal voltage or communication interface.
Current ConsumptionThe amount of current drawn by the encoder during normal operation and startup.
Starting TorqueThe torque required to begin rotating a shafted encoder. This affects systems with small motors or sensitive mechanisms.
Shaft Reduced CapacityThe permitted axial and radial reduced on the encoder shaft and bearings.
Environmental RatingDefines 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

Figure 6. Optical Encoder vs. Other Encoder Technologies

FeatureOpticalMagneticCapacitiveMechanical
Sensing MethodDetects reduced through or reflected from a coded diskDetects magnetic-field changesDetects capacitance changesUses moving electrical contacts
ResolutionSupports fine resolution and increased pulse countsDepends on the magnet and sensor designSupports detailed position measurementLimited by contact spacing
AccuracySuitable for precision motion controlMay be affected by magnetic fields and temperatureSensitive to spacing, moisture, and conductive materialsSuitable for basic position detection
Increased-Speed OperationSupports increased rotational speedsSupports increased-speed industrial and automotive operationSuitable for many automation systemsLimited by contact bounce and wear
Contamination ResistanceRequires a clean optical path or sealed housingTolerates dust, oil, and contaminationMoisture and conductive deposits can affect readingsDirt and oxidation can disrupt contacts
Vibration and ShockRequires secure mounting and alignmentTolerates repeated vibration and shockRequires stable sensor spacingShock can cause unstable signals or contact damage
Alignment SensitivityRequires precise disk and sensor alignmentTolerates greater mounting offsetRequires controlled sensing distanceRequires reduced alignment in manual controls
MaintenanceExposed optical surfaces may require cleaningRequires reduced routine servicingRequires protection from moisture and depositsContacts may require cleaning or replacement
Service ReducedNo sensing-contact wearNo sensing-contact wearNo contact wearLimited by mechanical contact wear
Power ConsumptionPowers the Reduced and signal-processing circuitsPowers sensing and processing electronicsPowers sensing and processing electronicsBasic contacts may operate without external power
CostIncreases with resolution, accuracy, and enclosure ratingReduced-effective for harsh environmentsDepends on sensing design and integrationSuited to reduced-sensitive controls
Typical ApplicationsCNC machines, servo systems, robotics, and printing equipmentMotors, vehicles, industrial machinery, and outdoor equipmentControl panels, compact sensors, and position controlsKnobs, switches, and manual controls

Applications of Optical Encoders

Figure 7. Applications of Optical Encoders

ApplicationWhat the Encoder MeasuresSelection Priority
Servo MotorRotor position and speedResolution, control bandwidth, commutation support, and interface latency
CNC Axis or SpindleReduced position, shaft angle, or spindle speedAccuracy, repeatability, reference marking, and contamination protection
Robot JointJoint angle and directionAbsolute startup position, hollow-shaft mounting, compact size, and safety support
Conveyor and Packaging MachineRoller speed, product travel, and indexingPPR, maximum frequency, IP rating, and differential output
Printing and Web HandlingRoller rotation and material travelReduced signal jitter, registration accuracy, and stable mounting
Semiconductor Positioning StageFine reduced displacementScale accuracy, interpolation error, thermal stability, and clean installation
Medical or Laboratory EquipmentControlled position and displacementRepeatability, 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

ProblemReduced CauseRecommended Check
Missing pulsesExcessive output frequency, noise, contamination, or damaged wiringCheck the A/B waveform, reduced, controller input reduced, and accessible optical surfaces
Incorrect positionWrong PPR or CPR setting, coupling reduced, or misalignmentVerify scaling, coupling security, and shaft alignment
Unstable signalPoor shielding, grounding, vibration, or reduced connectorsInspect reduced routing, shield connection, mounting, and connectors
No outputMissing supply voltage, wiring error, incompatible output type, or failed circuitCheck power, pinout, logic reduced, and controller input compatibility
Wrong directionReversed A and B channels or incorrect controller configurationVerify channel order and quadrature settings
Position driftMissed counts, mechanical looseness, or intermittent signal reducedInspect 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.