Advanced Techniques for EV3 Classroom FLL Programming Part 1: Move Straight Inches

Welcome to our first post on advanced EV3 Classroom programming for FLL competitions!

In this post, we will explain the importance of creating a EV3 Classroom Move Straight Inches program. Our approach is based on what we learned during our EV3 programming, drawing from various resources such as ev3lessons and the Winning Design book.

Mastering the ability to move your robot precisely for a specific distance is very important in FLL competition, eliminating trial and error from your process.

If you’re keen on exploring FLL robot design principles, we invite you to explore our other posts dedicated to this topic. Your feedback and suggestions are highly appreciated.

Furthermore, if you’re interested in SPIKE Prime programming, make sure to check out our series of posts on that subject as well. Stay tuned for more exciting content!

Moving a robot straight forward or backward for a specified distance is a fundamental function in robotics. There are various ways to accomplish this, such as using the Move Steering block or Move Tank block. For most cases, the Move Steering block is suitable. This block has three different modes, which are illustrated in the screenshot below.

EV3 Classroom Move Steering in Rotations Mode
EV3 Classroom Alternative Move Steering

The ‘degrees’ mode activates both large motors (port B and C), waits until one of them has turned for the specified number of degrees of rotation in the ‘Degrees’ input, and then turns both motors off. This mode is useful for making a robot travel a specific distance, where 360 degrees of rotation corresponds to one full turn of a motor.

However, the question remains: how many degrees are required to travel a certain distance, such as 10 inches? Unfortunately, using the ‘Degrees’ input for motor rotation is not always intuitive.

To answer this question, we need to understand the concept of Wheel Circumference.

Wheel Circumference

The wheel circumference is the distance that a wheel travels in one complete rotation. It can be calculated as the product of the wheel diameter and pi (3.14). For example, the circumference of a wheel with a diameter of 68.8 millimeters or 2.71 inches can be calculated as follows:

 PI * Diameter = 3.14 * 68.8 = 216 millimeters or 8.5 inches.

Wheel Cirumference
Wheel Circumference Illustration

Distance to Travel vs Motor Degree Ratio

The distance to travel vs motor degree ratio is defined as:

Ratio = 360 / circumference = 360 / (PI * Diameter)

The unit of the distance to travel is the same as the unit for diameter. For example, if a wheel has a diameter of 68.8 mm or 2.71 in, the ratio would be:

360 / 216 = 1.67 degrees per mm or 360 / 8.5 = 42.3 degrees per inch.

So, to travel 1 mm, we would need to enter 1.67 motor degrees, and to travel 1 inch, we would need to enter 42.3 motor degrees.

Multiplying the distance to travel by the distance to travel versus motor degree ratio gives us the motor degrees input for the Move Steering block.

To make this easier, we’ve created tables that list the distance to travel versus motor degree ratios for three types of LEGO wheels that come with the Education set. The ratios are calculated in different distance units (millimeters, centimeters, and inches).

Check this section to find out a wheel’s diameter.

Distance to travel vs motor degree ratio in unit of degree/mm

Wheel Size Diameter (mm) Circumference (mm) Ratio (degree/mm)
88 x 14.34
88
276
1.3
68.8 x 36
68.8
216
1.67
56 x 28
56
175.84
2.05
43.2 x 22
43.2
135.65
2.65

Distance to travel vs motor degree ratio in unit of degree/cm

Wheel Size Diameter (cm) Circumference (cm) Ratio (degree/cm)
88 x 14.34
8.8
27.6
13
68.8 x 36
6.88
21.6
16.7
56 x 28
5.6
17.58
20.5
43.2 x 22
4.32
13.57
26.5

Distance to travel vs motor degree ratio in unit of degree/inch

Wheel Size Diameter (in) Circumference (in) Ratio (degree/in)
88 x 14.34
3.46
10.86
33.1
68.8 x 36
2.71
8.5
42.3
56 x 28
2.2
6.9
52.1
43.2 x 22
1.7
5.3
67.4

Move Straight Inches Using the Distance to Travel vs Motor Degree Ratio

Once we have the distance travel vs motor degree ratio, we can calculate motor degrees needed if we want our robot to travel certain millimeters or inches. For the LEGO basic robot, the wheel is 56 x 28 which has 52.1 Degrees/Inch ration, The following screenshot shows how to program our robot to move 10 inches.

EV3 Classroom Move Straight Inches

We use a math multiplication block to calculate the needed motor degrees based on distance to travel and the ratio. 

Alternatively, the following program will do the same as above.

EV3 Classroom Move Straight Inches

Once move straight inches block is written, it can be copied and pasted to any place where we would like to move our robot straight forward for certain inches.

Where to Find out the Diameter of an EV3 Wheel

LEGO wheels size including the diameter can be found on the tire’s rim as shown below. The size is specified as two numbers. The first number is diameter in millimeters. The second is the width in millimeter.

For example, the large EV3 wheel’s size is 68.8 x 36. It means the diameter is 68.8 millimeters or 2.71 inches.

LEGO Wheel Size
LEGO Wheel Size

To find out a list of LEGO Wheels & their sizes, please refer to this website though it is not complete.