Multiple ServoControllers

Hi there

I’m currently using three ServoControllers in PololuMode. If I have connected only one, then the servos move correctly. Before I connected two parallel to the RS232 port, I tested the whole program (which addresses three ServoControllers). There was something strange. It functioned until I sent the commands of another ControllerBoard to the currently connected ServoControllerBoard . In my oppinion, the controllerboard shouldn’t do anything. But the ControllerBoard turns on the Red and the yellow LED and the green LED blinks three times over and over again. I have to reset the ControllerBoard that it responds again.

Does anybody know something about this problem?
This happens when I run the following command:

byte[] Movement = new byte[6];
Movement[0] = 128; // start byte
Movement[1] = 2; // BoardNumber
Movement[2] = 2;  // modeselection: range: 0-127
Movement[3] = 1; // Servonumber
Movement[4] = 50; // movement position
Movement[5] = 0; // not used in this mode
_serialport.Write(Movement, 0, 6); // send commands

Thanks a lot.

Best regards


The second byte you are sending is not the board number. It is a device type parameter, and it stays the same for all of your servo controllers; device type 2 is used for setting the servo numbers. You use this command to set the numbers to which the servos respond (see page 8 of the instructions). To use this feature, just connect one servo controller at a time, and send the bytes 0x80, 2, 1 to one of the servo controllers (making it respond to servos 8-15) and send another servo controller 0x80, 2, 2 to make it respond to servos 16-23. If you need to reset one of the units to respond to the default servo numbers, send 0x80, 2, 0. The flashing pattern you see is the confirmation of the servo numbers getting set.

Also, I see you’re using a five-byte command but sending six bytes. To use the command properly, just send the five bytes. (The servo controller should ignore everything until it sees the next 0x80, but it’s still a waste of time to send extra bytes that don’t mean anything.)

- Jan

Hi Jan

Thanks for your response.

You’ve right… Now I see the mistake … I think this comes from working the whole night. :slight_smile:

I did not know that the last byte is not used. Thanks for the hint.

Best regards.