MOULDLKnowledge BaseElectrical Knowledge Base3D Model DownloadsMembership
中文版Model Store »
Knowledge Base › Electrical Knowledge Base › Encoder pulse counts and speed calculation with worked examples
HomeModels
Table of contents

On this page

Electrical & Electronic Basics (698 articles)

Quick Reference

  • PLC & Programming
  • Electrical & Electronic Basics (monthly)(每月更新中)
  • Electrical Control & Drawings (monthly)(每月更新中)
  • Drives & Actuators (monthly)(每月更新中)
  • Sensors & Detection (monthly)(每月更新中)
  • Industrial Communication & Networks (monthly)(每月更新中)
  • HMI & Host Systems (monthly)(每月更新中)
  • Industrial Robots & Motion Control (monthly)(每月更新中)
  • Mechatronic System Integration (monthly)(每月更新中)
  • Fault Diagnosis & Standards (monthly)(每月更新中)

Encoder pulse counts and speed calculation with worked examples

How accurately can a 1024 PPR encoder with quadrature really measure speed? This page works through PPR, quadruple counting, the conversion formulas and error budgets, with the programming pitfalls that corrupt readings.

1. How it works

PPR counts complete cycles per turn of one channel, so a 1024 PPR encoder gives 1024 cycles on channel A. Because A and B sit 90 degrees apart, a counter can register four events per cycle: 4 × 1024 = 4096 counts per turn. Speed then follows n = C × 60 / (4 × PPR × t); with 683 counts in a 10 ms window the speed is 683/4096 × 6000 ≈ 1000.5 r/min.

2. Numbers and practice

Quantisation error comes from the single-count ambiguity: 683 counts in 10 ms carries about 0.15 percent error, but a 1 ms window drops the count to 68 and the error balloons to 1.5 percent. At low speeds the T method wins: timing the interval between edges with a 1 MHz clock gives about 0.02 percent error at 1000 r/min, and the combined M/T method covers the whole range. Watch counter overflow, since 4096 counts per turn overflows 32 bits in minutes at high speed, so compute differences instead.

3. Pitfalls and fixes

Calibrate against a known speed once per installation; deviations beyond 0.5 percent point to wrong PPR or quadrature settings. Classic faults include reading PPR as counts per turn, which understates speed by four times; slipping couplings that keep readings steady while the shaft speed differs; and noise-induced count jumps from poor cable shielding. Scope the A and B lines and accept nothing but clean edges.

4. Speed measurement parameters, worked example

ParameterExample valueRelationError impact
Encoder PPR10244096 counts per turn after 4xWrong setting off by 4x
Sampling window10 ms683 counts at 1000 r/minShort windows inflate error
Quantisation±1 countGrows in share at low speedM-method weakness
T-method clock1 MHzTimes the pulse period0.02 percent class at low speed
Maximum speed6000 r/min409.6 kHz pulse rateCounts drop beyond it
Coupling slipFound by comparisonReading detaches from shaftMechanical check

5. Notes

Standardise on the M/T method with automatic switchover at low speed, calibrate every encoder against a known speed on commissioning, and log PPR, quadrature mode and coupling type against the asset. Pulse cables belong in twisted shielded pairs in their own metal conduit.

6. References

The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: See the GB/T 2900 series for encoder terminology and IEC 61162 related definitions, with GB/T 5226.1 for control safety. Always check the device datasheet and the product design file for ratings and derating.

7. Cautions

⚠️ Three common pitfalls:
① Using PPR as counts per turn: every speed reading is four times low and the control loop tunes against fiction
② Counting in short windows at low speed: 1.5 percent quantisation makes displays flicker and gets blamed on mechanics
③ Grounding the shield at both ends across plant earth: ground potential differences inject common-mode noise and counts jump unpredictably

Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.

Related reading

Related 3D models: Ready to build it? Download free 3D models & CAD drawings at MOULDL »
MOULDL · Electrical Knowledge Base · free self-study reference for electrical & automation engineers, 3D CAD models at MOULDL