Set speed, Set acceleration – Pololu Maestro User Manual

Page 42

Advertising
background image

for that channel. Specifically, an 8-bit target of 127 corresponds to the neutral setting for that channel, while 0 or 254
correspond to the neutral setting minus or plus the range setting. These settings can be useful for calibrating motion
without changing the program sending serial commands.

The channel address is a value in the range 0–254. By default, the channel address is equal to the channel number, so
it should be from 0 to 23. To allow multiple Maestros to be controlled on the same serial line, set the Mini SSC Offset
parameter to different values for each Maestro. The Mini SSC Offset is added to the channel number to compute the
correct channel address to use with this command. For example, a Micro Maestro 6-channel servo controller with a
Mini SSC Offset of 12 will obey Mini-SSC commands whose address is within 12–17.

Set Multiple Targets (Mini Maestro 12, 18, and 24 only)

Compact protocol: 0x9F, number of targets, first channel number, first target low bits, first target high bits,
second target low bits, second target high bits, …
Pololu protocol: 0xAA, device number, 0x1F, number of targets, first channel number, first target low bits, first
target high bits, second target low bits, second target high bits, …

This command simultaneously sets the targets for a contiguous block of channels. The first byte specifies how many
channels are in the contiguous block; this is the number of target values you will need to send. The second byte
specifies the lowest channel number in the block. The subsequent bytes contain the target values for each of the
channels, in order by channel number, in the same format as the Set Target command above. For example, to set
channel 3 to 0 (off) and channel 4 to 6000 (neutral), you would send the following bytes:

0x9F, 0x02, 0x03, 0x00, 0x00, 0x70, 0x2E

The Set Multiple Targets command allows high-speed updates to your Maestro, which is especially useful when
controlling a large number of servos in a chained configuration. For example, using the Pololu protocol at 115.2 kbps,
sending the Set Multiple Targets command lets you set the targets of 24 servos in 4.6 ms, while sending 24 individual
Set Target commands would take 12.5 ms.

Set Speed

Compact protocol: 0x87, channel number, speed low bits, speed high bits
Pololu protocol: 0xAA, device number, 0x07, channel number, speed low bits, speed high bits

This command limits the speed at which a servo channel’s output value changes. The speed limit is given in units of
(0.25 μs)/(10 ms), except in special cases (see

Section 4.e

). For example, the command 0x87, 0x05, 0x0C, 0x01 sets

the speed of servo channel 5 to a value of 140, which corresponds to a speed of 3.5 μs/ms. What this means is that
if you send a Set Target command to adjust the target from, say, 1000 μs to 1350 μs, it will take 100 ms to make that
adjustment. A speed of 0 makes the speed unlimited, so that setting the target will immediately affect the position.
Note that the actual speed at which your servo moves is also limited by the design of the servo itself, the supply
voltage, and mechanical loads; this parameter will not help your servo go faster than what it is physically capable of.

At the minimum speed setting of 1, the servo output takes 40 seconds to move from 1 to 2 ms.

The speed setting has no effect on channels configured as inputs or digital outputs.

Set Acceleration

Compact protocol: 0x89, channel number, acceleration low bits, acceleration high bits
Pololu protocol: 0xAA, device number, 0x09, channel number, acceleration low bits, acceleration high bits

This command limits the acceleration of a servo channel’s output. The acceleration limit is a value from 0 to 255
in units of (0.25 μs)/(10 ms)/(80 ms), except in special cases (see

Section 4.e

). A value of 0 corresponds to no

Pololu Maestro Servo Controller User's Guide

© 2001–2014 Pololu Corporation

5. Serial Interface

Page 42 of 73

Advertising