Jump To Content

LearnHub




Moving Servos with a SSC-32 and an Arduino

The SSC-32 by Lynxmotion is a very popular serial servo controller. To read more about the SSC-32 be sure to look at this link.

Since it uses serial data to control servos, almost any microcontroller can communicate to it, including the Arduino.

For this example, we will be communicating to the SSC-32 with an Arduino at 9600bps.

The first step is to set the baud rate on the SSC-32. Just place a shorting block on the right hand side of the two baud rate pins. See below for a picture.



(Image from http://learnhub.com/redirect?u=http%3A%2F%2Fwww.lynxmotion.com%2Fimages%2Fhtml%2Fbuild136.htm%29


Next, you have to connect a jumper from RX on the SSC-32 to TX on the Arduino. Additionally, you have to connect a jumper from Ground (next to RX) on the SSC-32 to Ground on the Arduino. In the picture below, the yellow jumper is from RX to TX, and the grey jumper is from Ground to Ground.



(Image from http://learnhub.com/redirect?u=http%3A%2F%2Fwww.lynxmotion.com%2Fimages%2Fhtml%2Fbuild136.htm%29


There are two separate powering options that you will have to consider. The first is the power for the board, and the second is power for the servos. I highly recommend powering the board separately from the servos. For powering the board, I give the SSC-32 +5V from the Arduino. For powering the servos, I give it about 13V, which changes to about 10V under load. However, it is your choice about how you want to power it.

Now, connect a servo to the first port on the SSC-32, power up the board and the Arduino - let's try a sample program to control it!

Download this program into your Arduino:


void setup() {
Serial.begin(9600);
}

void loop() {
move(1, 2000, 100);
move(1, 1000, 100);
}

void move(int servo, int position, int time) {
Serial.print("#");
Serial.print(servo);
Serial.print(" P");
Serial.print(position);
Serial.print(" T");
Serial.println(time);
delay(time);
}


You should see your servo moving!

If you don't see it moving, try adjusting the 2000 and 1000 values. If that still does not work, check all of your connections. The RX-TX cable might have come loose, or there is not enough power for the board and/or servo, the baud rate isn't set properly, or the servo is not plugged in correctly.

Good luck, and have fun!


Please don't hesitate to post a comment or drop me an email if you have any questions.

Want ideas about things you could do with servos? Check out my site: robotgrrl.com




  1. robokid saidSat, 28 May 2011 00:40:40 -0000 ( Link )

    I set it all up as you said but it doesn’t work, could it be my power? I put the 5v and ground from the arduino to VL and the lynxmotion battery to VS1. correct? (the pwr led is on)
    “Now, connect a servo to the first port on the SSC-32” thats 0 right?
    Tank you soooooo much for this tutorial!

    Actions
    Vote
    Current Rating
    1
    Rate Up
    Rate Down
    1 Total Vote

    Post Comments

  2. robokid saidSat, 28 May 2011 00:52:26 -0000 ( Link )

    Never-mind, fixed!

    Actions
    Vote
    Current Rating
    1
    Rate Up
    Rate Down
    1 Total Vote

    Post Comments

  3. elebrun saidMon, 07 Nov 2011 20:27:17 -0000 ( Link )

    What are the changes for a digital servo instead of an analog servo?

    Actions
    Vote
    Current Rating
    1
    Rate Up
    Rate Down
    1 Total Vote

    Post Comments

Your Comment
Textile is Enabled (View Reference)