Advanced Techniques for EV3 Classroom FLL Programming Part 2: Pivot Turn

We will guide you through the process of creating a pivot turn program, providing a detailed step-by-step approach.

Additionally, we will explore the geometric background necessary to calculate the pivot turn degree versus the wheel motor degree ratio. Understanding this ratio is essential for achieving precise turns with your robot.

By the end of this post, you will have the knowledge to effortlessly make a 90-degree turn using the EV3 Classroom pivot turn block we create together.

If you’re interested in FLL robot design, please check out our robot design principal posts. And please leave your feedback and suggestions.

For how to write a spin turn program, please check out this post.

Pivot turn is one wheel turn, that is, one wheel moves forward or backward and the other doesn’t move.

Spin turn is a two-wheel turn, that is, one wheel moves forward or backward, and the other wheel moves in opposite direction.

Spin turn is very useful when we have limited space. Otherwise pivot turn is relatively more consistent and is suitable for most cases.

There are four kind of pivot turns: forward pivot turn left, forward pivot turn right, backward pivot turn left, and backward pivot turn right. We will create an EV3 Classroom Pivot Turn program which can do all four pivot turns.

Move Tank Block

Many EV3 Classroom blocks can be used to make pivot turns including Move Steering block and Move Tank block .

We prefer to use Move Tank block when making turns because the result is more predictable since we can control two motors separately. For pivot turn, we can set one wheels power to 0 and another one for moving forward or backward. According to online help, the Move Tank Block has three modes as shown in the following screenshot:

EV3 Classroom Move Tank Block

For degrees mode can be used to make pivot turn, waits until the motor has turned for the number of degrees of rotation in the degrees input, and then turns both motors off.  360 motor degrees of rotation corresponds to one full turn of a motor.

The question is what’s the degrees input we should enter if we want to turn our robot for 90 degrees for example. 🙁

Pivot Turn Degree vs Motor Degree Ratio

Let’s define the track as the distance between two wheels.  We will use L for the track. To Pivot turn our robot in Theta degrees, a wheel needs to travel the following distance:

Travel distance = Theta * L

For a wheel with diameter D, to travel the same distance the wheel needs to rotate in motor Degrees, we will have:

Travel distance = Theta * L = Degrees * D / 2.

Now let’s define Pivot Turn Degree vs Motor Degree Ratio as:

Ratio = 2  * L  / D

Pivot Turn Degree vs Motor Degree Ratio means that to spin turn 1 degree, motor B or C needs to rotate 2* L/D degrees.

The geometry of Pivot Turn Degree vs Motor Degree Ratio is illustrated in the following image:

 

Pivot Turn Geometry
Pivot Turn Geometry

For example, if the wheel diameter D is 6.88 cm. and the track length L is 11 cm. the ratio will be calculated as:

Ratio = 2 * 11 / 6.88 = 3.2

Once we have the Pivot Turn Degree vs Motor Degree Ratio, we can use a math block to simplify the input motor Degree calculation based on the degree a robot needs to pivot turn.

Using Pivot Turn Degree vs Motor Degree Ratio

Once we have the Pivot Turn Degree vs Motor Degree Ratio, we can calculate the Pivot Turn Degrees we wanted. The following screenshot shows how to program using a Move Tank block and a Math block.

EV3 Classroom Pivot Turn Right 90 Degrees
EV3 Classroom Pivot Turn Left 90 Degrees

Using Pivot Turn Block

The following screenshot shows how to make multiple pivot turns. Check our post for how to move straight inches.