Mini servo help
Wildatheart
Posts: 195
I am using a HiTech servo HS 55 (mini servo) and am trying to drive it with a BS1.· I have 50 feet of control cable between the BS1 and the servo.
The following program does move the servo horn to a very minor extent but does not provide·the required·motion.
I do not need to "hold position" beyond that of where the servo is supposed to stop or start.
' {$STAMP BS1}
' {$PBASIC 1.0}
SYMBOL counter· = B0
INPUT 4
INPUT 1
INPUT 2
INPUT 3
OUTPUT 5
HIGH 5
OUTPUT 6
HIGH 6
OUTPUT 7
HIGH 7
Main:
· IF PIN2 = 1 THEN Camera_On
·' IF PIN1 = 1 THEN Zoom_Out
·' IF PIN4 = 1 THEN Still_Shot
·' IF PIN3 = 1 THEN Zoom_In
GOTO Main
Camera_On:
DEBUG "camera On"
FOR counter = 1 TO 20
PULSOUT 7, 120
PAUSE 200
NEXT
FOR counter = 1 TO 200
PULSOUT 7, 10
PAUSE 200
NEXT
LOW 7
GOTO Main
'Zoom_Out:
'DEBUG "Zoom Out"
'GOTO Main
'Still_Shot:
'DEBUG "Still shot"
'GOTO Main
'Zoom_In:
'DEBUG "Zoom In"
'GOTO Main
Does anyone have suggestions as to why the servo motion is so limited?
The specifications for the HS 55 can be found at http://www.hitecrcd.com/servos/show?name=HS-55
The following program does move the servo horn to a very minor extent but does not provide·the required·motion.
I do not need to "hold position" beyond that of where the servo is supposed to stop or start.
' {$STAMP BS1}
' {$PBASIC 1.0}
SYMBOL counter· = B0
INPUT 4
INPUT 1
INPUT 2
INPUT 3
OUTPUT 5
HIGH 5
OUTPUT 6
HIGH 6
OUTPUT 7
HIGH 7
Main:
· IF PIN2 = 1 THEN Camera_On
·' IF PIN1 = 1 THEN Zoom_Out
·' IF PIN4 = 1 THEN Still_Shot
·' IF PIN3 = 1 THEN Zoom_In
GOTO Main
Camera_On:
DEBUG "camera On"
FOR counter = 1 TO 20
PULSOUT 7, 120
PAUSE 200
NEXT
FOR counter = 1 TO 200
PULSOUT 7, 10
PAUSE 200
NEXT
LOW 7
GOTO Main
'Zoom_Out:
'DEBUG "Zoom Out"
'GOTO Main
'Still_Shot:
'DEBUG "Still shot"
'GOTO Main
'Zoom_In:
'DEBUG "Zoom In"
'GOTO Main
Does anyone have suggestions as to why the servo motion is so limited?
The specifications for the HS 55 can be found at http://www.hitecrcd.com/servos/show?name=HS-55
Comments
Try a PAUSE 20 instead of a PAUSE 200.
Try a PULSOUT 7,100 for one end of the range and a PULSOUT 7,200 for the other end of the servo range. If it looks like there should be wider motion, try as low as PULSOUT 7,50 and as high as PULSOUT 7,250.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tia'Shar Manetheren