Engineering Guide
Motor Motion Control: Encoders, Gearing, Stepper Resolution, and BLDC Frequency
Motion calculations become reliable only when encoder, gearing, step, pulse, pole, and clock conventions are explicit. This workflow connects command and feedback units to real mechanical and timing limits.
Motion-Control Workflow
| Step | Decision | Engineering Check |
|---|---|---|
| Define mechanical output | Specify load speed, torque, travel per revolution, inertia, acceleration, and duty cycle. | |
| Declare conventions | State motor-side versus load-side speed, gear ratio direction, encoder PPR or CPR, and pole pairs. | |
| Resolve command units | Convert desired motion to motor revolutions, steps, microsteps, pulses, or electrical cycles. | |
| Resolve feedback units | Convert measured edge counts and gate time to shaft RPM with the exact decoding multiplier. | |
| Check dynamic limits | Verify acceleration, available torque, pull-out margin, driver current, bus voltage, and mechanical resonance. | |
| Check timing limits | Include pulse-width constraints, ISR or timer rate, counter width, latency, jitter, and maximum edge frequency. | |
| Check error sources | Include backlash, compliance, missed steps, quantization, encoder eccentricity, and aliasing. | |
| Validate | Measure commanded and actual motion across load, temperature, speed, direction, and supply conditions. |
Conventions First
| Quantity | Definition | Boundary |
|---|---|---|
| Encoder PPR | Pulses or cycles per mechanical revolution | May refer to one channel before quadrature decoding |
| Encoder CPR | Counts per revolution | Vendor usage varies; confirm whether x1, x2, or x4 decoding is included |
| Gear ratio G | Input speed / output speed | G > 1 is reduction under the ECParts convention |
| Stepper full steps | 360 degrees / full-step angle | Common 1.8-degree motor has 200 full steps/rev |
| Microstep setting | Command subdivisions per full step | Improves command granularity, not guaranteed absolute accuracy |
| Pole pairs | Motor poles / 2 | Electrical cycles per mechanical revolution |
| Electrical RPM | Mechanical RPM x pole pairs | Not mechanical shaft speed |
Encoder Speed Measurement
Formula reference
Encoder count rate
Effective counts/rev = PPR x decode multiplierRPM = count frequency x 60 / effective counts/revCount frequency = counts / gate timeVariable definitions
- Confirm whether the stated CPR already includes quadrature decoding
- Gate measurement quantizes low speed
- Reciprocal-period measurement is often better at low rate
Use the Motor Encoder RPM Calculator with the exact edge-count convention. Check counter width, maximum edge rate, debounce or filtering, timer accuracy, eccentricity, missing counts, and direction decoding.
Gear Ratio and Output Motion
Formula reference
ECParts gear convention
G = input RPM / output RPMNout = Nin/GTout = Tin x G x efficiencyLoad counts/rev = motor counts/rev x GVariable definitions
- G greater than one represents speed reduction
- Efficiency must be between zero and one
- Backlash and compliance are not represented by the ideal ratio
The Motor Gear Ratio and Output Calculator provides kinematic and ideal torque relationships. Verify gearbox continuous and peak ratings, reflected inertia, lubrication, efficiency versus load, backlash, and direction.
Stepper Resolution and Pulse Rate
Formula reference
Stepper command kinematics
Full steps/rev = 360/full-step angleCommand pulses/rev = full steps/rev x microstep settingAngle/pulse = 360/command pulses/revPulse frequency = RPM x command pulses/rev / 60Variable definitions
- Microstep setting describes electrical command subdivisions
- Command resolution is not guaranteed shaft accuracy
- Acceleration and load torque determine whether pulses are followed
Use the Stepper Steps and Resolution Calculator for resolution and the Stepper Pulse Frequency Calculator for command rate. Check driver timing, current decay, bus voltage, resonance, acceleration profile, and pull-out torque.
BLDC Mechanical and Electrical Speed
Formula reference
Pole-pair conversion
Pole pairs = poles/2Electrical RPM = mechanical RPM x pole pairsElectrical frequency = mechanical RPM x pole pairs / 60Six-step sector rate = 6 x electrical frequencyVariable definitions
- Pole count must be even in the adopted model
- Electrical frequency is not PWM switching frequency
- Commutation event rate depends on the control method
Use the BLDC Electrical RPM and Frequency Calculator for conversion. Real commutation also depends on rotor position, back-EMF sensing or observer bandwidth, phase advance, PWM, current control, and maximum controller processing rate.
Power and Frequency Boundaries
The Motor Electrical Design Guide owns torque, power, back EMF, winding current, losses, and PWM drive limits. The Frequency and Period Converter handles generic reciprocal units; this guide owns their motor-control meaning.
Worked Examples
Quadrature encoder
A 500 PPR two-channel encoder decoded x4 yields 2000 counts/rev. At 20,000 counts/s, speed is 20,000 x 60 / 2000 = 600 RPM.
Gated RPM measurement
At 60 RPM with 100 counts/rev, a 10 ms gate averages only one count. A longer gate or reciprocal-period measurement improves low-speed resolution.
Gear reduction
A 5:1 reduction turns a 1500 RPM input into 300 RPM output. With 90% efficiency, 0.5 N m input ideally produces 0.5 x 5 x 0.9 = 2.25 N m output.
Reflected motion
With 5:1 reduction and 2000 encoder counts per motor revolution, the load has 10,000 counts per output revolution, before backlash and compliance.
Stepper resolution
A 1.8-degree motor at 16 microsteps/full-step uses 200 x 16 = 3200 command pulses/rev, or 0.1125 degrees per command pulse.
Stepper pulse rate
At 600 RPM and 3200 pulses/rev, command rate is 600 x 3200 / 60 = 32 kHz. The driver also imposes minimum high and low pulse widths.
Linear axis
A 5 mm pitch screw with 3200 pulses/rev gives 640 pulses/mm and 1.5625 um nominal command increment; backlash and mechanics determine actual accuracy.
BLDC electrical frequency
A 3000 RPM motor with 7 pole pairs has fe = 3000 x 7 / 60 = 350 Hz and electrical speed 21,000 electrical RPM.
Six-step commutation
At 350 electrical Hz, six ideal commutation sectors occur per electrical cycle, so sector event rate is 2.1 kHz.
Counter overflow
A 16-bit edge counter at 1 MHz wraps in 65.536 ms. Firmware must sample or extend it before ambiguity occurs.
Common Mistakes
Related Calculators
Related Resources
Support reference
FAQ
What is the difference between PPR and CPR?
PPR often means pulses or cycles per revolution on one encoder channel, while CPR may mean decoded counts per revolution. Vendors use both terms inconsistently, so confirm whether quadrature multiplication is already included.
How do I calculate RPM from an encoder?
RPM = measured counts per second x 60 / effective counts per revolution. Effective counts must match the actual x1, x2, or x4 decoding mode.
How can I measure very low RPM accurately?
Measure the period between encoder edges or increase the gate interval. Short fixed gates create coarse count quantization at low speed.
How does gear ratio affect speed and torque?
With G = input speed/output speed, output speed is input/G. Ideal output torque is input torque x G x efficiency. Real limits include backlash, ratings, inertia, and losses.
Does a gearbox increase motor power?
No. It trades speed for torque and loses power through inefficiency. Output mechanical power cannot exceed input mechanical power in a passive gearbox.
How many steps per revolution does a stepper motor have?
Full steps/rev = 360/full-step angle. Command pulses/rev multiply that by the configured microstep ratio and any electronic gearing.
Does microstepping improve accuracy?
It improves command granularity and can reduce vibration, but incremental torque, current regulation, load, detent torque, friction, and mechanics limit absolute accuracy.
How is stepper pulse frequency related to RPM?
Pulse frequency = RPM x command pulses per revolution / 60. This is commanded kinematics; the motor can miss steps if torque and acceleration margins are inadequate.
What is BLDC electrical frequency?
Electrical frequency equals mechanical RPM x pole pairs / 60. Each pole pair creates one electrical cycle per mechanical revolution.
What is electrical RPM?
Electrical RPM is mechanical RPM multiplied by pole pairs. It is useful for commutation and control bandwidth, but it is not shaft speed.
How do pole count and pole pairs differ?
Pole pairs equal total magnetic poles divided by two. A 14-pole rotor has 7 pole pairs.
Can these equations predict acceleration?
Not alone. Acceleration requires net torque and total reflected inertia, plus friction, load variation, control-loop behavior, and drive limits.
Summary
Declare every count and ratio convention, convert command and feedback units with consistent mechanical references, and then verify timer, driver, torque, acceleration, resonance, gearbox, and measurement limits. Ideal motion equations establish targets; hardware testing establishes achievable performance.
