BSIISX & Servos
I'm resurrecting an old thread with this question. I've got a BSIIsx and a
HiTec servo that just won't co-operate. Using the following code the servo
very slowly and weakly rotates clockwise until it reaches it's limit at
which point it just hums. By slowly I mean it takes around 30 seconds.
start:
for w1=1250 to 2500 step 25
pulsout 0,w1
pause 20
next
for w1=2500 to 1250 step 25
pulsout 0,w1
pause 20
next
goto start
Facts:
The BSIIsx stamp directive is in the file.
The yellow wire is connected to P0.
Red + 5 volts.
Black ground.
Things I've tried;
6 different servos. Including brand new ones.
Switching from 4 nicads (4.8v) to alkaline (6v)
"pulsout 0, 1875" This turns the servo clockwise as far as it will go and
then hums.
Is my stamp busted?
Are my servos trashed?
Is there any way to test the stamp? If I put debug statements in the code it
returns predictably.
--- In basicstamps@egroups.com, "Al Williams" <alw@a...> wrote:
> You are right of course. The original code was set for 10uS steps, so 200
> was 2mS. Changing to the BS2 or SX did it. So the original author was
> correct, and when I "corrected" the code, I introduced the error. Hope
that
> didn't destroy your servos beyond repair.
>
> Regards,
>
> Al Williams
> AWC
> * Control 8 servos at once: http://www.al-williams.com/awce/pak8.htm
>
>
> >
Original Message
> > From: Doug Simpson [noparse][[/noparse]mailto:veewee77@a...]
> > Sent: Monday, October 23, 2000 2:38 PM
> > To: basicstamps@egroups.com
> > Subject: RE: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> >
> >
> > Al Williams (and others)
> > It did grind the gears. But I got it figured out (I think) tell me
> > if I'm wrong in my thinking. . .
> >
> > The variable specified in b2 is a byte variable, right?
> >
> > Ok, the number is bigger than 255 which makes it out of range for a
> > number bigger than 255, right?
> >
> > So, I tried using w2 instead and POW it worked! My practical range
> > on the servo for smooth control is fron 900 all the way to 2750,
> > which all fits into the word variable w2.
> >
> > Included is the code for a servo tester that will continuously sweep
> > a servo from one side to the other at whatever rate specified by the
> > "step" value, with the pulsout set to yhe pin you want to connect the
> > servo to.
> >
> > The code follows:
> >
> > start:
> > for w1=900 to 2750 step 25
> > pulsout 4,w1
> > pause 20
> > next
> > for w1=2750 to 900 step 25
> > pulsout 4,w1
> > pause 20
> > next
> > goto start
> >
> > Hope this helps other, too!
> >
> > Thanks,
> >
> > Doug
> >
> >
> > > To: <basicstamps@egroups.com>
> > > From: "Al Williams" <alw@a...>
> > > Date: Mon, 23 Oct 2000 18:14:22 -0500
> > > Reply-to: basicstamps@egroups.com
> > > Subject: RE: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> >
> > > Well, I didn't write the original code, but it looks fine to me. Did
it
> > > grind out your gears? Otherwise, I don't know how you would
> > ruin the servos
> > > no matter what pulse widths you sent it. Maybe someone else has
> > experience
> > > with that? I have blown servos by shorting my power and ground
> > (I'm clumsy).
> > > In fact, I have one crippled BOE Bot right now because I don't
> > have any more
> > > servos.
> > >
> > > The idea is to send a pulse to the servo to position it. 1500uS should
> > > center the servo. So try this (maybe even on one of the ruined
servos?):
> > >
> > > LOW 0
> > > PULSOUT 0,XXX
> > >
> > > where XXX is whatever results in 1500uS for your type of Stamp (150
for
> > > Stamp I, 750 for Stamp II, and 1875 for the BS2SX). That should
> > center it.
> > > Then change XXX to XXX+25 and see if the servo will step a bit
> > over. Don't
> > > put any load on the servo, and it should stay put after the program
runs
> > > (although it won't)
> > >
> > > All the servos I'm aware of have a stop to keep you from going
> > too far, and
> > > the only thing I could imagine you could do would be grind
> > against the stop
> > > hard enough to strip the nylon gears? I've never seen that
> > though. Anyone
> > > else?
> > >
> > > Regards,
> > >
> > > Al Williams
> > > AWC
> > > * Connect a PS/2 keyboard to your Stamp project (or any
> > microcontroller):
> > > http://www.al-williams.com/awce/pak6.htm
> > >
> > >
> > > > > > > > > > >'PROGRAM "SRVOTST1.BAS" 10/4/00
> > > > > > > > > > >'TO TEST RC SERVOS
> > > > > > > > > > >LOW 0
> > > > > > > > > > >AGAIN:
> > > > > > > > > > >FOR B2=100 TO 200 STEP 2
> > > > > > > > > > > PULSOUT 0,B2
> > > > > > > > > > > PAUSE 15
> > > > > > > > > > >NEXT
> > > > > > > > > > >FOR B2=200 TO 100 STEP -2
> > > > > > > > > > > PULSOUT 0,B2
> > > > > > > > > > > PAUSE 15
> > > > > > > > > > > NEXT
> > > > > > > > > > >'DEBUG "AGAIN"
> > > > > > > > > > >PAUSE 1000
> > > > > > > > > > >GOTO AGAIN
> > > > > > > >
Original Message
> > > > > > > > From: Ray McArthur <rjmca@u...>
> > > > > > > > To: <basicstamps@egroups.com>
> > > > > > > > Sent: Saturday, October 21, 2000 1:38 AM
> > > > > > > > Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting
> > Servo's Correctly
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
HiTec servo that just won't co-operate. Using the following code the servo
very slowly and weakly rotates clockwise until it reaches it's limit at
which point it just hums. By slowly I mean it takes around 30 seconds.
start:
for w1=1250 to 2500 step 25
pulsout 0,w1
pause 20
next
for w1=2500 to 1250 step 25
pulsout 0,w1
pause 20
next
goto start
Facts:
The BSIIsx stamp directive is in the file.
The yellow wire is connected to P0.
Red + 5 volts.
Black ground.
Things I've tried;
6 different servos. Including brand new ones.
Switching from 4 nicads (4.8v) to alkaline (6v)
"pulsout 0, 1875" This turns the servo clockwise as far as it will go and
then hums.
Is my stamp busted?
Are my servos trashed?
Is there any way to test the stamp? If I put debug statements in the code it
returns predictably.
--- In basicstamps@egroups.com, "Al Williams" <alw@a...> wrote:
> You are right of course. The original code was set for 10uS steps, so 200
> was 2mS. Changing to the BS2 or SX did it. So the original author was
> correct, and when I "corrected" the code, I introduced the error. Hope
that
> didn't destroy your servos beyond repair.
>
> Regards,
>
> Al Williams
> AWC
> * Control 8 servos at once: http://www.al-williams.com/awce/pak8.htm
>
>
> >
Original Message
> > From: Doug Simpson [noparse][[/noparse]mailto:veewee77@a...]
> > Sent: Monday, October 23, 2000 2:38 PM
> > To: basicstamps@egroups.com
> > Subject: RE: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> >
> >
> > Al Williams (and others)
> > It did grind the gears. But I got it figured out (I think) tell me
> > if I'm wrong in my thinking. . .
> >
> > The variable specified in b2 is a byte variable, right?
> >
> > Ok, the number is bigger than 255 which makes it out of range for a
> > number bigger than 255, right?
> >
> > So, I tried using w2 instead and POW it worked! My practical range
> > on the servo for smooth control is fron 900 all the way to 2750,
> > which all fits into the word variable w2.
> >
> > Included is the code for a servo tester that will continuously sweep
> > a servo from one side to the other at whatever rate specified by the
> > "step" value, with the pulsout set to yhe pin you want to connect the
> > servo to.
> >
> > The code follows:
> >
> > start:
> > for w1=900 to 2750 step 25
> > pulsout 4,w1
> > pause 20
> > next
> > for w1=2750 to 900 step 25
> > pulsout 4,w1
> > pause 20
> > next
> > goto start
> >
> > Hope this helps other, too!
> >
> > Thanks,
> >
> > Doug
> >
> >
> > > To: <basicstamps@egroups.com>
> > > From: "Al Williams" <alw@a...>
> > > Date: Mon, 23 Oct 2000 18:14:22 -0500
> > > Reply-to: basicstamps@egroups.com
> > > Subject: RE: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> >
> > > Well, I didn't write the original code, but it looks fine to me. Did
it
> > > grind out your gears? Otherwise, I don't know how you would
> > ruin the servos
> > > no matter what pulse widths you sent it. Maybe someone else has
> > experience
> > > with that? I have blown servos by shorting my power and ground
> > (I'm clumsy).
> > > In fact, I have one crippled BOE Bot right now because I don't
> > have any more
> > > servos.
> > >
> > > The idea is to send a pulse to the servo to position it. 1500uS should
> > > center the servo. So try this (maybe even on one of the ruined
servos?):
> > >
> > > LOW 0
> > > PULSOUT 0,XXX
> > >
> > > where XXX is whatever results in 1500uS for your type of Stamp (150
for
> > > Stamp I, 750 for Stamp II, and 1875 for the BS2SX). That should
> > center it.
> > > Then change XXX to XXX+25 and see if the servo will step a bit
> > over. Don't
> > > put any load on the servo, and it should stay put after the program
runs
> > > (although it won't)
> > >
> > > All the servos I'm aware of have a stop to keep you from going
> > too far, and
> > > the only thing I could imagine you could do would be grind
> > against the stop
> > > hard enough to strip the nylon gears? I've never seen that
> > though. Anyone
> > > else?
> > >
> > > Regards,
> > >
> > > Al Williams
> > > AWC
> > > * Connect a PS/2 keyboard to your Stamp project (or any
> > microcontroller):
> > > http://www.al-williams.com/awce/pak6.htm
> > >
> > >
> > > > > > > > > > >'PROGRAM "SRVOTST1.BAS" 10/4/00
> > > > > > > > > > >'TO TEST RC SERVOS
> > > > > > > > > > >LOW 0
> > > > > > > > > > >AGAIN:
> > > > > > > > > > >FOR B2=100 TO 200 STEP 2
> > > > > > > > > > > PULSOUT 0,B2
> > > > > > > > > > > PAUSE 15
> > > > > > > > > > >NEXT
> > > > > > > > > > >FOR B2=200 TO 100 STEP -2
> > > > > > > > > > > PULSOUT 0,B2
> > > > > > > > > > > PAUSE 15
> > > > > > > > > > > NEXT
> > > > > > > > > > >'DEBUG "AGAIN"
> > > > > > > > > > >PAUSE 1000
> > > > > > > > > > >GOTO AGAIN
> > > > > > > >
Original Message
> > > > > > > > From: Ray McArthur <rjmca@u...>
> > > > > > > > To: <basicstamps@egroups.com>
> > > > > > > > Sent: Saturday, October 21, 2000 1:38 AM
> > > > > > > > Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting
> > Servo's Correctly
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
Comments
servos power supply ground?
-William
Original Message
From: Sean Cairns <sean.cairns@m...>
To: <basicstamps@egroups.com>
Sent: Thursday, November 30, 2000 1:11 PM
Subject: [noparse][[/noparse]basicstamps] BSIISX & Servos
> I'm resurrecting an old thread with this question. I've got a BSIIsx and a
> HiTec servo that just won't co-operate. Using the following code the servo
> very slowly and weakly rotates clockwise until it reaches it's limit at
> which point it just hums. By slowly I mean it takes around 30 seconds.
>
> start:
> for w1=1250 to 2500 step 25
> pulsout 0,w1
> pause 20
> next
> for w1=2500 to 1250 step 25
> pulsout 0,w1
> pause 20
> next
> goto start
>
> Facts:
> The BSIIsx stamp directive is in the file.
> The yellow wire is connected to P0.
> Red + 5 volts.
> Black ground.
>
> Things I've tried;
> 6 different servos. Including brand new ones.
> Switching from 4 nicads (4.8v) to alkaline (6v)
> "pulsout 0, 1875" This turns the servo clockwise as far as it will go and
> then hums.
>
> Is my stamp busted?
>
> Are my servos trashed?
>
> Is there any way to test the stamp? If I put debug statements in the code
it
> returns predictably.
>
> --- In basicstamps@egroups.com, "Al Williams" <alw@a...> wrote:
> > You are right of course. The original code was set for 10uS steps, so
200
> > was 2mS. Changing to the BS2 or SX did it. So the original author was
> > correct, and when I "corrected" the code, I introduced the error. Hope
> that
> > didn't destroy your servos beyond repair.
> >
> > Regards,
> >
> > Al Williams
> > AWC
> > * Control 8 servos at once: http://www.al-williams.com/awce/pak8.htm
> >
> >
> > >
Original Message
> > > From: Doug Simpson [noparse][[/noparse]mailto:veewee77@a...]
> > > Sent: Monday, October 23, 2000 2:38 PM
> > > To: basicstamps@egroups.com
> > > Subject: RE: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's Correctly
> > >
> > >
> > > Al Williams (and others)
> > > It did grind the gears. But I got it figured out (I think) tell me
> > > if I'm wrong in my thinking. . .
> > >
> > > The variable specified in b2 is a byte variable, right?
> > >
> > > Ok, the number is bigger than 255 which makes it out of range for a
> > > number bigger than 255, right?
> > >
> > > So, I tried using w2 instead and POW it worked! My practical range
> > > on the servo for smooth control is fron 900 all the way to 2750,
> > > which all fits into the word variable w2.
> > >
> > > Included is the code for a servo tester that will continuously sweep
> > > a servo from one side to the other at whatever rate specified by the
> > > "step" value, with the pulsout set to yhe pin you want to connect the
> > > servo to.
> > >
> > > The code follows:
> > >
> > > start:
> > > for w1=900 to 2750 step 25
> > > pulsout 4,w1
> > > pause 20
> > > next
> > > for w1=2750 to 900 step 25
> > > pulsout 4,w1
> > > pause 20
> > > next
> > > goto start
> > >
> > > Hope this helps other, too!
> > >
> > > Thanks,
> > >
> > > Doug
> > >
> > >
> > > > To: <basicstamps@egroups.com>
> > > > From: "Al Williams" <alw@a...>
> > > > Date: Mon, 23 Oct 2000 18:14:22 -0500
> > > > Reply-to: basicstamps@egroups.com
> > > > Subject: RE: [noparse][[/noparse]basicstamps] BSIISX - Connecting Servo's
Correctly
> > >
> > > > Well, I didn't write the original code, but it looks fine to me. Did
> it
> > > > grind out your gears? Otherwise, I don't know how you would
> > > ruin the servos
> > > > no matter what pulse widths you sent it. Maybe someone else has
> > > experience
> > > > with that? I have blown servos by shorting my power and ground
> > > (I'm clumsy).
> > > > In fact, I have one crippled BOE Bot right now because I don't
> > > have any more
> > > > servos.
> > > >
> > > > The idea is to send a pulse to the servo to position it. 1500uS
should
> > > > center the servo. So try this (maybe even on one of the ruined
> servos?):
> > > >
> > > > LOW 0
> > > > PULSOUT 0,XXX
> > > >
> > > > where XXX is whatever results in 1500uS for your type of Stamp (150
> for
> > > > Stamp I, 750 for Stamp II, and 1875 for the BS2SX). That should
> > > center it.
> > > > Then change XXX to XXX+25 and see if the servo will step a bit
> > > over. Don't
> > > > put any load on the servo, and it should stay put after the program
> runs
> > > > (although it won't)
> > > >
> > > > All the servos I'm aware of have a stop to keep you from going
> > > too far, and
> > > > the only thing I could imagine you could do would be grind
> > > against the stop
> > > > hard enough to strip the nylon gears? I've never seen that
> > > though. Anyone
> > > > else?
> > > >
> > > > Regards,
> > > >
> > > > Al Williams
> > > > AWC
> > > > * Connect a PS/2 keyboard to your Stamp project (or any
> > > microcontroller):
> > > > http://www.al-williams.com/awce/pak6.htm
> > > >
> > > >
> > > > > > > > > > > >'PROGRAM "SRVOTST1.BAS" 10/4/00
> > > > > > > > > > > >'TO TEST RC SERVOS
> > > > > > > > > > > >LOW 0
> > > > > > > > > > > >AGAIN:
> > > > > > > > > > > >FOR B2=100 TO 200 STEP 2
> > > > > > > > > > > > PULSOUT 0,B2
> > > > > > > > > > > > PAUSE 15
> > > > > > > > > > > >NEXT
> > > > > > > > > > > >FOR B2=200 TO 100 STEP -2
> > > > > > > > > > > > PULSOUT 0,B2
> > > > > > > > > > > > PAUSE 15
> > > > > > > > > > > > NEXT
> > > > > > > > > > > >'DEBUG "AGAIN"
> > > > > > > > > > > >PAUSE 1000
> > > > > > > > > > > >GOTO AGAIN
> > > > > > > > >
Original Message
> > > > > > > > > From: Ray McArthur <rjmca@u...>
> > > > > > > > > To: <basicstamps@egroups.com>
> > > > > > > > > Sent: Saturday, October 21, 2000 1:38 AM
> > > > > > > > > Subject: Re: [noparse][[/noparse]basicstamps] BSIISX - Connecting
> > > Servo's Correctly
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
>
>
>
>
>
>I'm resurrecting an old thread with this question. I've got a BSIIsx and a
>HiTec servo that just won't co-operate. Using the following code the servo
>very slowly and weakly rotates clockwise until it reaches it's limit at
>which point it just hums. By slowly I mean it takes around 30 seconds.
I'm not familiar with the BS2X, but to get the servo to move faster you
can:
A. - decrease the duration of the pause command or
B. - increase the step size. This will also produce a somewhat less smooth
move.
This 'hum' that you're getting is the servo trying to get to a
mechanically impossible position. This will damage the servo. Adjust your
end position values until the servo no longer strains at the ends of it's
range of motion...these are the 1250 and 2500 values in your code. Try
increasing the low value and decreasing the high value. Let us know how you
make out.
Duncan