ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

Servo Controls

ARC displays a standard configuration dialog for configuring servos across all robot skills. This manual will explain how to configure a servo (even multiple servos) to be moved from a robot skill. In this example, we will use a vertical servo robot skill, although this procedure applies to any robot skill that uses servos. Many robot skills use servos, including WiiMote, MYO, Camera, and dozens more...


Servo Interface Menu

The standard servo interface menu looks like it across all robot skills that use servos. This menu will be displayed when selecting a servo in a robot skill's configuration. You can choose the port and EZB for the servo, the MIN position value, and the MAX position value. You may also select the checkbox to invert the direction.


Advanced Servo Interface Menu

When the advanced button is pressed on the standard interface menu, this new menu will display. This advanced menu allows specifying additional options and adding multiple servos.

*Note: Hover your mouse cursor over the blue question marks to read about advanced options. Many advanced options require hardware support to work. So, by default, they are set to -1, which means ignore.


Specify Servo Resolution

By default, the software will have a servo resolution of 180 positions. While most hobby servo controllers (i.e., Arduino, EZ-Robot EZB) are limited to 180 degrees, some servos support a much higher resolution (i.e., Dynamixel). You can configure ARC to support a higher servo resolution per project. The global servo resolution setting can be configured in the My Robot Project Properties menu. The range will be calculated to compensate if the value of servo positions is higher than the EZB supports. For example, if you set the ARC servo resolution to 360 while using an EZ-Robot EZB v4, the value of 360 will become the new maximum servo position. 


Hard Set Servo Limits

You can set global servo positions across all robot skills with the appropriate Javascript, EZScript or Python commands.

The robot skill settings for servos are for the individual robot skill only. Every robot skill has its servo values (i.e., min and max). This means the Camera skill has different servo values than the Joystick skill. The values specified in a skill's configuration are specific to that skill.

The command to use in an INIT script to specify servo positions globally across the entire application is...

SetServoMin (servoPort, position)
Set the minimum limit that this servo can ever move to
Servo position is between 1 and 180
Example: SetServoMin(D14, 40)

SetServoMax (servoPort, position)
Set the maximum limit that this servo can ever move to
Servo position is between 1 and 180
Example: SetServoMax(D14, 100)

Here's an example from the EZ-Robot JD project that makes the left gripper not move further in either direction globally across the ARC software. Use the JavaScript, Python, or EZ-Script manual for the appropriate commands for setting global servo position values.

# Left Gripper
SetServoMin(d6, 30)
SetServoMax(d6, 90)


Example Configuring a Servo

Because ARC uses a standard dialog for configuring servos, the following steps will demonstrate how to use it. Any robot skill supporting moving servos will display the same "servo selection" dialog as this example.


Step 1

Load ARC.

*Note: Always ensure you have the latest ARC. When you load ARC and connect to the internet, it will notify you of a newer version.



Step 2

Press the Project tab from the top menu. Now press the Add Control button.



Step 3

The Add Control window will display. You can browse and select controls to add to your project in this window. Press the SERVO tab to view servo-specific robot skills.



Step 4

We are going to use the Vertical Servo control for this example. Many kinds of robot skills interact with servos, even more than you can see on this page. Nearly every skill control uses servos; however, only the specific servo skill controls are listed on this page. Even the Camera, WiiMote, MYO, and more use servos. Click the Vertical Servo button to add the vertical servo skill control to your project.



Step 5

You will add the Vertical Servo skill control to the workspace. This skill allows sliding the mouse vertically to move a servo position. Alternatively, there is a Horizontal Servo skill control which enables the mouse to be dragged horizontally to move the position.



Step 6

As mentioned in the Controls Tutorial, every control has a gear button. You can press this gear button to load the configuration menu. Each control has a unique configuration menu.



Step 7

ARC will now display the configuration menu



Step 8

Each configuration control will have many options. Any control that uses Servos will have a similar servo configuration interface. Some controls may have two or more servo configuration interfaces (usually for horizontal and vertical servo control). In this control, there is only one servo interface.

Name: This is the name of the control.
Board Index: ARC can connect 5 EZ-Bs to the ARC Software. This specifies which EZ-B to send the servo command to.
Port: The EZ-B port of the servo. Pressing this button will display the EZ-B to select the respective port.
Min/Max: Min and Max limits in degrees of the servo. The servo can move between 1 and 180 degrees. The value for Min must be less than the value of Max, in all cases, even when Invert is checked.
Invert: If the servo is moving in the wrong direction, checking this box will reverse/invert the direction of the servo.
Multi Servo: If more than one servo will be moving, this allows you to specify multiple servos.



Step 9

Press the PORT button, and ARC will display the EZ-B port configuration. You may select the port and press the Close button in this dialog.



Step 10

Now that you have selected a port, we can move the servo to specify the MIN and MAX limits. These numbers are in degrees between 1 and 180. Start with the MIN by pressing the mouse button while dragging the cursor UP or DOWN. The MIN value must be less than the MAX value. In this example, set the MIN to a low number, and the servo will move in real-time if connected to ARC and an EZ-B.



Step 11

Move the MAX by pressing the mouse button while dragging the cursor UP or DOWN. The MIN value must be less than the MAX value. In this example, set the MAX to a low number, and the servo will move in real-time if connected to ARC and an EZ-B.



Step 12

If you want this control to move more than one servo simultaneously, the Multi Servo button does just that. Press the button to display the Multi Servo dialog.



Step 13

To add multiple servos, press the ADD SERVO button. Each time the button is pressed, a new servo entry is added. You can remove the servo by pressing the X on the respective servo. Use the PORT, MIN, and MAX to configure the limits. The multi-servo option also allows a ratio to be specified. The ratio is based on the primary value for the first servo in the list. If the servo degree position for the first servo is defined as ten and the ratio is 2, the respective servo will move to degree position 20.



Step 14

Close the configuration dialog for the servo control and return to the workspace. Now that the servo has been configured, you may move it between your specified MIN and MAX limits. Click in the servo position, and the cursor will change while holding the mouse button. Slide the mouse up and down (for vertical control) to move the servo between the specified limits.



*Note: Remember that even though many controls may move servos, the configuration of those servos is only valid for that control. If you configure a camera control to move servos to specific min/max ranges, those ranges only apply to the camera control. Use the Relative Servo control if you wish a servo or group of servos to move together from the script.