Servo control
Archiver
Posts: 46,084
[font=+]Can anybody suggest some code for controling a futaba FP-S14B[/font]
presently I use this code:
x··· var··· word
for x=1 to 30 step 1
··· pulsout 0, 625· 'returns servo to ~90deg
··· pause 20
next
Is there a simpler way to do it?
presently I use this code:
x··· var··· word
for x=1 to 30 step 1
··· pulsout 0, 625· 'returns servo to ~90deg
··· pause 20
next
Is there a simpler way to do it?
Comments
my
question. I did a project with a BS-II, got interested in this stuff
and purchased a BSII-SX for a project I am doing (a squirming worm
robot with servo controlled tendons). I have 3 Hitec HS-725BB winch
servos that are supposed to turn 4 times stop to stop. 1mS is
supposed to be one extreme of travel, 1.5 is middle and 2mS is the
other extreme. The pulse refreshes every 21mS. I hooked them up to
my stamp (Pin0 to the signal wire) with a 4xAA battery pack to the
power inputs. Just to find the extremes of travel I wrote:
puls var word
tick var byte
loop:
puls = 500
gosub hit
debug "reverse", cr
puls = 1000
gosub hit
goto loop
hit:
for tick = 1 to tick
pulsout 0, puls
pause 15
next
All this does is go-stop-go-stop in one direction. The reverse debug
never appears. Does the BSII-SX have a different pulsout (meaning
not
2 microseconds*puls in my program)? Why are these servos misbehaving?
Thanks for your help!
chris
I have played with the pause (problem with refresh time?)
Put a return after your routine "hit". You're never returning from the gosub.
hit:
for tick = 1 to tick
pulsout 0, puls
pause 15
next
return
Regards,
Bruce
webmaster@r...
http://www.rentron.com
BASIC Stamp RF remote control modules.
Original Message
From: "Chris Luomanen" <luomanen@e...>
To: <basicstamps@egroups.com>
Sent: Tuesday, September 19, 2000 5:28 PM
Subject: [noparse][[/noparse]basicstamps] Servo Control
| Hi, I'm Chris Luomanen. I was wondering if any of you could answer
| my
| question. I did a project with a BS-II, got interested in this stuff
| and purchased a BSII-SX for a project I am doing (a squirming worm
| robot with servo controlled tendons). I have 3 Hitec HS-725BB winch
| servos that are supposed to turn 4 times stop to stop. 1mS is
| supposed to be one extreme of travel, 1.5 is middle and 2mS is the
| other extreme. The pulse refreshes every 21mS. I hooked them up to
| my stamp (Pin0 to the signal wire) with a 4xAA battery pack to the
| power inputs. Just to find the extremes of travel I wrote:
|
| puls var word
| tick var byte
| loop:
| puls = 500
| gosub hit
| debug "reverse", cr
| puls = 1000
| gosub hit
| goto loop
|
| hit:
| for tick = 1 to tick
| pulsout 0, puls
| pause 15
| next
|
| All this does is go-stop-go-stop in one direction. The reverse debug
| never appears. Does the BSII-SX have a different pulsout (meaning
| not
| 2 microseconds*puls in my program)? Why are these servos misbehaving?
|
| Thanks for your help!
| chris
|
| I have played with the pause (problem with refresh time?)
|
|
|
|
|
|
IE,, tick = 100..?
Bruce
Original Message
From: "Chris Luomanen" <luomanen@e...>
To: <basicstamps@egroups.com>
Sent: Tuesday, September 19, 2000 5:28 PM
Subject: [noparse][[/noparse]basicstamps] Servo Control
| Hi, I'm Chris Luomanen. I was wondering if any of you could answer
| my
| question. I did a project with a BS-II, got interested in this stuff
| and purchased a BSII-SX for a project I am doing (a squirming worm
| robot with servo controlled tendons). I have 3 Hitec HS-725BB winch
| servos that are supposed to turn 4 times stop to stop. 1mS is
| supposed to be one extreme of travel, 1.5 is middle and 2mS is the
| other extreme. The pulse refreshes every 21mS. I hooked them up to
| my stamp (Pin0 to the signal wire) with a 4xAA battery pack to the
| power inputs. Just to find the extremes of travel I wrote:
|
| puls var word
| tick var byte
| loop:
| puls = 500
| gosub hit
| debug "reverse", cr
| puls = 1000
| gosub hit
| goto loop
|
| hit:
| for tick = 1 to tick
| pulsout 0, puls
| pause 15
| next
|
| All this does is go-stop-go-stop in one direction. The reverse debug
| never appears. Does the BSII-SX have a different pulsout (meaning
| not
| 2 microseconds*puls in my program)? Why are these servos misbehaving?
|
| Thanks for your help!
| chris
|
| I have played with the pause (problem with refresh time?)
|
|
|
|
|
|
Also, I figured that there was no significant difference in the
pulsout command--because Parallax didn't send me any update with my
kit. As it turns out the BSII-SX increments pulses in .8 microsecond
chunks,not 2 microsecond chunks as in the manual.
Thanks again,
chris
--- In basicstamps@egroups.com, "Bruce" <breyno2@r...> wrote:
> P.S. You'll need to assign some value to the variable tick as well.
> IE,, tick = 100..?
>
> Bruce
>
>
>
>
Original Message
> From: "Chris Luomanen" <luomanen@e...>
> To: <basicstamps@egroups.com>
> Sent: Tuesday, September 19, 2000 5:28 PM
> Subject: [noparse][[/noparse]basicstamps] Servo Control
>
>
> | Hi, I'm Chris Luomanen. I was wondering if any of you could
answer
> | my
> | question. I did a project with a BS-II, got interested in this
stuff
> | and purchased a BSII-SX for a project I am doing (a squirming
worm
> | robot with servo controlled tendons). I have 3 Hitec HS-725BB
winch
> | servos that are supposed to turn 4 times stop to stop. 1mS is
> | supposed to be one extreme of travel, 1.5 is middle and 2mS is
the
> | other extreme. The pulse refreshes every 21mS. I hooked them up
to
> | my stamp (Pin0 to the signal wire) with a 4xAA battery pack to
the
> | power inputs. Just to find the extremes of travel I wrote:
> |
> | puls var word
> | tick var byte
> | loop:
> | puls = 500
> | gosub hit
> | debug "reverse", cr
> | puls = 1000
> | gosub hit
> | goto loop
> |
> | hit:
> | for tick = 1 to tick
> | pulsout 0, puls
> | pause 15
> | next
> |
> | All this does is go-stop-go-stop in one direction. The reverse
debug
> | never appears. Does the BSII-SX have a different pulsout (meaning
> | not
> | 2 microseconds*puls in my program)? Why are these servos
misbehaving?
> |
> | Thanks for your help!
> | chris
> |
> | I have played with the pause (problem with refresh time?)
> |
> |
> |
> |
> |
> |
Does anyone know how to reverse a servo with the "pulsout"
command? I'm using a Basic Stamp I and a Futaba servo hacked
for 360 rotation.
Thx a lot
Does anyone know how to reverse a servo with the "pulsout"
command? I'm using a Basic Stamp I and a Futaba servo hacked
for 360 rotation.
Thx a lot
Thanks for everyone who helped me. My servo works now!!
-Yu-Jia
On 30 Dec 2000, at 9:14, William Cox wrote:
> http://www.gorobotics.net/servohack.shtml
> -William
>
>
>
Original Message
> From: Yu-Jia Zhu <admin@G...>
> To: <basicstamps@egroups.com>
> Sent: Thursday, December 28, 2000 3:52 PM
> Subject: [noparse][[/noparse]basicstamps] Servo Control
>
>
> > Hi,
> > Does anyone know how to reverse a servo with the "pulsout"
> > command? I'm using a Basic Stamp I and a Futaba servo hacked
> > for 360 rotation.
> >
> > Thx a lot
> >
> >
> >
> >
>
>
>
>
>
Original Message
From: Yu-Jia Zhu <admin@G...>
To: <basicstamps@egroups.com>
Sent: Thursday, December 28, 2000 8:08 PM
Subject: [noparse][[/noparse]basicstamps] Servo Control
> Hi,
> Does anyone know how to reverse a servo with the "pulsout"
> command? I'm using a Basic Stamp I and a Futaba servo hacked
> for 360 rotation.
If your servo is properly hacked, it should not move for 1.5 ms pulses, go
in one direction for pulses greater than 1.5 ms, and the reverse direction
for pulses shorter than 1.5 ms. As you approach the minimum pulse of 1 ms
and the maximum pulse of 2 ms, the speed should increase.
Ray McArthur
-William
Original Message
From: Yu-Jia Zhu <admin@G...>
To: <basicstamps@egroups.com>
Sent: Thursday, December 28, 2000 3:52 PM
Subject: [noparse][[/noparse]basicstamps] Servo Control
> Hi,
> Does anyone know how to reverse a servo with the "pulsout"
> command? I'm using a Basic Stamp I and a Futaba servo hacked
> for 360 rotation.
>
> Thx a lot
>
>
>
>
frame.htm