User Manual
Receiving serial responses from one of the slave devices on the PC can be achieved by connecting
the TX line of that slave device to the RX line of the Maestro.
Receiving serial responses from multiple slave devices is more complicated. Each device should only
transmit when requested, so if each device is addressed separately, multiple devices will not transmit
simultaneously. However, the TX outputs are driven high when not sending data, so they cannot simply
be wired together. Instead, you can use an AND gate, as shown in the diagram, to combine the
signals. Note that in many cases receiving responses is not necessary, and the TX lines can be left
unconnected.
Whenever connecting devices, remember to wire the grounds together, and ensure that
each device is properly powered. Unpowered devices with a TTL serial port can turn on
or partially on, drawing power from the serial line, which means that extra care must be
taken when turning power off and on to reset the devices.
Sending commands
The Pololu Protocol or Mini SSC protocol should be used when multiple Pololu devices are receiving
the same serial data. This allows the devices to be individually addressed, and it allows responses to
be sent without collisions.
If the devices are configured to detect the baud rate, then when you issue your first Pololu Protocol
command, the devices can automatically detect the baud from the initial 0xAA byte.
Some older Pololu devices use 0x80 as an initial command byte. If you want to chain these together
with devices expecting 0xAA, you should first transmit the byte 0x80 so that these devices can
automatically detect the baud rate, and only then should you send the byte 0xAA so that the Maestro
can detect the baud rate. Once all devices have detected the baud rate, Pololu devices that expect a
leading command byte of 0x80 will ignore command packets that start with 0xAA, and the Maestro will
ignore command packets that start with 0x80.
5.h. Serial Example Code
5.h.1. Cross-platform C
The example C code below works on Windows, Linux, and Mac OS X 10.7 or later. It demonstrates
how to set the target of a Maestro channel by sending a Set Target command to its Command Port,
and how to read the position of a channel by sending the Get Position command. The Maestro’s serial
mode needs to be set to “USB Dual Port” for this code to work. You will also need to modify the line
that specifies the name of the COM port device.
Pololu Maestro Servo Controller User’s Guide © 2001–2019 Pololu Corporation
5. Serial Interface Page 62 of 102










