Rasberry3 + Maestro SC + Servo. Neutral is changing

Hello. I have a problem with putting my servos at neutral point. Sometime they keep rotating after i put them at target 1500 (8 bit neutral)

I have a Rasberry 3 connected via UART to Pololu Maestro 12 and 4 servos FS90R connected to Maestro.
Rasberry 3 runs Ubuntu Mate OS.

My Maestro Control Center settings for servos are :
Min: 992; Max 2000; 8-bit neutral 1500; 8-bit range 476.25

After sending to my servos some different targets i send them target 1500 ( for example command for servo on chanel zero: [0x84, 0x0, 0x70, 0x2e]). I want them to stop, but some of them keep rotating. Their neutral point moves somewhere like at 1400, or somewhere else, this is not constant.

Maestro Control Center settings are not showing any changes in neutral.

What seems to be the problem ?


It sounds like you are confused on how the Maestro’s neutral position setting works. The 8-bit neutral setting for the Maestro channels simply specifies the target value that corresponds to 127 when using the 8-bit commands. From the command you gave, it looks like you are using TTL Serial commands with the Compact Protocol, so changing the 8-bit neutral setting in the Maestro Control Center will not have any effect on your command or the behavior of your servos.

I suspect the behavior you are seeing is being caused by the servos. Continuous rotation servos like these have a small potentiometer that allows you to tune the neutral point. They do not come with it tuned to a specific value, so you will likely need to adjust the potentiometer on each servo to react how you want them to. The potentiometer for this specific servo is located on the underside of the servo and can be seen in the picture below, which is taken from the FS90R servo’s product page.

Can you try adjusting the potentiometer on your servos and see if you can get them to respond correctly to your neutral point commands?


1 Like

Thanks. I got the point. Adjusting potentiometer made it better.

Can you also help me with reading data from Maestro... I'm trying to get servo positions, but Maestro does not send anything to me. RX -> TX and TX ->RX are connected correctly. No errors happen. I tried both compact and Pololu protocols...

My code is :

int getPosition(int chanel)
unsigned char command[4];

command[0] = 0xAA;    
command[1] = 0x0C;    
command[2] = 0x10;
command[3] = chanel;                        
if (fd != -1)
    int count = write(fd, command, 4);       
    if (count < 0)
        printf("UART TX error\n");
    else printf("getPosition for %d sent : %d\n", chanel, count);
char response[1024];
memset(response, '\0', sizeof response);
int readRes = 0;
char buff = '\0';
int spot = 0;
do {
    readRes = read(fd, &buff, 1);
    sprintf(&response[spot], "%c", buff);
    spot += readRes;
    printf("Read %c", response[spot]);
} while(readRes > 0);
if (spot < 0) printf("getPosition for %d failed", chanel);
else if (spot == 0) printf("getPosition for %d returned nothing", chanel);
else printf("getPosition %d : %s", chanel, response);


I am glad you were able to get your servos moving correctly.

Can you tell me more about your setup? Please note that the Maestro is a 5V device and the Raspberry Pi is a 3.3V device. The Maestro is not guaranteed to work with 3.3V signals, and you should not be sending 5V signals back to the Raspberry Pi, so if you are not doing so already, you should consider using something like a bidirectional level shifter to send appropriate signals. Also, you should make sure to have a common ground between the two devices. What serial mode did you configure the Maestro for? What baud rate are you using and have you configured the Maestro for that baud rate?

Also, can you post your Maestro settings file? You can save the settings file by selecting the “Save settings file…” option within the “File” drop-down menu in the Maestro Control Center.


I understood about level shifter.I am not using it now, but I checked Rasberry 3 → Maestro (Tx → Rx) serial line while sending commands to Maestro. Voltmeter values jumps up to 5v. How can it be ?

Maestro GND is connected to Rasberry 3 GND GPIO

Serial mode is UART fixed 9600 baud rate. Maestro settings in attachment.

maestro_settings.txt (3.4 KB)

The Maestro UART serial pins are intended for 5V signals; there is a pull-up resistor on the RX pin and the Maestro is not guaranteed to recognize 3.3V signals. Also, connecting 5V directly to the GPIO pins on the Raspberry Pi could damage them, so you should use a logic level shifter before continuing.

Thank you for the additional information. If you continue to have trouble after adding the level shifters, can you post the complete code you are using as well as the full output you get when your run your program?


1 Like

Thanks for detailed explanation.

As soon as i try level shifters, i’l post my results.