loading
There are two ways through which you can control servos using an SSC-32 servo controller. You can either do it directly from the lynx SSC-32 Terminal or via serial commands sent from an arduino board. Here, we are going to look at how to control servos using an SSC-32 and an arduino board.

Step 1: Connecting SSC-32 to Arduino Uno

In order to control the SSC-32 via arduino, you need to know how to connect the two boards first. In my case i am going to be controlling the SSC-32 via an arduino uno. Therefore, i should connect the transmitting pin (TX) of the arduino uno to the receiving pin (RX) of the SSC-32 and ground (GND) pins of the two boards as show in the diagrams.

In this case, the arduino sends serial commands to the SSC-32 servo controller, which in turn controls the servos. After successfully connecting and the arduino to theSSC-32 and powering the setup you can go ahead and write your code.

Step 2: Coding

The first thing you need to understand before coding is the way servo motors are controlled using the SSC-32 servo controller. Most servo motors rotate 180 degrees. In the SSC-32 programs, the position of the servo motors is not described in degrees as is in arduino. Instead it is referred to in terms of a number. The initial position (0 degrees) of the servo is assigned the position 500 while the furthest position which corresponds to 180 degrees is assigned the value 2500.

A typical line of code for the SSC-32 servo controller would be: #15 P1500 T500
  • # represents the pin number on the SSC-32 that the servo is connected to
  • P represents the position that the servo motor should rotate to
  • T represents the time that the servo should take to rotate to the desired position

Therefore, that line of code tells the servo connected to pin 15 to rotate to position 1500 in 500 milliseconds The commands are sent from the arduino board to the SSC-32 in a serial format.

Here is how you should code on the arduino IDE.
Serial.println(“#15 P1500 T500”);

This line of code sends the text #15 P1500 T500 to the SSC-32 servo controller, which is then decoded and causes the servo in question to move to the desired position. You can check this example code to understand more.

Step 3: Conclusion

For the code to work, you need to set the SSC-32 baud rate to 9600. Moreover, for some servos, the final position can be less than 2500. Therefore, if you notice that your servo motor is twitching every time it reaches its final position, reduce the final position to 2400 or 2300. Meanwhile you can learn more about the SSC-32 servo controller in my other posts.
<p>is this programming procedure is same for Bluetooth + USB 16 Servo Controller</p><p>[RKI-1005 &amp; RKI-1205]??</p>
<p>sup. ive just built a hexapod with 3 DOF. with this code work as a building block?</p><div>1<p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p>15</p><p>16</p><p>17</p><p>18</p><p>19</p></div><div>voidsetup()//initializing serial communication baud rate<p>{</p><p>Serial.begin(9600);//sets the baud rate at 9600 to match the one set on the SSC-32 board</p><p>}</p><p>voidloop()</p><p>{</p><p> Serial.println(&ldquo;#1 P500 T1000&rdquo;) //turns the servo to the initial position in 1 second</p><p> delay(1000);//delay for 1 second</p><p> Serial.println(&ldquo;#1 P2500 T1000&rdquo;) //turns the servo to the final position in 1 second</p><p>delay(1000);//delay for 1 second</p></div>
<p>This code only moves the servo connected to pin 1 on the SSC-32 from the initial position to the final position. You have to send commands to the other motors for the hexapod to move</p>
<p>thanks.. one more thing bro.. can i use any torobot rios or any other servo board terminal?</p>

About This Instructable

24,220views

61favorites

License:

Bio: I am an electrical engineer and an Arduino and electronics enthusiasts. I believe working with electricity should be fun as well as beneficial to engineers ... More »
More by yhtomitsy:RFduino - Sending and Receiving Data Via BLE  Arduino redback simple server Configuring xBee in API mode 
Add instructable to: