Servo Kit Assembly
d. bodnar 4-7-08

New!  Click here for software modifications!

The following parts are needed to assemble the servo controller.

Step 1:  Assemble the power supply.

Solder carefully watching out for solder bridges - examine  frequently with a magnifying glass.

After soldering apply power (8-12 volts DC) to the red and black wires - the red LED should light.  If it does not check for proper parts placement and shorts.

Step 3:

Apply power again and make sure the LED still works.

Step 4:

Step 5:

Check the power LED once more.  If you have a volt meter confirm that pin 1 on the socket (upper right in the photo above) has 5 volts on it and that lower right pin on the socket is ground.  Disconnect power when done.

Step 6:

Briefly apply power and confirm that the LED lights properly.

This completes assembly - note that there are a number of unused connections on this board. 

Initial Testing:

The sound pin (the one closest to the "d" in "Sound") goes "high" for a moment when the trigger is closed.  This connection can be used to start a sound card or to light an LED.  The other pin in the sound pair goes to ground.

Quick Connectors for Headers

You can salvage connectors from an old PC that will fit right onto the 2 and 3 pin headers on the circuit board.  You can also cut up an IC socket into sections that will fit onto the pins.  Wires can then be soldered to the socket pins.

Program Modifications

Some users of the servo board have requested software modifications.  Some variations on the original program are shown below with their characteristics.

Original program.  One button push starts a complete cycle of servo motion from one extreme to the other and back to the original position with a 1.5 second pause between.

SYMBOL CCWMax = 200 '225 manual recommended max
SYMBOL CWMin = 30 '75 manual recommended min
SYMBOL RangeMax = 170
SYMBOL Temp = b0
SYMBOL Range = w5 'max to min range
SYMBOL CCW = w6 'where to start rotation
SYMBOL CW = b3
SYMBOL Temp2 = b5
SYMBOL Delay = 15
SYMBOL Audio = 0
SYMBOL ServoPin = 4
SYMBOL Trigger = pin3

Start:
LOW ServoPin 'relax servo
IF Trigger = 0 THEN Start ' wait till button pressed

HIGH Audio
GOSUB GetPots:
FOR Temp = CCW TO CW Step -1
  SERVO ServoPin, Temp
  PAUSE Delay
NEXT Temp

LOW Audio
pause 1500

GOSUB GetPots
FOR Temp=CW TO CCW Step 1
  SERVO ServoPin, Temp
  PAUSE Delay
NEXT Temp
PAUSE 1500
GOTO Start:

GetPots:
READADC10 2, Range
Range=1023-Range
Range=Range/6
READADC10 1, CCW
CCW=CCW/6 + 30
Temp2=Range+CWMin
IF CCW <Temp2 THEN Skipover
CW=CCW - Range MIN CWMin
GOTO Skipover2

Skipover:
CW = CWMIN

Skipover2:
RETURN

 
Modification #1
Objective - in stead of the servo going starting from a button push and going from one extreme of its movement, pausing for a few seconds and returning to its original position two button pushes are needed.  The first push has the servo move to its one extreme where it stays till the button is pressed again.
SYMBOL CCWMax = 200 '225 manual recommended max
SYMBOL CWMin = 30 '75 manual recommended min
SYMBOL RangeMax = 170
SYMBOL Temp = b0
SYMBOL Range = w5 'max to min range
SYMBOL CCW = w6 'where to start rotation
SYMBOL CW = b3
SYMBOL Temp2 = b5
SYMBOL Delay = 15
SYMBOL Audio = 0
SYMBOL ServoPin = 4
SYMBOL Trigger = pin3

Start:
LOW ServoPin 'relax servo
IF Trigger = 0 THEN Start ' wait till button pressed

HIGH Audio
GOSUB GetPots:
FOR Temp = CCW TO CW Step -1
  SERVO ServoPin, Temp
  PAUSE Delay
NEXT Temp

LOW Audio
StayHere:
IF Trigger = 0 then StayHere:

GOSUB GetPots
FOR Temp=CW TO CCW Step 1
  SERVO ServoPin, Temp
  PAUSE Delay
NEXT Temp
GOTO Start:

GetPots:
READADC10 2, Range
Range=1023-Range
Range=Range/6
READADC10 1, CCW
CCW=CCW/6 + 30
Temp2=Range+CWMin
IF CCW <Temp2 THEN Skipover
CW=CCW - Range MIN CWMin
GOTO Skipover2

Skipover:
CW = CWMIN

Skipover2:
RETURN

 
Program - revised to use SERVOPOS command - may reduce "chatter"

SYMBOL CCWMax = 200 '225 manual recommended max
SYMBOL CWMin = 30 '75 manual recommended min
SYMBOL RangeMax = 170
SYMBOL Temp = b0
SYMBOL Range = w5 'max to min range
SYMBOL CCW = w6 'where to start rotation
SYMBOL CW = b3
SYMBOL Temp2 = b5
SYMBOL Delay = 15
SYMBOL Audio = 0
SYMBOL ServoPin = 4
SYMBOL Trigger = pin3

Start:
LOW ServoPin 'relax servo
IF Trigger = 0 THEN Start ' wait till button pressed

HIGH Audio
GOSUB GetPots:
SERVO ServoPin, CCW
FOR Temp = CCW TO CW Step -1
SERVOPOS ServoPin, Temp
PAUSE Delay
NEXT Temp

LOW Audio
pause 1500

GOSUB GetPots
SERVO ServoPin, CW
FOR Temp=CW TO CCW Step 1
SERVOPOS ServoPin, Temp
PAUSE Delay
NEXT Temp
PAUSE 1500
GOTO Start:

GetPots:
READADC10 2, Range
Range=1023-Range
Range=Range/6':Range=Range*2
READADC10 1, CCW
CCW=CCW/6 + 30':CCW=CCW*2 + 30
Temp2=Range+CWMin
IF CCW <Temp2 THEN Skipover
CW=CCW - Range MIN CWMin
GOTO Skipover2

Skipover:
CW = CWMIN

Skipover2:
RETURN