Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

This cheat sheet covers how robots measure motion using encoders and use feedback to control motors accurately. Robotics students need these ideas to make drivetrains, arms, lifts, and wheels move to the right position or speed. Encoders turn rotation into measurable counts, while feedback systems compare what the robot did to what it was commanded to do.

A strong reference helps students connect sensor readings, formulas, and control decisions during building and programming.

Key Facts

  • Encoder resolution is the number of counts measured per shaft revolution, often written as counts per revolution or CPR.
  • For a wheel, distance traveled = wheel circumference x wheel rotations, and wheel circumference = pi x wheel diameter.
  • Wheel rotations = encoder counts / counts per revolution when the encoder is mounted directly on the wheel shaft.
  • If gearing is used, output rotations = motor encoder rotations / gear ratio when gear ratio = motor rotations / output rotations.
  • Average velocity can be found with velocity = change in position / change in time.
  • Feedback error is calculated as error = setpoint - measured value.
  • A proportional controller uses output = kP x error, where kP controls how strongly the robot reacts to error.
  • A PID controller uses output = kP x error + kI x accumulated error + kD x rate of change of error.

Vocabulary

Encoder
A sensor that converts rotation or linear motion into digital counts a robot can measure.
Counts per revolution
The number of encoder counts produced during one full rotation of a shaft.
Setpoint
The target position, speed, or angle that the robot is trying to reach.
Feedback
Information from sensors that tells the controller what the robot is actually doing.
Error
The difference between the target value and the measured value, found with error = setpoint - measured value.
PID control
A feedback control method that combines proportional, integral, and derivative terms to reduce error.

Common Mistakes to Avoid

  • Ignoring gear ratio, which is wrong because motor encoder counts may not equal wheel or arm output rotations after gearing.
  • Using diameter instead of circumference for distance, which is wrong because one wheel rotation moves the robot forward by the wheel circumference.
  • Reversing the error calculation, which is wrong because error = setpoint - measured value determines the direction of correction.
  • Setting kP too high, which is wrong because the robot may overshoot, oscillate, or become unstable instead of settling smoothly.
  • Calculating velocity from total position only, which is wrong because velocity depends on change in position over a specific change in time.

Practice Questions

  1. 1 A wheel encoder measures 1440 counts per revolution. If the robot records 3600 counts, how many wheel rotations occurred?
  2. 2 A robot wheel has a diameter of 10 cm and turns 8 full rotations. Using pi = 3.14, how far does the robot travel?
  3. 3 A motor encoder measures 2048 counts per motor revolution. The gearbox ratio is 4:1, meaning 4 motor rotations produce 1 output rotation. How many counts are measured for 3 output rotations?
  4. 4 Why does a robot using encoder feedback usually drive straighter than a robot that only sends the same power to both motors?