What is Encoder Counts Per Revolution (CPR)?
In the world of motion control and industrial automation, understanding the resolution of an optical or magnetic encoder is critical. Counts Per Revolution (CPR) refers to the total number of unique positions or state changes that an encoder reports to a controller during one full 360-degree rotation. This value directly determines the precision and granularity of your positioning system.
Difference Between PPR and CPR
A common point of confusion is the difference between PPR (Pulses Per Revolution) and CPR. PPR usually refers to the number of high pulses on a single channel (Channel A) per revolution. However, because quadrature encoders use two channels (A and B) offset by 90 degrees, controllers can detect multiple state changes per pulse cycle.
Understanding Quadrature Decoding Modes
The decoding factor you choose determines how many "counts" are extracted from the signal:
- X1 Decoding: The controller counts only the rising edge of Channel A. Here, CPR = PPR.
- X2 Decoding: The controller counts both the rising and falling edges of Channel A. Here, CPR = PPR × 2.
- X4 Decoding: The controller counts the rising and falling edges of both Channel A and Channel B. This is the most common high-resolution mode, where CPR = PPR × 4.
How to Use This Calculator
To calculate your system's resolution, simply enter the manufacturer-rated PPR (sometimes called Cycles Per Revolution) into the input field. Then, select the decoding mode used by your PLC, motion controller, or microcontroller (like an Arduino or STM32). The calculator will instantly output the CPR, which is the value you should use when configuring your software's scaling factors or PID loops.
Why Precision Matters
Higher CPR values allow for smoother motion at low speeds and more accurate steady-state positioning. However, it is important to ensure that your controller's maximum input frequency (measured in kHz or MHz) can handle the pulse train generated at high RPMs when using X4 decoding.