When we need actuators for a project, a servo from the remote-control hobby world is a popular solution. Though as the number of servos go up, keeping their wires neat and managing their control signals become a challenge. Once we start running more servos than we have fingers and toes, it’s worth considering the serial bus variety. Today we’ll go over what they are and examine three products on the market.
Our Friend the RC Servo
Remote control hobby servos are remarkable little devices. Each one is a self-contained closed-loop actuator, available across a wide spectrum of price and torque. Their popularity means we have a large selection of hardware available to drive them and software libraries to control them. For quick and simple hacks, they can’t be beat. But the straightforward simplicity of hobby servos become limitations when a project grows in sophistication.
- Communication: RC servo signals only go outbound. There’s no way to get information back. Is it holding the designated position or has it been pushed off target? Is it running OK or is it overheating? Has the servo connector been jarred loose, disconnecting it? Our controller has no way to tell.
- Software Scaling: Each servo requires its own precisely timed control pulse. As the number of servos in a project go up, it demands more powerful controllers, or separate dedicated peripherals, to maintain accurate pulses across all servos.
- Hardware Scaling: Each servo requires its own wire to carry that precisely timed pulse. As the number of servos grow, taming the corresponding growth of wires poses its own challenge.
Enter Serial Bus Servos
Projects that start bumping into these issues may benefit from serial bus servos. They are mechanically similar to the RC hobby servos we all know and love: a gearmotor coupled to a position sensor for closed-loop feedback. Where they differ is the control scheme, communicating with our controller using TTL serial.
All servos are electrically wired in parallel (with each other and the controller) turning a serial line into a serial bus. While serial communication is usually between two endpoints, the servo control protocols are designed so it is unambiguous which device is talking. Everyone playing nicely together on a shared serial bus avoids data collisions and lets them solve the problems outlined above.
- Communication: Bidirectional serial communication allows querying servo status. The controller can now find out if a servo is at position or overheating, and know if a servo is no longer responding.
- Software Scaling: Once a command has been received, a serial bus servo requires no further maintenance. Freed from the need to generate regular pulses, our controller can work on other tasks.
- Hardware Scaling: Since individual servos do not each require a dedicated wire to the controller, they can share power and signal lines with nearby servos. This freedom opens up wiring possibilities and is especially helpful for robots with multi-jointed limbs. (Like hexapods and small humanoid robots.) Only one set of wires is required per limb, with each servo on that limb daisy-chained to the next.
A Tale of Three Servos
With the general concepts established, let’s take a look at three products on the market spectrum. They were evaluated for a personal project because they all shared the following features:
- Documented Command Protocol: Servo manufacturers offer software tools to control their servos, but anyone who wish to write their own custom software can easily do so. All three companies here have released documentation for their set of servo commands.
- Variable Speed: RC servos will always move to its position as quickly as it can, which isn’t always what we want. These servos can be commanded to move to a position at a specified speed and/or over a specified time period.
- Continuous Rotation: A common RC servo hack changes them from a position actuator to a variable speed gearmotor by cutting away any physical end stops and modifying the position sensor. In contrast, these servos can be switched to continuous rotation (or switched back) by sending a command. No hack needed.
- Over 250 Servos: In theory, at least. The control protocol requires that a unique address be assigned to each servo on the bus. This identifying address is an 8-bit number which, minus a few reserved values, still leaves over 250 valid IDs. We’d run into electrical signal integrity issues (distributing a single serial line across many devices) well before we run out of address space.
- Broadcast Address: Speaking of reserved addresses, one of them is the broadcast ID. No servo can be assigned to it, but they all listen to commands sent to it. This is useful in two scenarios:
- Query ID: When there is only a single servo on the bus, we can broadcast the “What is your ID?” query and that servo will respond with its actual ID. This is useful when we have a servo in hand but lost track of the ID previously assigned to it.
- Coordinated Action: We could only send commands to one servo at a time, but sometimes it’s important for multiple servos to move together. To coordinate action, servo commands can be deferred: “Servo 1, go to X on my signal.” “Servo 2, go to Y on my signal.” “Servo 3 ….”. Once individual servos have their orders, broadcasting a “Now, Go!” command triggers waiting servos to all act at once.
- Variable Voltage: These servos can draw motor power directly from a lithium chemistry battery pack (3-cell for Dynamixel AX-12A, 2-cell for the other two) without external voltage regulators.
These are all very useful features for them to share, but these three servos also differ in ways that may be important for a specific project’s requirements.
The Dynamixel line from Robotis is the most established product in this market. It can be found in many projects on Hackaday.io and elsewhere, by hobbyists and research labs alike. Dynamixel has robust documentation and software support, from low-level serial command reference to high level third-party libraries like pypot. AX-12A is the entry-level product to a large product line, so there are plenty of upgrade options if a project should outgrow its servo. AX-12A communicates via half-duplex serial where the transmit and receive lines are combined into a single wire. We need to either build our own circuit to set up a Dynamixel serial bus, or buy an adapter like the U2D2.
The HerkuleX line from DST Robot offers more features for roughly the same price as an equivalent Dynamixel. In addition to specifying speed, it is unique with the ability to specify acceleration/deceleration allowing much smoother robot movements. The DRS-0101 is also the entry-level item in a product line, though this line doesn’t go as high as Dynamixel in either capability or price. As for connectivity, HerkuleX is the easiest to use. HerkuleX serial transmit and receive lines can be directly connected to the controller. No half-duplex translation circuit required like the other two.
The most compelling feature of the LX-16A is its low cost, roughly one-third that of a Dynamixel AX-12A, drastically lowering the price of admission. Obviously this price point required making some trade-offs. On the software side, its command set has fewer features than the others. For example: coordinated action could only be specified for position mode but not for continuous rotation mode. An example on the hardware side is the mounting system. Instead of fine pitched machine screw threads like the others, LX-16A mounting screws self-tap coarse thread into plastic. But the basics of a useful servo are present with metal gears delivering competitive torque and speed. Upgrade options are limited in the small LewanSoul serial bus servo product line, where the LX-16A has but a single sibling. Connecting to a LX-16A requires LewanSoul’s own “BusLinker” board (sometimes “Debug Board”) to translate TTL serial signals to half-duplex serial communication.
Serial Servos for the Serial Hacker
These quick overviews should help when judging which serial bus servos make good project candidates. Obviously there’s a lot more information in their respective specifications we didn’t repeat here. Fully documented servo commands mean these servos can be used by any platform, not just those supported by manufacturer’s software. From an 8-bit PIC to a Raspberry Pi to a full blown PC, any platform can control a highly complex robot using serial bus servos.
More servos, more degrees of movement, more fun! What will you build?