This is the Revision A version of the Servo4 Module. The status of this project is that it has been replaced by the revision B revision.

Servo4 Module (Revision A)

Table of Contents

This document is also available as a PDF document.

1. Introduction

The Servo4 module allows for the control of up to 4 hobby grade servos.

A picture of a Servo4-A Module is shown below:
Servo4-A Module Picture

2. Programming

The Servo4 module can independently control up to 4 servos. Each servo has 1) an enable bit and 2) a current position. The position is represented as an 8-bit number. Some experimentation is needed to determine how the 8-bit numbers correspond to actual servo positions. All servos are initialized to have the enable flags off.

The Servo4 commands are summarized in the table below:

.
Command Send/
Receive
Byte Value Discussion
7 6 5 4 3 2 1 0
Set High Send 0 0 h h h h s s Set high order 4 bits of servo ss to hhhh and set the remaining 4 low order bits to zero.
Set Low Send 0 1 l l l l s s Set the low order 4 bits of servo ss position to llll.
Increment Send 1 0 0 i i i s s Add iii to the position of servo ss.
Decrement Send 1 0 1 d d d s s Subtract ddd from the position of servo ss.
Set Position/Enable Send 1 1 0 0 0 e s s Select servo ss and set its position to ppppppp and enable flag to e.
Send p p p p p p p p
Set Enable Flag Send 1 1 0 0 1 e s s Select servo ss and set its enable flag to e.
Read Position Send 1 1 0 1 0 0 s s Return the current position pppppppp for servo ss.
Receive p p p p p p p p
Read Enable Send 1 1 0 1 0 1 s s Return the enable bit e for servo ss.
Receive 0 0 0 0 0 0 0 e
Read Enables Send 1 1 0 1 1 0 0 0 Return the enable flags eeee for all four servos.
Receive 0 0 0 0 e e e e
Set Enables Send 1 1 0 1 1 0 0 1 Set enable flags for all four servos to eeee.
Send 0 0 0 0 e e e e
Shared Commands Send 1 1 1 1 1 c c c Execute shared command ccc.
The Servo4 Module does not know the minimum and maximum extent for each servo. This has to be determined by experimentation.

3. Hardware

The hardware consists of a circuit schematic and a printed circuit board.

3.1 Circuit Schematic

The schematic for the Servo4 Module is shown below:

Servo4 Schematic

The parts list kept in a separate file -- servo4.ptl.

3.2 Printed Circuit Board

The printed circuit board files are listed below:

servo4_back.png
The solder side layer is shown below:
servo4_front.png
The component side layer is shown below:
servo4_artwork.png
The artwork layer is shown below
servo4.gbl
The RS-274X "Gerber" back (solder side) layer.
servo4.gtl
The RS-274X "Gerber" top (component side) layer.
servo4.gal
The RS-274X "Gerber" artwork layer.
servo4.drl
The "Excellon" NC drill file.
servo4.tol
The "Excellon" tool rack file.

4. Software

The Servo4 software is available as one of:

servo4.ucl
The µCL source file.
servo4.asm
The resulting human readable PIC assembly file.
servo4.lst
The resulting human readable PIC listing file.
servo4.hex
The resulting Intel® Hex file that can be fed into a PIC12C5xx programmer.

5. Issues


Copyright (c) 2000-2004 by Wayne C. Gramlich. All rights reserved.