Servo Kit Assembly
d. bodnar 4-7-08
New!
Click here for software modifications!
The following parts are needed to assemble the servo controller.
- Two potentiometers (top left)
- circuit board
- 14 pin socket - even though we are likely to use an 8 pin device a 14
pin PIC or PICAXE can be used
- capacitor -.1 mf - 3 mf tantalum (right of board - may vary from photo)
- 7805 voltage regulator (3 pin device right of cap)
- red power LED
- 510 ohm resistor (top one - blue body)
- 2 @ 10 K resistor (brown-black-orange)
- 22 K resistor (red-red-orange)
- 2 @ two pin header
- 2 @ three pin header
- wire for power connection (not shown here)
- PICAXE 08M (not shown here)

Step 1: Assemble the power supply.
- red and black wires to + and - contacts as shown
- capacitor - longer lead "+" to left and shorter lead to hole that goes
to black power lead - note that some caps that are supplied with the kit
have equal length leads - the positive terminal is marked with a + sign.
- 7805 - make sure it faces as shown
- 510 ohm resistor
- red LED - longer lead (positive) to left as shown - flat spot (minus)
goes right

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:
- Insert the socket. Make sure the end with the round notch cut in
it goes to the right as shown.
- Insert the three pin programming header
- Insert the two 10 K resistors and the 22 K as shown. The 22 K is
between the two 10 Ks
- Solder - check for bridges

Apply power again and make sure the LED still works.
Step 4:
- Insert and solder the trigger and sound headers

Step 5:
- Insert and solder the two pots

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:
- Insert and solder the servo connection header
- Carefully insert the PICAXE processor. The notch in the chip has
to go at the same end as the notch in the socket. In this photo the
notch goes to the left.

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:
- Insert the servo plug as shown. The black wire must go to the
left.

- Set the two pots as shown. The "Start" pot on the left goes all
the way counter clockwise and the "Range" pot on the right goes all the way
clockwise.

- Apply power and short out the two Trigger pins (upper right)
- The servo should go from one extreme of its movement to the other,
approximately 180 degrees of rotation.
- Adjust the pots as below and you should see a change to about 90 degrees
of movement
- Adjusting the "Start" pot will change the starting point but the range
will stay at 90 degrees
- Adjusting the "Range" pot will change how far the servo goes from the
start position.

- Note that there are positions where the servo will not move as shown
below.

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.
.JPG)

| 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
|