Micro serial servo controller

Hi

I am trying to integrate pololu MSSC to control 4 servo mortors . I want to use LABVIEW software to aquire data from the USB joystick and output through serial port to MSSC to control 4 servo mortors. there is two communication protocols i can use to communicate with MSSC (pololu mode and mini SSC 11 mode). Which one would be best for this application. I am new to programming.

The Mini SSC II mode is very simple to use, so it might be better to start with, but it also limits you to basic servo operation (8-bit position resolution, full speed motion). Pololu mode is definitely more complicated to use, but has some interesting extra features like higher resolution position commands (which may or may not make a difference to your servos) and smooth speed reduction (which might come in handy for smoother motion).

I would suggest starting with the simpler Mini SSC II protocol. Once you have it working you may find that its all you need, but if you decide you want to try the Pololu protocol features it’s not a big jump from one to the other. I think you’ll find that the real hard part is getting LabView reading the Joystick, building serial strings, and talking to the com port properly. You might want to look at this post, which has a nice simple and clean example of how to run a Pololu servo controller from LabView.

The file “NumtoStr_SubVI.vi” shows you how to build Mini SSC II protocol serial strings out of byte-values. Building a string of byte-valued characters is usually a big stumbling block, as LabView tends to output data as plain-text ASCII bytes (which is NOT what your servo controller wants). If you use this sub-VI, or something like it in your setup, you can switch between the two communication protocols by editing it, without making any changes to the rest of your VIs. The file “ak servo test3.vi” makes use of the string-generating sub-VI, but also shows you how to configure and open a com port, build byte-valued strings from numeric controls and constants, and write your byte-valued strings to the com port.

I would recommend increasing the “Wait Until Next ms Multiple” delay in the servo test3 VI from 10ms to at least 20ms. The servo control signals are generated every 20ms, so with the shorter delay, the program is sending out updated serial commands twice as fast as the servo controller will actually react to them! You might want to push this up further to 50ms or even 100ms, just to keep your serial traffic down. With only a 10ms delay, and three bytes per command, this program is sending out updates almost as fast as the 9600 bps baud rate will allow. If you switch to Pololu mode, which uses longer strings, be sure to increase this delay, or the baud rate (up to 57600 bps in Pololu mode), or both.

-Adam

Hi
Thanks for fast response. I want to confirm my setup with you. I have power(+5vdc, 2A) connected to servo power pins. I also have jumper VCC= Vs installed. That way i am using one power supply to power both servos and MSSC. Is that the correct way to do this ( I didn’t want to use 2 power supplies)? Also i connected serial data that is coming from the computer to RS-232 serial input pin on MSSC.
In the manual it said that first i have to set the servo numbers. According to manual, by default, in Mini SCC mode the servo controller would respond to 0-15 servo numbers. Is that right? I only have 4 servos to control. Therefore default setting would work for me.

Hello,

The default servo numbers should work for you. However, I’m concerned about your power supply. 2A is not much for four servos, and if you have logic powered off of that, too, fluctuations in your voltage can cause the servo controller to reset or otherwise behave erratically.

- Jan

Hi
Thanks for the reply. All four servos work under no load condition. That is why i thought 2A is enough power. I am kind of confused about what you said when logic is powered off of the power supply. Do you mean i should have seperate power supply for the MSSC? I am planing to use RS-232 not logic level serial input to MSSC. Does that make difference?

Sorry I wasn’t clear. The “logic” is the electronics on the board, which runs at 5V. Whether you’re using the logic-level interface or the RS-232 interface, the logic still needs to be powered. The logic power node is called Vcc, so when you connect the Vcc=Vs jumper, you’re powering the logic through the servo supply.

Usually, the servo controller gets powered separately through its VIN pin, and there is a regulator that takes that higher voltage and puts out 5V. Fluctuations on the VIN pin don’t matter that much because the regulator is supposed to keep a nice, clean 5V output. However, if you’re using the servo supply to power the servo controller through the Vcc pin, there’s no extra protection, and that servo supply has to be clean. In general, it’s difficult to power loads like motors through a power supply, but if your supply can handle your servos, that should be fine.

- Jan

Hi Jen,
Thanks for the reply. I decided to use seperate power supply for the logic of the MSSC. There is pin on the MSSC for the reset. Is it important to have reset switch?

I depends on your situation. If you have some junk going out your serial line during power-up, it might be nice to have the reset available.

- Jan

Hi Jen,
Thanks for the reply. Can i reset MSSC by turning off the power for the logic in case if i needed to? I am getting my serial data from a computer serial port. I think serial port wont output any data untill i run the program (Labview).

Yes, power-cycling will reset the servo controller.

- Jan

Hi Jen,

For the micro serial servo controller power (Logic) is there any current limitaion? In the data sheet it says 5-16V and doesn’t say anything about current. I am using a power supply of 12V and 500mA for this purpose. Is that too much current? Thanks

Hello.

You don’t need to worry about supplying too much current. Your power supply won’t force 500 mA into the things it powers; rather, the 500 mA is the maximum amount it can supply if needed. The servo controller will draw only as much current as it needs to operate, and the logic doesn’t draw anywhere near 500 mA.

- Ben