the 0xEB command, the target position
can be changed, and when the servo
has been re-enabled it will move to the
new target position. Command 0xF6
will also do this.
Command 0xE5 will read the
current position of the servo in a
similar manner as command 0xE9. The
difference here is that any servo’s
position can be read with the 0xE5
command and the 0xE9 command
reads the position of a specific servo
ID number.
Command 0xE8 will read the
current draw and the voltage draw of a
servo. The value ranges from 0 to 255.
When the servo is unloaded and not
moving, the current draw value is
typically 0 and the voltage value is 127.
When I try to force the servo horn to
move by hand, the current draw value
increases and the voltage value
decreases. I don’t have any information
about correlating these values to
actual current draw and voltage draw.
At the very least, this information can
be used to help determine optimal
reaction load performance and to
determine if the servos are being
overloaded.
Command 0xEA can be used to
change the proportional and derivative
gains for the servo to make their
motion “softer” or “stiffer.” I have not
personally experimented with these
numbers, but I have heard that
changing them could make the servos
respond faster to sudden direction
changes, and it could help reduce
servo jitter under certain loaded
conditions.
An interesting command is 0xEB,
the servo Stop/Start command. When
the servo is commanded to stop
(Param2 = 0), the servo will stop
moving where it is. The rotor will be
locked like it was commanded to move
to this position, and will not let you
forcibly change it. What is interesting is
that once the servo is stopped, its
current position can be read, the
velocity can be changed, the current
draw can be read, and other
parameters can be changed.
When the servo is restarted
(Param2 = 1), the servo will move
from where it is currently located to
its new commanded position. This
Header Command Param1
Param2 Checksum Return1
Return2
0x80
0xE1
0x29
0x00
0x76
0x00
0x03
0x80
0xE1
0x2C
0x00
0x73
0xB3
0x03
tmp = 0x0A - 0x00 = 0x0A (tmp = 10 - 0 = 10)
checksum = 0xB3 - tmp = 0xB3 - 0x0A = 0xA3 (checksum = 179 - 10 = 169)
Table 3
command can be easily demonstrated when the servo velocity is set to
near zero, and commanding the
servo to move from one extreme to
another. Shortly after the servo has
started to move, you command the
servo to stop, then change the end
position or servo speed, then restart
the servo, and you will notice that it
will move to the new position at the
new velocity.
The last motion command is 0xEF.
This command will stop all motion
control of the servo. Unlike the 0xEB
command which locks the servo
position, the 0xEF command will allow
the servo to be moved by hand. Servo
positions can still be read after the
execution of this command. This
feature enables the ability to manually
move servos to specific positions, and
then records these locations so that
they can be played back later. This is
a feature that will simplify the
programming efforts for animatronic
and walking robot routines.
In addition to the basic motion
commands described previously, the
servos can be reprogrammed with a
microcontroller. The key is to know
which memory locations contain which
parameter. This is where the 0xE1,
0xE2, 0xE3, and 0xE4 commands come
in handy. These commands can be
used to read and write to different
memory and EEPROM locations.
Unfortunately, the memory
locations/addresses and their
functions are not published. But has
this ever stopped anyone from getting
the information they wanted? With
the help of a serial port monitor (I like
to use the Free Serial Port Monitor
program from www.se
rial-port-monitor.com) and the HMI Servo
Programmer, I was able to determine
several of the EEPROM addresses for
several different parameters. With
these two software packages, I can
monitor the data transmitted to and
from the servo, determine which
memory locations/addresses are
changed, and how they are changed
when I change a parameter in the HMI
Servo Programmer software package.
For example, I was able to
determine that the servo ID is stored at
the EEPROM address 0x29. This can be
read using the 0xE1 command, and a
new value can be used to change the
ID number using the 0xE2 command.
By making a set of systematic changes
in the HMI Servo Programmer, I was
able to determine that every single
change to the EEPROM also changed
the EEPROM address of 0x2C.
The value at 0x2C always seems to
change by the same numerical value as
I changed the other values. This gives
an indication that this memory location
is some sort of a Checksum. The best I
can tell from monitoring the data using
the servo reset function (covered next)
is that the checksum is computed using
the same method for individual command packets. Thus, the checksum is
equal to 256 minus the mod 256 of the
sum of all of the bytes written to
EEPROM addresses from 0x00 to
0x2B (Param2 using the 0xE2
command or read by Return1 using the
0xE1 command).
Header Command Param1
Param2 Checksum Return1
Return2
0x80
0xE2
0x29
0x0A
0x6B
0x03
0x03
0x80
0xE2
0x2C
0xA3
0xCF
0x03
0x03
Table 4
SERVO 01.2008 19