Serial Servo Controller

 

 

Jump to:

Circuit Diagram

Firmware

Software

Video

Help

 

What is it?

 

The serial servo controller, or SSC, is my design for interfacing hobby servos with a computer using RS232 communications (USB - serial adapters should also work, but untested as of yet). The design is based around a PIC microcontroller running an interrupt based code. The RS232 to TTL serial communications are handled by a MAX232 convertor IC.

 

The controller can be used to, test servos, control robotics projects, remote surveillance and anything else you can think of!

 

Upto 8 Individual Servo Channels are currently supported.

 

Examples:

 

- Walking robots, arm/head actuation

 

Project "Max" uses 6 servos connected to the SSC

 

- Remote camera movement

 

- Astronomical Telescope remote control as Pan/Tilt

 

- Remote control over IP! It's possible to have the program running on a host computer and connectting to that computer via the Internet or Lan and use "Remote Desktop" to control the SSC through Servo Commander or Olly's Servo Controller. This has been tested by me using a palmtop running pocket pc 2003se connected remotely to my computer which is running the program (below), controlling the SSC! It would be possible to control the SSC from anywhere in the world using this system.

 

 

Pocket PC 2003 connected remotely to my computer running OSC and SSC hardware

 

 

Pocket PC showing desktop area of OSC program, sliders can be moved by using the stylus

 

 

Technical Specs :

 

- The SSC's update speed is 20ms (50hz pulse repetition for standard servos). This means that every channel connected to the SSC is updated every 20ms. The servo control timing is between 1 and 2ms in 254 points, or 4us per inc/dec of servo rotation.

 

 

Controller circuit diagram:

 

This is the main part of the SSC. It can be built on Stripboard or PCB, either one it's up to you!

 

 

Click to enlarge

 

Click to enlarge (do not make pcb from this, use version in zip file)

 

PCB Files:

 

File formats are for Easy PC 7 and AutoCAD (and others). High resolution JPG's are also provided.

 

PCB version 1.3 - Fixed major problem with pcb and DSUB 9 socket, scaled images so that they can be printed directly out and replaced 12V regulator with 2x 5V regs.

 

A revised PCB picture can be found HERE (use this version instead of the original pcb below due to an error in the layout of the 9 Pin D Sub, includes pin functions)

 

Download original pcb Zipped files HERE (this version includes the old 9 pin D sub PCB files, if you have problems obtaining the old style, please adapt the PCB files using the above revised image as required)

 

The copyright text is not to be removed from these files.

 

 

Parts list for schematic diagram (PCB is labelled different, use whats stated in diagrams):

 

(Main Parts)

 

- 1x MAX232N IC (available from RS, CPC, Farnell) or Ebay (Cheaper)

 

- 1x PIC16F627,628 or 84, code supplied in the firmware section is pre-assembled and ready to be burnt to the target micro.

 

- 1x DSub 9 Pin serial connector (scavenge from an old serial mouse if you can't get one)

 

- 18 Pin DIL socket (you don't have to, but it's easier)

 

- 4Mhz Crystal (should be xtal and not rc)

 

 

(Other Parts)

 

- 4x 1uF Electrolytic (anything 12V and above)

 

- 2x 330uF Electrolytic (anything 12V and above)

 

- 2x 100nF ceramic caps

 

- 2x 18pF ceramic

 

- 1x 1000uF Electrolytic (or larger, atleast 5V)

 

- 2x LM7805 5v 3A-5A Regulator

 

- 2x 1K resistor

 

- 1x 100K resistor

 

- 1x Red LED

 

-1x Green LED

 

- PCB headers for Servo connections

 

 

(Additional Parts)

 

- 12V-18V Power Supply, must be capable of a least 3 Amp!!

 

- Heatsinks for regulators, they get very hot with multiple servos attached.

 

- Serial 9 pin extension cable (optional but probably needed)

 

Cost without additional parts: ~£5

 

 

Construction:

 

- Gather the parts

 

- Study the diagram and ask on the Forum if you don't understand anything!

 

- Build the circuit on your chosen medium, take your time and be careful with the contruction

 

- Insert the PIC microcontroller into your programmer (I personally use the flawless Veleman PIC programmer K8048 with ICSP), Load the HEX into your programming software and program the PIC

 

- Insert the PIC into your circuit

 

- Take a break!

 

- Power up the circuit, with current limitter set to on, on your power supply if possible. Make sure there are no problems (current draw with no servos should be under 100mA).

 

- Connect the SSC to your computer and either use the free Servo Commander software or Olly's Servo Controller software to experiment with your new Servo Controller.

 

 

Firmware for the SSC:

 

The firmware for the microcontroller is pre-assembled for the PIC16F627,628,628a and 84. Other's are possible, email me to let me know.

 

Download HEX file here:

 

SSC Firmware v1.0 for PIC16F627

 

SSC Firmware v1.0 for PIC16F628

 

SSC Firmware v1.0 for PIC16F628A

 

SSC Firmware v1.0 for PIC16F84

 

Schematic diagram is still the same for all PICs listed above.

 

 

 

PC Interface Software:

 

Olly's Servo Controller:

 

Current Version: v1.20

Changes since v1.00:

-fixed recalling profiles not being loaded properly

-added Draw Pad feature, small screen form fix and graphical layout

-loop function added to recorded servo motion playback

-Solved a problem with the servo reverse function and implemented some minor changes

-added speech output function, positions of servos can be spoken as angle or number

-added servo range limiting, servos can be restricted to only move within a certain range

- Joystick buttons can now be defined to either playback a pre recorded movements file or move a servo to a desired position

- Servo timer functions and program looks have been altered to be more efficient

- Added webcam function, OSC Camera

 

Price: Free!!!!

 

I have recently made this program free for private use, if you require a version for corporate use, please contact me.

 

This program has taken a long time to contruct, it is far more complex than the Servo Commander version (with well over 10000 lines of code!). I will be regularly updating this program with new features. If you have any suggestions for additional functions, please email me.

 

Features:

 

- Easy to use slider controls

 

- Servo center adjustments

 

- Servo channel reversing

 

- Joystick Control over 1 to 8 channels simultaneously

 

- Joystick button control over servo positions or playback a pre recorded movements files

 

- Save/Load profiles

 

- Servo movement recorder

 

- Servo movement playback

 

- MiniMode for use with smaller screen sizes (eg below 1280x1024) such as laptops.

 

- Servo reaction speed adjustment (allows slow, delicate servo movement)

 

- Drawing Pad to control 2 axis simultaneously, useful for servo movements without joystick and with Remote Desktop Terminal Service.

 

- Servo Range Limiting, limit the maximum and minium angles of the servo outputs

 

- Speech! Servo angles/numbers and other functions can be anounced as the user alters the values. (SAPI 5.1+ engine must be installed to use this)

 

NEW! - OSC Camera and contol interface, Webcam or WMI compliant capture device input required. Keyboard "WSAD" control over servo axis.

 

 

Screenshots:

 

Normal Mode

Mini Mode

 

 

 

 

 

"DrawPad" mode

Control your servo axis by simply mouse dragging a virtual joystick

 

 

OSC Camera

Control your servos as you view the live webcam feed! Useful for animatronics or remote viewing of the servo effected output.

 

 

 

Video:

 

Or download below

 

Olly's Servo Controller Software Demo

DivX 53Mb

 

Download the self install file:

 

 

Olly's Servo Controller v.1.20 - NEW!!!! 20/12/2010

 

Olly's Servo Controller v.1.10 (Previous version incase of problems)

 

---------------

 

 

Servo Commander:

 

Servo Commander is a simple program with basic functions to allow you to test the function of the SSC. The interface has easy to use slides to adjust the position of each servo outputs individually. The software is written in Visual Basic 6 and will run on most Windows computers.

 

Screenshots:

 

 

Features:

 

- Smaller form size for small desktop resolutions (800x600)

 

- Easy and simple to use slider control

 

- Servo center adjustments

 

- Servo channel reverses

 

Download the self install file:

 

Servo Commander v.1.0

 

 

Differences between Servo Commander and Olly's Servo Controller:

 

- Servo Commander includes:

 

- Slider Servo Control

 

- Servo Centering adjustment

 

- Save Current Servo Outputs to Text file

 

- Additional featues in Olly's Servo Controller:

 

- Joystick Control

 

- Save/Load profiles

 

- Servo movement recorder

 

- Servo movement playback

 

- Servo reaction speed adjustment

 

 

Requirements for Servo Commander ad Olly's Servo Controller:

 

- Any Microsoft Windows (95-Vista) running computer with a free Serial Port (or USB to Serial adapter).

 

- The SSC hardware, circuit schematics and firmware provided above

 

- VB6 Runtime is included in the install programs

 

- Olly's Servo Controller has been designed in 1280x1024 resolution. Please make sure that your computer monitor runs at or above this resolution to display the program properly.

 

 

Help:

 

FAQ:

 

- When moving many servos, the servo outputs stop responding.

 

--- This is caused by a drop-out in power supply, the microcontroller resets itself and loses the current servo commands. Your power supply probably cannot supply enough current to the SSC. Remember, servos draw a lot of power when moving (upto 3A each!). Make sure your power supply is atleast 3A current capable, or do not move all the servos at once.

 

- Profile loads and servo outputs do not correspond when loaded.

 

--- Please enable serial output and enable servo channels before loading profiles, as the load cannot send the configuration data to the controller if it is not enabled.

 

- Other program problems?

 

---Email me for help or

 

More assistance with this project can be discussed on the Forum.

 

Support this software development:

 

It takes alot of time, effort and money to develop this software so that it can be made freely available for people to use, so if you would like to support further developments and improve this project, please spare a few quid!

 

 

 

 

 

 

Please do not reproduce anything contained within my website, as it maybe hazardous to your health unless you fully understand what you are doing.

I cannot be held responsible. This website is copyright.

© Oliver Hunt 2006-2008