Pololu mode for servo controller

I want to use command 3 (8 bit) to control my servo. I am having difficulty trying to figure out how to calculate the pluse width generated by the controller given a certain neutral setting, range factor, and position command signal. The manual says to multiply the range by the position byte and it is ajusted by the neutral setting. What is this adjustment? For example, let’s say I set the neutral setting to 3000 and the range to 15. I send the controller a 4 in the forward direction. What is the pluse width that is generated?

Hello,

First off, keep in mind that the numbers are all double the number of microseconds. So, a 3000 neutral setting corresponds to 1500 us = 1.5 ms.

In 8-bit mode, you have 256 positions; if your range is 15, that means 7.5 us between consecutive positions, and a total pulse range of 3840/2 = 1920 us. This gets split around neutral, so you get 960 us on each side of 1500 us, giving you output pulses from 540 us to 2460 us.

There is no concept of “4 in the forward direction”; if you give a position of 4, it will be 4 x 7.5 us = 30 us from the end. Depending on your reversing setting, this will give you a pulse output of 570 us (normal) or 2430 us (reversed).

- Jan