I have seen a lot of comments and posts about you need an IMU (Inertial Measurement Unit) to control rotation. I haven’t seen much discussion about using the wheel encoders instead. I’m going to use some math for the event Robot Tour to explain the pros and cons.
What is an IMU?
First let’s make sure we understand what an IMU sensor is. An IMU (Inertial Measurement Unit) is a small sensor that detects motion and position. Think of it as your device’s “sense of balance and movement.” It can tell which way the device is tilting or rotating, how fast it’s moving, and what direction it’s facing.

You use IMUs every day without realizing it. In your smartphone, it knows when you rotate your phone from portrait to landscape. In fitness trackers, it counts your steps and detects when you’re running versus walking. In drones, it helps them stay level and stable in the air, and in game controllers, it detects when you swing or tilt them.
Basically, an IMU helps devices understand how they’re moving through space, similar to how your inner ear helps you maintain balance and know which way is up!
What is a Wheel Encoder?
Let’s understand what a wheel encoder does. This refers to an encoder attached to one of the wheels on the robot. The encoder is a sensor that measures rotation of the wheel. A typical encoder could output 512 pulses per wheel rotation. Knowing the diameter of the wheel, a computer like an Arduino can be used to measure distance traveled.
Below is an example from an Electric Vehicle presentation. If the vehicle or robot has a 8cm diameter wheel, then the circumference is 8.00 cm x 3.14 or 25.12 cm. The encoder can measure down to 0.05 cm/pulse (25.12 cm / 512 pulses) or 0.5mm. This resolution calculation will be important later.

How Accurate is an IMU?
This doesn’t have a straightforward answer for several reasons. The biggest issue is these are being used on a planet that is rotating at 15 degrees per hour (360 degrees / 24 hours). This rotation differs is which axis sees the rotation depending on your location. The North Pole vs Puerto Rico are going to see this rotation on different axes (X, Y, Z) or a combination of these. While this appears to be concerning, most IMU have calibration logic to remove the Earth’s rotation. If this calibration is not performed accurately, then this could cause issues. But let’s assume the calibration worked. There are other items that affect the accurate. For example, how fast is your controller (ESP32, Arduino, Raspberry PI, …) reading the data from the IMU and performing the calibrations. The good sensors and controllers can handle this very quickly. I have seen posts stating results between 1 to 3 degrees. For this let’s assume its accurate to a +/-1 degree. There could be better IMUs, but this is very good for the typical low cost IMU sensor.
Let’s Calculate Wheel Encoder Accuracy
Need to do a little math to determine the accuracy of a wheel encoder. Below is a F model Robot Tour robot. These are the basic wheels that I strongly recommend replacing. The distance between the wheels in this example is 176mm. To turn 90 degrees, one wheel rotates forward and the other rotates backwards.

TopFinishKits’ Robot Tour Model F Series
Each wheel will need rotate a quarter of the circumference of a circle with the diameter of 176mm in this example. Each wheel will turn 138.2mm (176 x 3.14159 / 4). For the 8cm diameter wheel example, this would be 281.7 encoder counts (512 pulses * 138.2cm / (80cm x 3.14)). Encoders can only count whole numbers and not factional pulses. That means the encoder could be off by 1 or 2 pulses. For this example, let’s use 2 pulses. The accuracy would be about +/-0.6 degrees ( 2 / 282 x 90 degrees).
How does the angle accuracy affect the robot?
The simple answer is how accurate the 90 degree turns are. If the robot’s turn is always off by one degree, then after four turns the same direction, then the robot could be off by up to 4 degrees. This can become worse as a typical track can need well over 10 turns. This is where the IMU could have an advantage. The IMU would be able to correct for the these multiple turns that are not perfect 90 degree turns.
Unfortunately the damage has been done before the IMU can correct the robot’s angle. At the end of the each straight line move, the robot will be off by a distance error. The distance error is equal to the Commanded Move Distance times Sin(Angle Error). For a 500mm Commanded Move, the Distance Error with 1 degree of error would equal 8.7mm. Which most people should be saying that is less than 1cm. Who cares about a 1cm of error.

What is the impact of Distance Error?
Too often I see teams practice on a full track. Which is important to learn best strategies for best score. Plus will the robot actually work. I highly recommend instead to perform the test below to verify your robot is working well.
This is a common test I use with teams I advise. No track is required for this. Place a start point on the floor. Program the robot to drive forward 1 meter, turn right, forward 1 meter, turn right, forward 1 and so on until the robot drives in a square. Most teams with IMUs will say the robot is back to the same angle. But what you should be measuring is the distance the dowel rod is from the start point. Testing your robot with 4 rights and followed by 4 lefts should be the next test. If this is always under 1 to 2cm, then you have a very good robot.

Which is better? IMU or Encoder?
I have not really answered this question yet. In the encoder example above, I listed the encoder angle error at 0.6 degrees. If that is all the accuracy of the encoder, then the IMU could have the advantage. Its much simpler to program after getting the calibration to work.
What if the wheel encoder was improved? For example, what if the robot had a 8cm diameter wheel and 2048 pulses per wheel revolution? The same math would show the angle error at about 0.1 to 0.2 degrees. That is a big difference when compared to 1 degree of angle error of an IMU. The robot with the 2048 pulses per wheel rotation will perform better in the test above then the robot with just an IMU.
Bottom line, I see too many teams depending on the IMU and ignoring what the wheel encoders offer to improving 90 degree turns. I’m sure a lot of individuals will debate this. And I’m sure there are successful robot examples. Just remember the distance score in Robot Tour is very important if everyone is getting all the bonuses.
A comment I hear all the time is that flying drones using IMUs are very successful. I like to remind individuals that drones have access to GPS data. This allows for constant calibration and correction. Accessing GPS data during an Robot Tour event would be illegal.
For Robot Tour competitions, a high-resolution wheel encoder (2048+ pulses) combined with careful calibration will outperform an IMU-only solution for turning. However, the best approach combines both: use encoders for precise turn control and an IMU as a verification tool.