Controlling an Arm with the Bot Board (Basic Stamp 2) and the SSC-32

Last modified by Eric Nantel on 2026/04/06 14:32

Controlling an Arm with the Bot Board (Basic Stamp 2) and the SSC-32

Make the Connection

The SSC-32 includes a short two-conductor cable assembly. The black wire goes to ground and the yellow wire carries the signal. The .1" spaced end connects to the SSC-32 at the pins marked RX and ground — remove any DB9 enable jumpers if present. Yellow goes to RX, black to ground.

The .2" spaced end connects to Bot Board I/O pin 15. The black wire goes toward the outside edge of the board; the yellow wire goes toward the IC.

These examples are for a BS2, BS2-E, or stamps with similar timing. The 6 in the serout command specifies non-inverted, 8 data bits, no parity, 38400 baud. All serout commands must be a single continuous line — remove any line breaks if copying from this page.

Figure 1 — Bot Board to SSC-32 serial connection.
Enabling the Servos

The SSC-32 will not output servo pulses until it receives a valid command. The code below enables channels 10 through 15, sending all servos to mid-position (1500µs). Later you can substitute the 1500 values with a desired starting position to prevent the arm from jerking on startup.

serout 15,6,["#10 P1500 #11 P1500 #12 P1500 #13 P1500 #14 P1500 #15 P1500",13] start: goto start 'loop
Move the Arm Smoothly

This program moves the arm from its initial position to a new position, then to another, cycling back and forth. Each move takes 2 seconds to complete using the T2000 time parameter. Replace the servo values with the actual positions you need.

serout 15,6,["#10 P1500 #11 P1500 #12 P1500 #13 P1500 #14 P1500 #15 P1500",13] start: serout 15,6,["#10 P1400 #11 P1400 #12 P1400 #13 P1400 #14 P1400 #15 P1400 T2000",13] pause 2000 serout 15,6,["#10 P1600 #11 P1600 #12 P1600 #13 P1600 #14 P1600 #15 P1600 T2000",13] pause 2000 goto start 'repeat
Code Specific to the Arm

Using variables and gosub makes the code easier to read and maintain. This program does the same as the previous one, but each joint is referenced by name. Only the initial serout still uses raw channel numbers.

base var word 'Base rotate shld var word 'Shoulder pivot elbo var word 'Elbow pivot wrst var word 'Wrist pivot grip var word 'Gripper open/close grpr var word 'Gripper rotate (L6 only) ttm var word 'Time to complete move (ms) serout 15,6,["#10 P1500 #11 P1500 #12 P1500 #13 P1500 #14 P1500 #15 P1500",13] start: 'first move... base=1400: shld=1400: elbo=1400: wrst=1400: grip=1400: grpr=1400: ttm=2000 gosub send_data 'second move... base=1600: shld=1600: elbo=1600: wrst=1600: grip=1600: grpr=1600: ttm=2000 gosub send_data 'add more moves here... goto start send_data: serout 15,6,["#10P", DEC base, "#11P", DEC shld, "#12P", DEC elbo, "#13P", DEC wrst, "#14P", DEC grip, "#15P", DEC grpr, "T", DEC ttm, 13] pause ttm return

In Conclusion

You can now control Lynxmotion arms easily and elegantly from a Basic Stamp 2 / SSC-32. More content will be added in the future.

Happy Roboting,
Jim Frye

Tags:
Created by Eric Nantel on 2024/07/03 09:21
Copyright RobotShop 2018