Pulsing a servo with BS2 using
Can anyone help please? The pulsout command gives a +ve pulse and sends my
> >servo one way, if that is right, can you advise please how I make it stop
> >and then go in the opposite direction?
> >
> > Thank you so much for your time.
Paul.
> >servo one way, if that is right, can you advise please how I make it stop
> >and then go in the opposite direction?
> >
> > Thank you so much for your time.
Paul.
Comments
the input pulse to a pulse that is proportional to the position of the
shaft.
The servo's I've used generate a 1500uS pulse when they are "centered". So
if you output a 1500uS pulse the servo will move to its center position (or
stop if it has been modified for continuous rotation). A longer pulse will
make it go one way and a shorter pulse will make it go the other way.
The BS2 specifies pulses in 2uS intervals, so 750uS would center it. You
usually want to send a pulse about every 20mS or so. Therefore, you might
write:
servo:
pulsout 0,750 ' assume servo is on p0
pause 20
goto servo
Now if you change the number to >750, the servo should turn in one
direction. The stopping position will depend on the number you send. If you
change the number to <750, it will move the opposite direction.
Note that on the BS1, BS2SX, etc. the pulsout command uses different units,
so the number is not 750 on these processors. Refer to the manual and divide
1500 by the number of microseconds the device uses as its base time.
Regards,
Al Williams
AWC
* Control 8 servos at once: http://www.al-williams.com/awce/pak8.htm
>
Original Message
> From: Haskew family [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=3D7iM_XZYzj6QhDQIzUQh1J29BhKsBLfXDz0yhjCl-H0Am_HR2r-zej2_QMacRmk6IOKxyZ2ou9TIOPcotiy2LI]PandL.Haskew@b...[/url
> Sent: Tuesday, January 23, 2001 5:14 AM
> To: basicstamps@egroups.com
> Subject: [noparse][[/noparse]basicstamps] Pulsing a servo with BS2 using "PULSOUT"
>
>
> Can anyone help please? The pulsout command gives a +ve pulse and sends my
> > >servo one way, if that is right, can you advise please how I
> make it stop
> > >and then go in the opposite direction?
> > >
> > > Thank you so much for
> your time.
>
> Paul.
>
>
>
>
servo. Most hobby servos have a 1.5 ms neutral. (pulsout 750) A pulsout
above 750 will drive the servo forward and a pulsout of less than 750 will
reverse. The closer to 750 the pulsout value is, the slower the servo will
travel. Go to the download section of www.parallaxinc.com and read the
boebot manual. This will answer all of your questions.
Jeff
Original Message
From: Haskew family <PandL.Haskew@b...>
To: <basicstamps@egroups.com>
Sent: Tuesday, January 23, 2001 7:13 AM
Subject: [noparse][[/noparse]basicstamps] Pulsing a servo with BS2 using "PULSOUT"
> Can anyone help please? The pulsout command gives a +ve pulse and sends my
> > >servo one way, if that is right, can you advise please how I make it
stop
> > >and then go in the opposite direction?
> > >
> > > Thank you so much for your
time.
>
> Paul.
>
>
>
>
>