Skip to main content
Teacher Portal

Range of Motion

Teacher Toolbox icon Teacher Toolbox - Activity Outline

  • This exploration will introduce students to the concept of a mechanical range of motion and how it can be explored using the arm and claw.

  • Students will also explore different blocks that can be used to safely program the arm and claw.

Let's explore range of motion!

This exploration will allow you to see the minimum and maximum degrees that the arm and claw can extend. 

  • Make sure you have the hardware required and your engineering notebook.
Materials Required:
Quantity Materials Needed
1

VEX IQ Super Kit

1

VEXcode IQ

1

Engineering Notebook

Teacher Tips icon Teacher Tips

Model each of the troubleshooting steps for the students.

Step 1: Preparing for the Exploration

Before you begin the activity, do you have each of these items ready? The Builder should check each of the following:

Teacher Tips icon Teacher Tips

  • Since this is a beginning activity with navigating the VEX IQ Brain, the teacher should model the steps, and then ask the students complete the same actions. The teacher should then monitor the students to ensure that they are following the steps correctly.

  • Make sure that the students have gently and carefully opened the claw fully with their fingers before selecting Device Info from the Settings menu. This ensures that the claw sets 0 degrees as the point when it is most opened.

Step 2: The Device Menu

Begin by turning on the Robot Brain and selecting the X Button to navigate to the Settings menu.Programs menu on the Brain screen. Demos is highlighted below Drive Control. The bottom of the screen indicates to press X for Settings, which is highlighted with a red box.

Gently open the Clawbot's Claw fully by using your fingers.
Once the Settings menu is open, use the Up and Down buttons on the Brain to select Device Info to open the Device Menu.Setting menu on the Brain screen with Device info selected and highlighted with a red box, below system info. The bottom of the screen indicates to press the check button to select.

The Device Menu screen displays information about the device that is connected to that port. There are 12 ports on the IQ Brain.

Use the arrows to go to the Port 11 Motor, which is the Claw Motor.Devices Menu on the Brain screen showing the data for the Port 11 Motor. Speed, angle, turns all read 0. The screen says to press the check to start the motor.

  • Port 11 Motor: The Claw Motor.
  • Speed: Displays how fast (in revolutions per minute) the motor is spinning.
  • Angle: Displays the current position of the motor in degrees.
  • Turns: Displays how many turns the motor has rotated.
  • Press the Check Button to start and stop the motor. The Claw can also be open and closed manually .

Teacher Toolbox icon Teacher Toolbox - Review the Steps

This is a good point to pause and have the students review the steps that were just completed to navigate to the Device Menu screen.

Step 3: Exploring the Claw and Arm's Motion

  • If you opened your claw fully before opening the Device Menu, then the Claw Motor considered its fully opened position to be 0 degrees - as it displayed in the Device Menu.

    In your engineering notebook, predict what the values of the Port 11 Motor (Claw Motor) will be when you close the claw by gently pushing the sides together. What will the Angle value in degrees be when the claw is closed?

    • Hint: The value reported will not be the same one shown in the image below.

  • Test your prediction by gently pushing the claw closed. What angle is now shown in the Device Menu for the Claw Motor?

Teacher Toolbox icon Teacher Toolbox - Expected Values

If students fully opened the Clawbot's claw before opening the Device Menu, then the fully opened position is 0 degrees. After pushing the claw closed, the Claw Motor should have an angle of approximately 70 degrees.

  • Continue using your hands to gently open and close the claw so that you can see the angle changing.Device menu on the Brain screen shows data for the Port 11 motor. The speed reads 3 rpm, the angle reads 102, the turns reads 0.28. The screen indicates to press the Check button to stop the motor.
  • What do you notice about the range of the angle in degrees for the Claw Motor? Do the Angle values continue to increase, or do they have limits?
  • Write down the range of the Angle value for the Claw Motor: the Angle value when fully opened to the Angle value when fully closed.
  • Are the Angle values for when the claw is open always the same? Are the Angle values for when the claw is closed always the same? Why do you think that is?

Teacher Toolbox icon Teacher Toolbox - Expected Answers

  • The Arm Motor has a greater range of motion and therefore, a greater range of degrees of the motor's Angle value.

  • Because the arm was likely in the completely down position when the Device Menu was selected, the starting Angle was set at 0 degrees. Because the arm can spin all of the way to the back of the Clawbot, the range starts at 0 and passes 360 degrees more than once. The displayed Angle value does not continue to increase beyond 360 degrees and instead restarts at 0. Consequently, the Turns value is also important to figuring out the number of degrees the Arm Motor has spun. For example, the displayed Angle value might be 45 degrees but the Turns value is 3.12. That means the Arm Motor has turned completely 3 times or 1080 degrees plus 45 degrees for a total of 1125 degrees. That is a much greater range than the Claw Motor has.

Teacher Toolbox icon Teacher Toolbox - Stop and Discuss

Facilitate a discussion about what the students have observed from the arm and claw motor. Ask questions such as:

  • What was the claw's and arm's ranges of motion? Were they always the same?

  • Why would this be helpful when programming?

The range of values reported for the Angle of the Claw Motor were not always the same. The range was from 0 to approximately 70 degrees but it often differed by a few degrees. The range of values reported for the Angle of the Arm Motor were also not the same. When the arm was raised and lowered by hand, it ranged from 0 to approximately 1125 degrees but it also increased or decreased by a few degrees each time.

This is helpful when programming because the programmer needs to know how much a motor can spin safely until it reaches its limit. Beyond that limit, it could apply excessive force to the part that it powers. This is important for the programmer to know because there are ways to set the motor's angle or to limit the motor's spins to prevent damage. The lesson will review some of these ways next.

Step 4: Programming with a Range of Motion

Top down view of the claw on the Clawbot IQ fully open.
IQ Claw opened

Subsystems such as claws or arms usually have a limited range of motion, which prevent them from spinning continuously. Claws can only open or close so much before reaching a mechanical limit. Likewise, the range of motion of an arm is often limited by the ground or the body of the robot itself. When working with subsystems with a limited range of motion, it is very important to stay within that range, regardless of whether you are remote controlling the robot or programming it to move autonomously. Continuing to provide power to the motors once a subsystem has reached a limit will cause unnecessary stress on the motor and any connected components.

Teacher Tips icon Teacher Tips

Point out to students that Step 3 had them test and experience the limited ranges of motion of the claw and arm. The claw's range of motion is limited in its opening by the other pieces of the Clawbot and limited in its closing by the point at which the two sides of the claw push on each other. The arm's range of motion is limited by the ground when it is lowered and by the top of backside of the robot when fully raised.

Before learning how to adjust for the claw's and arm's limited ranges of motion, let's look at the blocks used to program the claw and arm.

There are two blocks in VEXcode IQ that can be used to raise and lower the arm and open and close the claw to a specific position.

The [Spin for] block and the [Spin to position] block.

  • The [Spin for] block spins a motor in a selected direction for a selected distance from where it is currently located.Beginning of the Help information for the Spin for block. It shows the block with parameters set to claw motor open for 90 degrees, and reads "Spins a VEX IQ Smart Motor for a given distance".
  • The [Spin to position] block spins a motor to a selected position based on the current position of the motor. The [Spin to position] block determines the best direction to rotate in order to get to the position.Start of the Help information for the Spin to position block. It shows the block with parameters set to clawmotor and position 90 degrees, and reads "Spins a VEX IQ Smart Motor to a set position."

When would these blocks be used? Imagine that you program your arm to raise and lower, but when it lowers, it doesn't fully lower back down to its starting position of zero degrees. Instead, it lowers back to 15 degrees. If you then use the [Spin for] block to raise it 90 degrees - the arm will raise 90 degrees from where it currently is and really be raised up to 105 degrees.

However, in the same situation, if the arm is at 15 degrees and the [Spin to position] block is used to raise it to 90 degrees, the arm will raise 75 degrees to reach the desired position of 90 degrees.

This is important to understand, because if the [Spin for] block is used and the arm is not fully lowered or the claw was not fully closed, the arm or claw could approach its limit for how far it can move.Clawbot IQ with the claw open and arm raised. An arrow indicates the range of motion of the arm from 0 degrees at the bottom to 360 degrees in it raised position. 

Let's look at blocks to use with the [Spin for] and [Spin to position] blocks that help them to program your robot more precisely.

  • The [Set motor timeout] block is used to prevent motion blocks that do not reach their position from preventing other blocks in the stack from running. An example of a motor not reaching its position is an arm or claw that reaches its mechanical limit and cannot complete its movement.Start of the Help information for the Set motor timeout block. The block is shown with the parameters set to claw motor timeout to 2 seconds, and reads "Set a time limit for VEX IQ Smart Motor movement commands."
  • What happens if a [Spin for] block is used and the claw or arm reaches its limit for its range of motion? Will the project stop because the arm or claw cannot move any further?

    The project will not stop until the block has completed its task. If the claw is trying to open 100 degrees but starts from 50 degrees and is trying to spin beyond its range of motion, the claw will continue to try to open even though it cannot. This is not a good situation because this can strain the parts and drain the battery.

    In this case, the [Set motor timeout] block can be used. This block acts as a fail-safe so that if a motor reaches its mechanical limit, it can continue on with the rest of the project after a certain amount of time.

    In the following example, the robot will drive forward after the claw has opened the full 200 degrees or reached the timeout of three seconds.VEXcode IQ project with a When started block and 3 attached blocks. In order the blocks read Set claw motor timeout to 3 seconds, spin claw motor open for 200 degrees, drive forward for 15mm.
  • The [Set motor position] block is used to set the motor's Angle value (its position) to a selected value. It can also be set to 0 degrees to reset the motor's position.Start of the Help information for the Set motor position block. The block is shown with parameters set to claw motor position to 0 degrees, and reads "Sets the VEX IQ Motor's encoder position to the entered value."
  • A [Spin to position] block is easier to program with when you know what the motor's angle currently is. But sometimes, the arm might look like it's fully down when it is actually raised a few degrees.

    The [Set motor position] block lets you set the degrees that you want the motor's Angle to be at. This is very useful for resetting the motor's position to 0 degrees.

    In the following example, the robot's Arm Motor is reset to 0 degrees no matter where it currently is before it spins to the 360 degrees position and drives forward.VEXcode IQ project with a when started block and 3 blocks attached. In order, the blocks read Set arm motor position to 0 degrees, set arm motor position to 360 degrees, drive forward for 300 mm.

Teacher Toolbox icon Teacher Toolbox - The [Set motor timeout] and [Set motor position] Blocks

The [Set motor timeout] and [Set motor position] blocks are not always necessary when programming the arm and claw motor with the [Spin for] and [Spin to position] blocks. However, more motion blocks within a project make it more likely that there could be some drift in the Angle value (position) of the motor. The arm and claw may not return to zero degrees and a [Spin for] or [Spin to position] block risk running up against a mechanical limit of the arm or claw. Setting the [Set motor timeout] block at the beginning of a project or using a [Set motor position] block before a [Spin to position] block can be useful fail-safe practices that can prevent the project from continuing to run the motor if a mechanical limit is reached.

Extend Your Learning icon Extend Your Learning

The Device Menu reports values for all devices connected to the IQ Clawbot. If time permits, allow students to explore the values reported for other motors and devices. For example, the Touch LED in Port 2 reports whether it is Pressed or Released, whether the LED is ON or OFF, and what the color of the LED is currently. These are all sensor readings that can be used while programming projects.

Ask students to explore and manipulate these values by changing the status of each device. For example, press the Touch LED repeatedly to see it report when it is Pressed, when the LED is ON, and in what color the LED is currently lighted.