Pololu protocol - 8 servo serial controller

I’m in the process of writing some open source libraries in perl, python, and possibly ruby for different pololu microcontrollers. Right now I’m working on the serial 8 servo controller in pololu mode.

In my own projects with that microcontroller I’ve only ever had to use command 4. However, for completeness I’d like to have all the commands for that controller supported.

I understand pretty much all the commands except for how command 5 works (set neutral). I understand why you’d want to calibrate, but I don’t understand what effects it has. Say I reset my neutral to 1000 instead of 3000. Does the position formerly at 1000 become the new 3000?

Also, what’s the difference between command 3 and 4. They look like they have the same effect.

Hello,

In general, command 4 (absolute position command) is recommended for processors that can handle it, and your code should implement something like what the other commands do so that you don’t have to go through and adjust every position everywhere if you change a servo.

Set neutral only applies to commands 2 and 3, and it specifies the middle of the range (63.5 in 7-bit commands or 127.5 in 8-bit commands) in 0.5 us increments. So, if you set neutral to 1000 (a really low value), sending a 7-bit position of 63 would give you a pulse just under 500 us, and 64 would give you just over 500 us.

Commands 3 and 4 are very different. Command 3 uses the neutral and range settings to internally calculate the output pulse width based on the 8-bit position parameter. Command 4 just gives you absolute, direct control over the pulse width. Commands 2 and 3 are actually more similar; command 2 just gives you the option of using less resolution in exchange for faster communication (5 bytes per command instead of 6).

- Jan