commanded to move at your selected angular velocity with
your desired amount of torque to within ±0.35° of the
desired endpoint position. The AX- 12+’s maximum rated
holding torque is 229 ounce-inches and it can rotate at a
maximum angular velocity of 114 rpm. Needless to say, if
you get one of your humanoid body parts in the way of a
high-speed max-torque AX- 12+ mechanical operation, it’s
gonna leave a mark.
Standard hobby servos use a variable duty cycle pulse
train to control their shaft’s angular velocity and position.
The duty cycle of the servo control pulse determines the
servo shaft’s rotational position while the angular velocity
of the servo shaft is dictated by the speed of the duty cycle
modulation. Thus, the slower the duty cycle change, the
slower the angular velocity. A pulse width of 1.0 ms will
move a standard hobby servo shaft to the extreme left,
while a 2.0 ms pulse will move the shaft to the far right.
Centering the shaft requires a pulse with a width of 1.5 ms.
When a flock of hobby servos need to be individually
positioned to achieve a common goal such as in model
aircraft and boats, each servo must have access to its
unique pulse width information. In these cases, the
unique pulse widths are multiplexed by a transmitter and
demultiplexed at the receiver. If the hobby servos aren’t in
the air or on the water, an elaborate microcontroller-based
multiple pulse width generator is normally used to control
the servo positions.
The Dynamixel robot actuators don’t depend on pulse
widths for their position information. Instead, a half-duplex,
one-wire, RS-232 protocol-based TTL communications link
transfers command and status information between a host
controller and the robot actuators. The TTL-level status and
command messages are called digital packets. The term
half-duplex means that devices attached to a common
communications link are only allowed to talk when no other
device is talking. In the case of the Dynamixel robot
actuators, all of the robot actuators that are daisy-chained
on the one-wire link spend most of their time listening and
only speak after being spoken to.
It is also possible to command the robot actuators in
the daisy chain to listen and obey only. All of the Dynamixel
robot actuators on the link are able to hear every message
that is transmitted on the wire. However, each actuator that
participates on the half-duplex one-wire TTL link is assigned
a unique address between 0 and 253 decimal. If an
actuator hears a message that does not contain its assigned
address, the message is ignored. The only way to get the
attention of every AX- 12+ on the link at the same time is to
send a digital packet using the broadcast address, which is
254 decimal (0xFE).
In addition to carrying precision position and speed
information, the digital packets can also transport robot
actuator feedback data. We already know that with the
issuance of a command from the host controller, an AX- 12+
can report its angular position and/or its angular velocity.
Other robot actuator parameters such as internal temperature, input voltage, and load torque can also be queried by
the host controller. The fact of the matter is, we can issue a
single READ command and gain access to all of the data
held in the AX- 12+’s Control Table.
I could expound on the virtues of the AX- 12+ all day.
However, you’re not here to listen to me talk. You’re here
to get the skinny on how to put an AX- 12+ to work under
the control of a PIC18F2620. With that, let’s determine
what we need in a hardware way to get the PIC and an
AX- 12+ to communicate with each other.
An AX- 12+ Controller
Behold Schematic 1. I’ve used a pair of CD4069 inverter
gates to mirror the half-duplex transmit/receive logic that is
set forth by the AX- 12+ datasheet. A TTL high applied to
the MODE_SW inverter input enables U3A, the transmit
buffer, and tristates the output of U3B, the receive buffer.
Conversely, a TTL low at the MODE_SW input tristates the
transmit buffer’s output and enables the receive buffer
output of U3B. This simple circuit is the key to the
implementation of the one-wire half-duplex TTL link
required by the AX- 12+. The AX- 12+ datasheet presents the
SCHEMATIC 1. I didn’t have
an 74HC126 part in my
inventory. So, I made do
with what I had. This
74HC125 circuit is logically
equivalent to the 74HC126
circuit shown in the AX- 12+
1. POWER FOR CD4069 AND 74HC125 -- PIN 14 = + 5.0 - PIN 7 = GND.
2. ALL UNUSED CD4069 INPUTS TIED TO GROUND.
3. ALL UNUSED 74HC125 OUTPUT ENABLE PINS TIED TO + 5.0.