First Place Winner ($1,500.00) - Andrew Miller (San Jose, California)
Notes from the judges:
- Very efficient use of the SX with implementation of multiple Virtual Peripherals and a FSM approach coupled with a professional PCB design.
- Robot co-processors are quite common, but this one implements so much of the design in software with minimal hardware requirements and really demonstrates the SX.
- This design is well-thought out from beginning to end.

Downloads for this project:
All files and information © 2005 Andrew G. Miller.
Project Description:
SX Creeper is a 24-Servo Output - Six Degrees of Freedom Input Stride/Gait Engine with a serial command processor and a Six Channel Radio Control receiver input, the SX-Creeper offloads the locomotion processing and servo control for six and eight legged robots, thereby freeing the robot's main processor to perform advanced sensory collection and decision-making tasks.
SX-Creeper's stride and gait profiles are stored in onboard EEPROM memory, and can be updated and tuned on the workbench via the SX-Creeper's RS-232 serial port and your PC. These tunable stride/gait profiles allow all servo positions to be updated as fast as 50 times a second giving ultra smooth servo control, and automatic ramping and rate control of servo speed and leg movement.
Although more than a just a servo controller, The SX-Creeper does accept AppMod-like serial control via the SX-Creeper's serial command and status port. A complete command parser allows intimate control of the Co-Processors functions, as well as allowing the main processor to query the Gait/Stride engine state and tilt/roll sensor status. The serial command processor also makes it possible to update the Gait and Stride profiles stored in EEPROM without special programming tools.
The robot's Gait/Stride engine can also be control with a standard PWM hobby remote control! Up to six PWM R/C control channels can control Forward/Reverse, Crab Right/Left, Stand/Sit, Pitch, Yaw, and Roll inputs to the Gait engine. These inputs can be read by the main processor, or can be used to drive the robot like a remote control toy.

The SX-Creeper also includes two vertically mounted dual-axis accelerometers. The Pitch and Roll information from these sensors are integrated into the Gait/Stride inputs, and can be queried by the main processor.
This project demonstrates of the SX microcontroller's ability to replace hardware cost and complexity, with high-speed and software flexibility. The 9600 baud UART, I²C EEPROM Control, 24 PWM Outputs, 6 PWM Inputs, and 4 Accelerometer Inputs are handled in the background, while the Ubicom SX-52 calculates the leg movements and updates the servo positions. SX-Creeper is an excellent example of how Ubicom’s SX series products let you use simple hardware, a little ingenuity, and a fast processor, to create Microcontroller Magic®.
Schematic:
Like most SX projects, there is very little in the schematic except the processor and connectors. Almost all the extra hardware has been replaced with software. The only other critical devices on the main board are the 64KB serial EEPROM and the XTAL. Download the schematic above.
One trick I used to squeeze just a little extra power from the SX-52 is a custom programmed 65,536 KHz oscillator. This odd frequency lets me use 16-bit counters to generate 1mS timing, without having to use the prescaler. The code requires changing only one line of code to switch from the custom oscillator using the normal 50MHz oscillator.
The prototype was created using an Ubicom SX Ethernet Evaluation Kit, and a hand soldered Servo/RX Interface Board. Construction is not critical, but care must be taken to avoid exceeding supply voltage limits of the processor and of the servos.
The SX-Creeper PCB consists of a main board carrying the SX-52, power supply, serial EPROM, I/O connectors, and daughter boards for the Accelerometers and serial interface. Two versions of the serial interface are provided; an RS-232 converter using a standard MAX222 circuit; and a USB version using the FTDI FT232BM supplied by Parallax.
The Accelerometer boards are attached vertically and at right angles to each other using right-angle header pins. These headers can be socketed for convenience.
Block Diagram:
Rather than a physical block diagram, when hardware has been replaced by Virtual Peripherals, a functional diagram is most useful. This diagram shows the functional interrelationships between the SX-Creeper’s Virtual Peripherals.

Source Code:
The code consists of a Main loop and several Virtual Peripherals (VPs). The VPs operate independently, and only interact inside the Main loop. A very modular and structured approach is used, with each VP. Each VP has an Interrupt Service Routine, an Initialization Routine, externally called functions, and internally called functions if any. The Main loop is structured similarly, calling the routines of the VP’s.
The code makes significant use of Assembler directives and conditional assembly to allow individual VP functionality to be added or removed if needed. This approach allowed new modules to be developed and debugged without interfering with existing functionality. Unneeded functionality can be removed without breaking the rest for the program.
A standard include file of declarations is used. It contains the standard “_bank” and “_mode” macro definitions as well a few utility macros used to prevent “RETW” and “JMP W” page boundary errors.
I keep several useful Ubicom code examples for reuse in my SX projects. These two Ubicom VPs are included into the SX-Creeper code. The first file contains the RAM declarations; the second file contains the VP code.
Writing parsing routines can be mind numbingly tedious. An excellent alternative to hand-coding is the parser code generator available at SX-List.com.
Although I made substantial changes to the generated code, the above method saved me hours of parser coding. I used example code from SX-List.com in several places in my code. Their collection of math routines always amazes me with the code thrifty implementation.
Bill of Materials:
Part Value Device Package Description
AC1 PINHD-1X4 1X04 PIN HEADER
AC2 PINHD-1X4 1X04 PIN HEADER
C1 CAP-1206 1206
C2 CAP-1206 1206
C3 CAP-1206 1206
C4 CAP-1206 1206
C5 CAP-1206 1206
C6 CAP-1206 1206
C7 CAP-1206 1206
C8 CAP-1206 1206
C9 CAP-1206 1206
C10 CAP-1206 1206
C11 CAP-1206 1206
C12 CAP-1206 1206
C13 CPOL-US153CLV-0810 153CLV-0810 POLARIZED CAPACITOR
C14 CPOL-US153CLV-0810 153CLV-0810 POLARIZED CAPACITOR
C15 C-USC1206 C1206 CAPACITOR
C16 C-USC1206 C1206 CAPACITOR
C17 C-USC1206 C1206 CAPACITOR
C18 C-USC1206 C1206 CAPACITOR
IC1 SX52BD 52QFP
IC2 24-FC512SM 24-FC512SM SO-08M Serial EEPROM 64KB
IC3 MXD2125 MXD2125 LCC-8
IC4 MXD2125 MXD2125 LCC-8
IC5 MAX232ECWE MAX232ECWE SO16L RS232 TRANSEIVER
J1 ML10 ML10 HARTING
J2 ML10 ML10 HARTING
J3 F09D F09D SUB-D
JP11 PINHD-1X1 1X01 PIN HEADER
JP12 PINHD-1X1 1X01 PIN HEADER
JP13 PINHD-1X1 1X01 PIN HEADER
JP14 PINHD-1X1 1X01 PIN HEADER
JP15 PINHD-1X1 1X01 PIN HEADER
L1A BLM41A01 L-USL4516C L4516C FERITE
L1B BLM41A01 L-USL4516C L4516C FERITE
POWER AK500/3 AK500/3 CONNECTOR
R1 R-US_R1206 R1206 RESISTOR
R2 R-US_R1206 R1206 RESISTOR
R3 R-US_M1206 M1206 RESISTOR
R4 R-US_M1206 M1206 RESISTOR
R5 R-EU_R1206 R1206 RESISTOR
R6 R-EU_R1206 R1206 RESISTOR
RC1-2 PINHD-2X3 2X03 PIN HEADER
RC3-4 PINHD-2X3 2X03 PIN HEADER
RC5-6 PINHD-2X3 2X03 PIN HEADER
S1 10-XX B3F-10XX OMRON SWITCH
SV01-02 PINHD-2X3 2X03 PIN HEADER
SV2 MA04-1 MA04-1 PIN HEADER
SV03-04 PINHD-2X3 2X03 PIN HEADER
SV4 MA04-1 MA04-1 PIN HEADER
SV05-06 PINHD-2X3 2X03 PIN HEADER
SV07-08 PINHD-2X3 2X03 PIN HEADER
SV09-10 PINHD-2X3 2X03 PIN HEADER
SV11-12 PINHD-2X3 2X03 PIN HEADER
SV13-14 PINHD-2X3 2X03 PIN HEADER
SV15-16 PINHD-2X3 2X03 PIN HEADER
SV17-18 PINHD-2X3 2X03 PIN HEADER
SV19-20 PINHD-2X3 2X03 PIN HEADER
SV21-22 PINHD-2X3 2X03 PIN HEADER
SV23-24 PINHD-2X3 2X03 PIN HEADER
VR1 7805DT 7805DT TO252 Positive VOLTAGE REGULATOR
X1A 65536KHz CSX750F CSX750F
X1B 50MHz MURCR-SMD MUR-SMD
Note that there are 4 Ubicom SX processors on this robot! (SX-Creeper Locomotion Co-processor, the Parallax Serial Line Follower hacked to include whisker wires, the author’s prototype Scanning Ultrasonic Range Finder built on a Parallax SX-Tech board, and the BASIC Stamp Stamp SX main controller.)