by limor » Wed Jun 22, 2011 7:46 pm
by limor
Wed Jun 22, 2011 7:46 pm
We did a little experiment today and managed to get a PC to control the AX12 servos using a 3.3V FTDI board by shorting the RX and TX pins.
We wanted to check that AX12 servos respond to 3.3V signal.
The conclusion is that this trick does work and allows for a very cheap and simple for PC - AX12 communications. The only thing to notice is that when sending out a packet from the PC, it will be read back on the PC since the TX and RX are shorted.
Used a great package to test this called tekkotsu.org from Carnegie Mellon which includes also a useful tool called dynamixel_util
<pre>
gato@gato-laptop:/usr/local/Tekkotsu/tools/dynamixel_util$ ./dynamixel_util
Usage: ./dynamixel_util [options] set (ALL|<src_id>) <dest_id>
./dynamixel_util [options] scan [<id>|<range> ...]
./dynamixel_util [options] perf [sync] [save <file>] (<id>|range ...)
./dynamixel_util [options] baud (rate | divisor) <x>
./dynamixel_util [options] read <id> [ <start> <end> ]
./dynamixel_util [options] write (ALL|<id>|<range> ...) <addr>=<value>[ <value> ...]
./dynamixel_util [options] move (ALL|<id>|<range>) <pos> [<speed>]
./dynamixel_util [options] relax (ALL|<id>|<range> ...)
./dynamixel_util [options] conf
set: change the ID value of specified servo(s) to <dest_id>. If ALL is
specified as the source, the command will be broadcast, and affect
all connected servos. Otherwise a single servo can be specified to
reassign its ID without affecting any others which may be connected.
scan: the program will attempt to ping each of the specified servos,
where each argument is an ID or an inclusive range 'm-n'. If no
arguments are specified, it will scan the entire valid range (0-253).
perf: Benchmark performance testing, attempts to read and write from
specified servo(s) as quickly as possible until enter is pressed
or stdin is closed, then reports statistics.
If the 'sync' option is specified, a sync_write command will be used
instead of writing to each servo individually.
The 'save' option will cause raw sample data to be saved to the
specified file. The first line will be cycle end times, second line
will be read latencies, and third line will be write latencies.
baud: Sets the baud rate or divisor to the specified value for all
connected servos. Baud rates must be within 3% of a divisor,
as defined by: RATE = 2000000 / (DIVISOR + 1)
read: Dump all registers for the specified servo, optionally specifying
beginning and ending register addresses (inclusive).
write:Stores a value at the specified address for each of specified servos.
If multiple values are provided, they will be written to subsequent
registers.
move: Send a position command to specified servo(s). If the position
argument is negative or has a leading '+', it will be interpreted
as relative to the center of motion; otherwise absolute CCW position.
relax:Sends a torque disable command to specified servos.
conf: displays the current configuration settings and then exits
OPTIONS
-r,--read <file> Reads configuration settings from <file>
-w,--write <file> Writes final configuration settings to <file>
(If <file> is 'default', saves at path below)
-c,--comm <commport> Choose a comm port (defaults to SerialCommPort)
<key>=<value> Assigns a new value to a configuration setting
(overrides any settings read from file)
The setting file will store the comm port type. If you specify a new
type with --comm, it will overwrite the previously read settings with
the defaults for the new comm type.
Default configuration settings are read from:
~/.dynamixel_util.plist
COMMPORTS
Available comm ports are:
ExecutableCommPort FileSystemCommPort NetworkCommPort RedirectionCommPort SerialCommPort
gato@gato-laptop:/usr/local/Tekkotsu/tools/dynamixel_util$
</pre>
We did a little experiment today and managed to get a PC to control the AX12 servos using a 3.3V FTDI board by shorting the RX and TX pins.
We wanted to check that AX12 servos respond to 3.3V signal.
The conclusion is that this trick does work and allows for a very cheap and simple for PC - AX12 communications. The only thing to notice is that when sending out a packet from the PC, it will be read back on the PC since the TX and RX are shorted.
Used a great package to test this called tekkotsu.org from Carnegie Mellon which includes also a useful tool called dynamixel_util
<pre>
gato@gato-laptop:/usr/local/Tekkotsu/tools/dynamixel_util$ ./dynamixel_util
Usage: ./dynamixel_util [options] set (ALL|<src_id>) <dest_id>
./dynamixel_util [options] scan [<id>|<range> ...]
./dynamixel_util [options] perf [sync] [save <file>] (<id>|range ...)
./dynamixel_util [options] baud (rate | divisor) <x>
./dynamixel_util [options] read <id> [ <start> <end> ]
./dynamixel_util [options] write (ALL|<id>|<range> ...) <addr>=<value>[ <value> ...]
./dynamixel_util [options] move (ALL|<id>|<range>) <pos> [<speed>]
./dynamixel_util [options] relax (ALL|<id>|<range> ...)
./dynamixel_util [options] conf
set: change the ID value of specified servo(s) to <dest_id>. If ALL is
specified as the source, the command will be broadcast, and affect
all connected servos. Otherwise a single servo can be specified to
reassign its ID without affecting any others which may be connected.
scan: the program will attempt to ping each of the specified servos,
where each argument is an ID or an inclusive range 'm-n'. If no
arguments are specified, it will scan the entire valid range (0-253).
perf: Benchmark performance testing, attempts to read and write from
specified servo(s) as quickly as possible until enter is pressed
or stdin is closed, then reports statistics.
If the 'sync' option is specified, a sync_write command will be used
instead of writing to each servo individually.
The 'save' option will cause raw sample data to be saved to the
specified file. The first line will be cycle end times, second line
will be read latencies, and third line will be write latencies.
baud: Sets the baud rate or divisor to the specified value for all
connected servos. Baud rates must be within 3% of a divisor,
as defined by: RATE = 2000000 / (DIVISOR + 1)
read: Dump all registers for the specified servo, optionally specifying
beginning and ending register addresses (inclusive).
write:Stores a value at the specified address for each of specified servos.
If multiple values are provided, they will be written to subsequent
registers.
move: Send a position command to specified servo(s). If the position
argument is negative or has a leading '+', it will be interpreted
as relative to the center of motion; otherwise absolute CCW position.
relax:Sends a torque disable command to specified servos.
conf: displays the current configuration settings and then exits
OPTIONS
-r,--read <file> Reads configuration settings from <file>
-w,--write <file> Writes final configuration settings to <file>
(If <file> is 'default', saves at path below)
-c,--comm <commport> Choose a comm port (defaults to SerialCommPort)
<key>=<value> Assigns a new value to a configuration setting
(overrides any settings read from file)
The setting file will store the comm port type. If you specify a new
type with --comm, it will overwrite the previously read settings with
the defaults for the new comm type.
Default configuration settings are read from:
~/.dynamixel_util.plist
COMMPORTS
Available comm ports are:
ExecutableCommPort FileSystemCommPort NetworkCommPort RedirectionCommPort SerialCommPort
gato@gato-laptop:/usr/local/Tekkotsu/tools/dynamixel_util$
</pre>