Servo Controls
This tutorial will provide technical information about servo motors and how they work. We made it easy to get a robot up and running. However, there are many fun and exciting things to learn about how the robot works. The more you know, the more you can get your robot to do it!
Types of Servos
ARC supports all servos, including the ability to define your servo driver using the Servo Script Robot Skill. The most common types of servos are...
- PWM Hobby servos that are connected directly to EZB digital ports
- Smart (Robotis Dynamixel, Lynx Motion, Feetech, Kondo KRS, LewanSoul, UB-Tech, and more)
- PWM servo extenders (SSC-32)
*Note: Servo driver robot skills are in the Servo Robot Skill Category. These skills are also listed at the bottom of this document.
Servo Ports (Vx and Dx)
There are two types of servo ports for ARC: those starting with the letter D and those starting with the letter V.
Dx servo ports range between 0-24 (D0-D24) and are directly connected to the EZB microcontroller firmware's communication protocol. This means that if you specify the position of a Dx servo port, the value will be sent to the EZB microcontroller using the communication method. Dx servo ports are, therefore, directly controlling an EZB microcontroller servo pin. Because of this, there may be a mapping between the Dx port in ARC and the physical EZB microcontroller pin. When selecting a servo port, the dialog will display the EZB and mapping pins. Reference the mapping pins of the EZB when selecting the Dx port in the dialog.
Vx servo ports are virtual servo ports ranging between 0-99 (v0-v99). They are used internally within the ARC framework and not connected to an EZB via the communication protocol or the firmware. Changing the value of a Vx port signals an event within the ARC framework for other robot skills to act upon. The best example is using a Robotis Dynamixel smart servo as you select the Vx port for the corresponding ID. When the Vx value changes, the Dynamixel robot skill will notice the new value and send it to the corresponding servo. The Vx virtual servos allow servos that have respective robot skills to control unique protocols. Another example of using a Vx servo port is a servo controller, such as the SSC-32 or Pololu Maestro.
Servo Interface Menu
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...
The servo interface menu is standard across all robot skills using servos in their configuration menu. This menu will be displayed when selecting a servo in a robot skill's configuration. By default, 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
This new menu will display when the advanced button is pressed on the standard interface menu. This advanced menu allows the user to specify additional options and add multiple servos to an option. Press the Advanced button to add various servos or configure advanced settings.
*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.
Advanced settings such as...
-
Min/Max
The minimum and maximum limits the servo can move. This is between 1 and the global max servo resolution value (default 180). -
Ratio
The ratio is a multiplier of the position from the first servo. It is important to note that the ratio of the first servo will always be 1. This is because it is the master servo that all consecutive servos will reference for their position * ratio. Even if you attempt to change the first servo ratio, it will restore to a value of 1. -
Velocity
If supported by the servo/driver/ezb, the velocity will control the servo's velocity. Check the manual for your specific servo to understand the value range. The values are not specific to ARC because they are unique to each servo. -
Acceleration
If supported by the servo/driver/ezb, the acceleration will control the servo's acceleration. Check the manual for your specific servo to understand the value range. The values are not specific to ARC because they are unique to each servo. -
Speed
If supported by the servo/driver/ezb, the speed will control the servo's speed. Check the manual for your specific servo to understand the value range. The values are not specific to ARC because they are unique to each servo.
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 a PWM Servo, the value 360 will become the new maximum servo position. Still, the servo will not have any higher resolution because PWM servos are limited to 180 degrees. However, a dynamixel servo or stepper motor would use the 360 degrees. Remember, servos can only move in positive integer values.
*Note: The maximum servo resolution supported in ARC is 2,147,483,647
Most Popular Servo Robot Skills
Many robot skills control servos, such as the Camera Device, WiiMote, Joystick, and scripting. Here are a few of the most popular servo skills used by robot builders to get started.
Vertical/Horizontal ServoThese servo skills allow you to drag the mouse horizontally (left & right) on display to move the position of a horizontal servo. The horizontal servo will only move to the minimum and maximum limits you specify in the skill's settings. These robot skills are excellent for testing your robot's movement range and ensuring the servos work. We always recommend using these robot skills when building your robot to ensure everything works correctly. At the same time, the two versions of this skill differ in how the user interface is presented by dragging vertically or horizontally. This does not have to matter based on the orientation of your servo in the robot itself. These two skills can be used for testing as it is a matter of preference.
Horizontal Robot Skill Horizontal Robot SkillCamera Device
The camera device is one of the most potent and popular robot skills, demonstrating ARC's power. This robot skill will use either the EZB remote camera (if supported) or a USB webcam mounted on the robot. By configuring options, the camera can track objects, faces, and colors and even detect emotion or age with additional robot skills. The Camera Device has settings in the options menu for controlling servos when a camera is mounted on a gimbal. This feature allows the robot's camera to move and track the object.
Camera DeviceAuto Position
Create servo animations to have your robot wave, dance, or pick up and move objects. The Auto Position skill transforms a group of servos into custom positions (Frames) to create animations. You can combine the frames into actions for your robot's animation. This is done with "Inverse Kinematics" or "Motion Planning."
There are two types of the Auto Position robot skill. One is a movement panel that plays servo animations for robots that use servos to walk (i.e., humanoids or hexapods). The other type is used for robots that use a different movement panel (i.e., hbridge, continuous rotation, etc.) but has servos for arms to be animated.
This is a popular robot skill for humanoid robots, such as the InMoov, Robotis Bioloid, or EZ-Robot JD/Six. For robots with many servos used in arms or legs, this allows the creation of animations that can be executed programmatically by other robot skills using the ControlCommand(). This means your robot can perform actions based on speech recognition or chatbot conversations.
Auto Position with movement panel Auto Position for only servosJoystick
Two types of joystick robot skills are based on the type of joystick used. The most common type is the XInput version, which supports the latest joysticks, including Xbox controllers. The xInput has additional support for analog trigger buttons and multiple independent joysticks. These robot skills can control servos, allow scripts to be assigned to buttons, and optionally control the current movement panel to move the robot.
Direct Input Joystick xInput JoystickVirtual Reality
Being able to control your robot servos with your hands and move the robot's camera with your head is a fantastic experience. A few robot skills support a variety of VR headsets, including the Meta Oculus Quest and Steam VR (i.e., HTC Vive, Windows Mixed Reality, etc.). The hand tracking feature is one of the great features of using the Meta Oculus Quest robot skill. This feature lets you move servos without holding the controllers in your hands. You can map your fingers to individual servos, which is excellent for humanoid projects like the InMoov.
Direct Input Joystick xInput JoystickHard Set Servo Limits
With the appropriate Javascript, EZScript, or Python commands, you can set global servo positions across all robot skills.
The robot skill settings for servos are for the individual robot skill only. Every robot skill has 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.
There are commands for all languages (JavaScript, Python, EZ-Script, etc.) for specifying limits. For example, the EZ-Script command in an INIT script to specify servo positions globally across the entire application is...
SetServoMin (servo port, position)
Set the minimum limit that this servo can ever move to
The servo position is between 1 and 180 (or global max servo value)
Example: SetServoMin(D14, 40)
SetServoMax (servoPort, position)
Set the maximum limit that this servo can ever move to
The servo position is between 1 and 180 (or global max servo value)
Example: SetServoMax(D14, 100)
Here's an example from the EZ-Robot JD project that prevents the left gripper from moving further in either direction globally across the ARC software. The appropriate commands for setting global servo position values are in the JavaScript, Python, or EZ-Script manual.
# Left Gripper
SetServoMin(d6, 30)
SetServoMax(d6, 90)
Example Testing a PWM 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. In this example, we will use a standard PWM hobby servo connected to one of the EZB digital ports.
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. This window allows you to browse and select controls to add to your project. 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, a Horizontal Servo skill control 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 robot skill will have many options. Any robot skill that uses Servos will have a similar servo configuration interface. Some robot skills may have two or more servo configuration interfaces (usually for horizontal and vertical servo robot skills). In this control, there is only one servo interface.
Name: This is the name of the robot skill.
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 (or global max servo value). 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 moves, you can specify multiple servos.
Step 9
Press the PORT button, and ARC will display the EZ-B port configuration. In this dialog, you may select the port and press the Close button.
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 (or global max servo value). 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 an 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 an ARC and an EZ-B.
Step 12
The Multi Servo button allows this control to move more than one servo simultaneously. 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 servo control configuration dialog 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 you hold the mouse button. Slide the mouse up and down (for vertical control) to move the servo between the specified limits.
*Note: 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.
Servo Robot Skill Drivers
While hundreds of robot skills use servos, that may not be their primary focus, and they are in different categories. For example, the Camera Device is a popular robot skill, but its primary focus is the camera and tracking, so it is located in the Camera category. The Servo category generally lists robot skills that are driver- or servo-specific. You will find the robot skill driver in the Servo category if you use an intelligent servo, such as the Robotis Dynamnixel. Below is a list of all robot skills from the Servo robot skill category.
Create frames and actions to animate the robot servos into pre-defined positions. Use this to have the robot wave, dance, or display interactive gestures. A gait is the movement pattern of animals limbs, including robots, during locomotion. This robot skill allows robots to customize servo animations for gait locomotion and interacting with the world. Some robots (i.e., humanoids, hexapods, and more) use servos to move with gaits based on speed, terrain, maneuverability, and energetic...
This skill automatically releases specified servos after a certain amount of time from their last movement. This is very helpful to use when it comes to repetitive, quick servo movements. Main Window 1. Pause Checkbox This button pauses the application of the Auto Release skill. 2. Status Display This displays which port the auto release skill was applied to and at what position it was last in before the auto release was activated. Settings 1. Title Field This field contains the title of...
Unlike a Standard Servo, a continuous servo has its internals changed to allow continuous 360 rotation. The two parts that are removed from a standard servo to create a continuous rotation servo are: Mechanical Stop: The spindle will stop if you attempt to rotate a standard servo further than 180 degrees. That is due to a mechanical stop built onto the output gear within the servo. Continuous servos have that stop removed. Potentiometer: The potentiometer in a standard servo records the...
Use Vx virtual servo ports to control up to 99 servos on a custom servo controller via a serial protocol, such as Arduino Mega, with custom firmware. The Vx virtual servo ports allow you to control up to 99 servos on a custom servo controller via a serial protocol, such as an Arduino Mega, equipped with custom firmware. This custom firmware can be loaded onto an Arduino or a custom microcontroller, transforming it into a specialized servo controller. The robot skill will establish a connection...
Connect and control Robotis Dynamixel Smart Servos with ARC, including Arduino and Robotis controllers. This open-source plugin converts the Virtual Servo ports with any EZ-B (v0-v99) to control Robotis Dynamixel Servos. The servos supported are XL-320, AX-12, and XL430 compatible protocols. Dynamixel Servos are very different than regular hobby PWM servos. Firstly, they are considered much more professional due to their design specifically for use in robotics. Each Dynamixel Servo contains a...
Control Feetech serial bus smart servos over EZB UART or PC COM port. The selected ARC’s Vx virtual ports must match the servo IDs in the config screen - and voila, youre off to the robot races! Main Window The main window on the project workspace will display information about active connections and errors. To configure the servos, press the ... configuration in the title bar. Configuration Screen The configuration allows selecting the virtual servo ports that represent the IDs of the...
Control Feetech serial bus smart servos over EZB UART or PC COM port. The selected ARC’s Vx virtual ports must match the servo IDs in the config scree - and voila, youre off to the robot races! Main Window The main window on the project workspace will display information about active connection and errors. To configure the servos, press the ... configuration in the title bar. Configuration Screen The configuration allows selecting the virtual servo ports that represent the IDs of the Freetech...
This servo skill allows you to drag the mouse horizontally (left right) on display to move the position of a horizontal servo. The horizontal servo will only move to the minimum and maximum limits you specify in the skills settings. The limits are both set to 90 by default. *Note: Like all robot skills, this does not save the last servo position used. To set a servo position when the robot connects, create an initialization script using the Connection Skill. Main Window 1. Position...
This Synthiam ARC Robot Skill is a powerful, customizable tool that provides advanced kinematic solutions for your robot arm. This tool allows you to define and manipulate the structure of your robot arm by adding joints and bones, providing a high level of customization to suit your specific needs. It is designed to be user-friendly and intuitive, making it accessible to beginners and experienced users. Whether designing a robot for industrial applications, research, or personal projects, the...
Control Kondo KRS smart servos with ICS 2 3.5 Protocol over the EZB UART. We cannot verify this works because we do not have servo hardware to test with. This plugin is in response to a community thread regarding Kondo servos. *Note: This is experimental The servos can be chained together and connected to the EZ-Bs UART #1 on port D5. The baud rate must also be configured in the settings of the plugin. Each virtual port can be selected for the communication version based on the servo model. The...
Control the LewanSoul Digital smart Servos (i.e., LX-16A) with ARC. The servos must be powered appropriately and connected to the EZ-B v4 or IoTiny with the respective port. Visit the Config menu of this plugin to view the port configuration. This plugin will only operate on EZB Index #0. Demonstrated with IoTiny using Software UART Details ARCs Virtual Ports (V1..V99) can be assigned to the LewanSoul servos. - This plugin requires the RX signal wire of the servo to be connected to the TX of...
The Lynxmotion Smart Servos (LSS) are compact, modular actuators which were designed to be an evolution of the standard servo for use in multi degree-of-freedom robots, animatronics, custom robot projects and more. The servos form the core modules of the next generation Lynxmotion Servo Erector Set (S.E.S.) and a wide variety of modular brackets, mechanics and electronics have been designed around them. Smart means there is sensor feedback for Position, built-in safety features. The LSS...
Control servos using the Pololu Maestro servo controllers that come in flavors of 6, 12, 18, or 24 servos. The connection for this robot skill is USB, and therefore great for onboard computers. This robot skill binds to the ARC Vx virtual servo ports. The index of each Vx port is directly related to the index of the Maestro servo port. That means if you send a movement to V1, the servo is sent to Maestro #1 servo. Configuration 1) Device This displays the serial numbers of all Maestro USB...
This control will allow hobby PWM servos to have positional feedback in ARC with a slight modification requiring a wire, soldering iron, and Philips screwdriver. This uses the ADC port on the EZ-B (v4, Arduino, etc.) Example In this video, we remote control a JD with another JD. The servo positions from one JD are read using this robot skill, and the positions are set to the other JD. This is like using one JD as a puppet to control the other JD. Video Tutorial Watch this video tutorial to see...
Receive servo positions in real-time over an Arduino and its ADC ports. This control connects to an Arduino over I2C and receives the values of the ADC ports. The Arduino requires firmware to be programmed, which can be downloaded below. Depending on your Arduino version, the code can be modified for the number of ports. The Arduino code available here is for the Arduino Nano, a tiny little Arduino that nicely fits next to an EZ-B or IoTiny. It connects to the EZ-B via I2C using its A4 and A5...
This skill is similar to the Horizontal and Vertical servo skills. However, the difference between this skill and the others is that it allows you to specify a Master Servo. The slave servos will move into relative positions of the Master. If you move the master servo from ANY skill, the slave servos will move to their relative positions. You can use scripting or the checkbox to Pause and Unpause this skill whenever you like, preventing the slave servos from moving. Note that servo selection...
Inverse kinematics calculates the joint angles to position the Robotis Open ManipulatorX effector to a specific desired location in 3d cartesian space. Inverse Kinematics Inverse kinematics is a computational process used in robotics to determine the joint configurations necessary to position and orient the end-effector (usually a robot arms hand or tool) at a specific target location and orientation in three-dimensional space. It involves solving equations that map the desired end-effector...
Move a servo using the mouth with an on-screen widget
This skill allows you to drag your mouse or finger (on a touchscreen) to move x-axis and y-axis servos. Its like a virtual joystick. This is a great skill to use when you have servos in a pan/tilt configuration. Main Window 1. Servo Pad Hold your mouse or finger (if you have a touchscreen) on this pad to control servos in a pan/tilt configuration. Swipping left and right will move the x-axis servo. Swipping up and down will move the y-axis servo. Settings 1. Title Field This field contains...
This plugin allows recording and replaying servo movements in specified speeds and direction. Trigger the recording playback and speed using ControlCommand() from scripts. Realistic Motions For realistic motion recordings, we recommend creating the recordings with the Servo Pad Control. Find more information about the Servo Pad here: http://www.ez-robot.com/Tutorials/Help.aspx?id=150 Recording You can store multiple recordings in this plugin. Each can be given a unique name that allows the...
This skill allows you to adjust the speed of a servo or PWM between two positions. It can be used for quickly identifying and experimenting with servo speeds for your application. This skill does not save the last setting or restore settings when the project is loaded. *Note: Before this skill can be used, the servo position must be initialized. To do this, you can simply set the position with a script command or a servo skill. If you wish to have your robot initialize a servo speed when...
This control is an all-in-one servo view. You can add servos to be viewed in the summary. The position and speed are displayed and both can be modified. The control can be resized to fit the number of servos added.
Adding this control to your project will connect to an SSC-32 servo controller. The connection can be direct via pc com port. Or through an ezb supporting the Hardware Uart or Software Uart capabilities, such as the EZ-Robot EZ-B v4/2 Wi-Fi Robot Controller or Arduino Mega. The Virtual Servo Ports in ARC, labeled V0, V1, V2... V31 will be connected to the SSC-33 and used to move servos through the SSC-32. The configuration menu on this control will allow you to specify the baud rate and how the...
Control up to 127 stepper motors as servos with any stepper motor driver or motor type. This robot skill requires a low-cost and small-profile Arduino connected to each stepper motor driver. Each Arduino is given a unique ID on the optional serial network, which matches an ARC Virtual Servo (Vx) port. All 127 Arduinos will share the same PC COM port via the first Arduinos USB connection. An optional end-stop limit switch can calibrate the steppers home position. For example, if the Arduino...
Control the UBTECH Alpha Robot Digital smart Servos (UBT-12HC) with ARC. The servos must be powered appropriately, and connected to the EZ-B v4 or IoTiny with the respective port. Visit the Config menu of this plugin to view the port configuration. The Virtual Ports (V0..V99) in ARC can be assigned to the UbTech servos. UART Ports - This plugin requires the RX signal wire of the servo be connected to TX of the selected UART or digital port (if Software UART is selected on IoTiny) - Hardware UART...
This servo skill allows you to drag the mouse vertically (up down) on display to move the position of a vertical servo. The vertical servo will only move to the minimum and maximum limits you specify in the skills settings. The limits are both set to 90 by default. *Note: Like all robot skills, this does not save the last servo position used. To set a servo position when the robot connects, create an initialization script using the Connection Skill. Main Window 1. Position Adjust/Display...