In this post, we will explore the concept of a spin turn, its significance in robotics, and the process of creating an EV3 Classroom spin turn block. Additionally, we will delve into the geometric principles that underpin the calculation of the spin turn degree versus wheel motor degree ratio. Finally, we will provide a step-by-step guide on how to use the EV3 Classroom spin turn block to turn your robot 90 degrees.
By utilizing reusable code such as the Move Straight Inch in combination with the spin turn My Block, we were able to successfully execute tight turns in limited spaces. We hope that by sharing our experience, this post will assist you in creating your own efficient and reusable Spin Turn block in EV3 Classroom.
If you’re interested in FLL robot design, please check out our robot design principle posts. We welcome your feedback and suggestions.
Spin Turn vs Pivot Turn
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 two kind of spin turns: spin turn left, and spin turn right. We will create an EV3 Spin Turn My Block which can do both spin turns.
Spin 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 spin turn our robot in Theta degrees, a wheel needs to travel the following distance:
Travel distance = Theta * L / 2
For a wheel with diameter D, to travel the same distance the wheel need to rotate in motor Degrees, we will have:
Travel distance = Theta * L / 2 = Degrees * D / 2.
Now let’s define Spin Turn Degree vs Motor Degree Ratio as:
Ratio = L / D
Spin Turn Degree vs Motor Degree Ratio means that to spin turn 1 degree, motors B and C needs to rotate L/D degrees in opposite direction.
The geometry of Spin Turn Degree vs Motor Degree Ratio is illustrated in the following image:
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 =L/D = 11 / 6.88 = 1.6
Once we have the Spin 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 spin turn.
Using Spin Turn Degree vs Motor Degree Ratio
Once we have the Spin Turn Degree vs Motor Degree Ratio, we can calculate the Spin Turn Degrees we wanted. The following screenshot shows how to program using a Move Tank block and a Math block.
Using the Spin Turn Block
After creating the EV3 Spin Turn block, we can copy and paste it whenever necessary. The following screenshot provides an illustration of its practical application. It is worth noting that we programmed one motor with a positive power and the other with a negative power, causing them to rotate in opposite directions and enabling the robot to execute a spin turn.