Tool 06 · Navigation
Your code counts encoder ticks; your robot moves in millimetres. This tool computes the conversion — counts per wheel turn, mm per tick, ticks per metre — and tells you whether your encoder resolution is actually good enough for the job.
Measure it — printed sizes lie by a few mm
Enter 1 if the encoder is on the wheel shaft
Pulses per revolution of the shaft it's mounted on
Loaded RPM ≈ 80% of the free-run figure
Please enter positive values in every field.
Odometry spec
Counts per wheel rev = PPR × decoding × gear ratio
Distance per count = (π × wheel diameter) ÷ counts per wheel rev
Robot speed = π × wheel diameter × (motor RPM ÷ ratio) ÷ 60
Count rate = counts per wheel rev × wheel RPM ÷ 60
Everything downstream — dead reckoning, velocity PID, "drive exactly 500 mm" functions — depends on one honest number: how far the robot moves per encoder count. The multiplication chain above is short, but each factor is a classic source of the mysterious 2× or 4× error that makes a robot drive twice as far as commanded.
The count-rate figure matters more than beginners expect: a fast motor behind a high ratio with 4× decoding can push tens of thousands of interrupts per second at a microcontroller. If that number lands above roughly 50k on an Arduino Uno–class board, use hardware counters, drop to 1× decoding, or read the encoder with a dedicated peripheral.
Once you trust the conversion, feed the measured wheel speed into a velocity loop — the PID Tuning Visualizer shows what happens next — and use the Gear Ratio Calculator if the RPM-to-speed relationship isn't giving you the top speed you wanted.
Wheel slip, tyre squish under load (effective diameter shrinks 1–3%), and unequal left/right diameters. Calibrate by driving a measured 2–3 m on the real floor and scaling your mm-per-count constant to match — every serious team does this.
Motor-shaft encoders get free resolution (multiplied by the gear ratio) but can't see gearbox backlash or belt slip. Wheel-shaft encoders measure the truth with fewer counts. Motor-shaft is the right default for velocity control; wheel-shaft wins for precise positioning.
Links may be affiliate links (see footer disclosure).
Gearmotors with quadrature encoders already fitted — the easy path.
Browse encoder motors →