Pak VIII and BSII
Archiver
Posts: 46,084
I would like to hook up 8 servos with function that serves like car's
wiper. However, it seems that pak allows only continuous pulses to be
sent over the 8 channels.
I tried using the "for loop" for the left, right movement but there
seems to be a delay on each servo due to pauses between each loop,
causing an unsynchronized motion on the rest of the servos.
Anyone with great solution?
thanks
wor
wiper. However, it seems that pak allows only continuous pulses to be
sent over the 8 channels.
I tried using the "for loop" for the left, right movement but there
seems to be a delay on each servo due to pauses between each loop,
causing an unsynchronized motion on the rest of the servos.
Anyone with great solution?
thanks
wor
Comments
>I would like to hook up 8 servos with function that serves like car's
>wiper. However, it seems that pak allows only continuous pulses to be
>sent over the 8 channels.
HI Wor -
Quite so, since that is the requirement for operating R/C type servos, presuming
that is what you are using.
>I tried using the "for loop" for the left, right movement but there
>seems to be a delay on each servo due to pauses between each loop,
>causing an unsynchronized motion on the rest of the servos.
My suggestion, based on how I interpret the dox, and guessing at how you have
written your program is -
DON'T try to do the work of the PAK-VIII in your program. Let it do what it was
designed to do. Your program's primary responsibility is to VARY the period(s)
of the pulse(s) to meet the requirement(s) of the project. Each channel can
operate synchronously, or a-synchronously, as required.
IF your project requirements EXCEED the maximum speed of the PAK (or any other
co-processor) trouble will be in the offing.
>Anyone with great solution?
Not without a copy of your program - sorry.
>thanks
>wor
A copy of the segment of code would be helpful.
Regards,
Bruce Bates
to assume one position and then assume another position. For that, I would
not use continuous rotation servos, but instead normal servos that assume
some position and stop. Set the "off" time to 20mS for each channel. Then
set the "on" time for each channel to something appropriate for each
position. The servo will attain the position and hold it. Then change the
position by changing the "on" time. If you are wanting them all to
synchronize, drive the servos from a single output channel.
Are your servos rotating continuously? What exactly is the symptom of your
problem?
Al Williams
AWC
* Drive 8 servos at once: http://www.al-williams.com/awce/pak8.htm
>
Original Message
> From: wor72@s... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ETLm_Tgc29w27N0l1W8-y_qe70h5ckC2MIo42sLQty4uHWNaoj5xt8sYi-VuzLEBTsYGFKDQsDDWObvrD20]wor72@s...[/url
> Sent: Tuesday, November 14, 2000 11:43 PM
> To: basicstamps@egroups.com
> Subject: [noparse][[/noparse]basicstamps] Pak VIII and BSII
>
>
> I would like to hook up 8 servos with function that serves like car's
> wiper. However, it seems that pak allows only continuous pulses to be
> sent over the 8 channels.
>
> I tried using the "for loop" for the left, right movement but there
> seems to be a delay on each servo due to pauses between each loop,
> causing an unsynchronized motion on the rest of the servos.
>
> Anyone with great solution?
>
> thanks
> wor
>
>
>
I somehow think I'm on the wrong track of programming, utilizing the
BSII as main source ot activating the Pak's operation, instead of
letting BS free from other processing.
The servos supposed to operate normal, not continuously rotating.
That is, to swing an arc of variable angle say 180, 135, 90 both to
left and right taking pointed tip up as neutral -count of 150
+
arc of 180 D \ / arc 45 D
\+/
In this program, I have taken up most of the processing power of BS
and that left little ability for me to track input from the R/C which
suppose to interact with the servos as according to the stick
position. Say having a pulsin to BS reads <575musec, a set of
positions will be activated for each particular servo - Servo1 taking
180, Servo2 taking 135 etc at continuously sweeping motion from left
to right and then back and in repetition till another input gives a
new set of position.
For example, I wrote a trial to perform a sequence
for i=1 to 10
chan=0
register=1
fpx=50
gosub Fcommand
pause 500
chan=1
fpx=100
gosub Fcommand
pause 1000
chan=0
fpx=250
gosub Fcommand
pause 500
chan=1
fpx=200
gosub Fcommand
pause 1000
next
It does gives me the correct sequence as required but I doubt it's
the way of doing it proper. Morever it's too slow to respond by the
time it reached servo8 due to pauses and loops.
Thanks for giving me some enlightenment.
regards
wor
channel?
In your code, why pause after setting the PAK-VIII? Just set all the
channels and then do a single pause before your next. This will let the
servos move faster.
for i=1 to 10
chan=0
register=1
fpx=50
gosub Fcommand
chan=1
fpx=100
gosub Fcommand
pause 500 ' let servo 0 and 1 move
chan=0
fpx=250
gosub Fcommand
chan=1
fpx=200
gosub Fcommand
pause 500 ' let servos settle again
next
I'm assuming you have the "off" time registers already set and just don't
show it.
Regards,
Al Williams
AWC
* Floating point math for the Stamp, PIC, SX, or any microcontroller at
http://www.al-williams.com/awce/pak1.htm
>
Original Message
> From: wor72@s... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=CHrlWJcwxj9HaQQR4wUsPq11-T1e2ckM4z1asemhsOEubO8tdfNNzZDeBQVznZRfn4t-V1CJsvPeQ_DcR8k]wor72@s...[/url
> Sent: Wednesday, November 15, 2000 10:09 AM
> To: basicstamps@egroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: Pak VIII and BSII
>
>
> Thanks to Bruce and William,
>
> I somehow think I'm on the wrong track of programming, utilizing the
> BSII as main source ot activating the Pak's operation, instead of
> letting BS free from other processing.
>
> The servos supposed to operate normal, not continuously rotating.
> That is, to swing an arc of variable angle say 180, 135, 90 both to
> left and right taking pointed tip up as neutral -count of 150
>
>
+
arc of 180 degree \ / arc of
> 45 degree
> ^ pivot \+/
>
>
> In this program, I have taken up most of the processing power of BS
> and that left little ability for me to track input from the R/C which
> suppose to interact with the servos as according to the stick
> position. Say having a pulsin to BS reads <575musec, a set of
> positions will be activated for each particular servo - Servo1 taking
> 180, Servo2 taking 135 etc at continuously sweeping motion from left
> to right and then back and in repetition till another input gives a
> new set of position.
>
> For example, I wrote a trial to perform a sequence
>
> for i=1 to 10
>
> chan=0
> register=1
> fpx=50
> gosub Fcommand
> pause 500
>
> chan=1
> fpx=100
> gosub Fcommand
> pause 1000
>
> chan=0
> fpx=250
> gosub Fcommand
> pause 500
>
> chan=1
> fpx=200
> gosub Fcommand
> pause 1000
>
> next
>
> It does gives me the correct sequence as required but I doubt it's
> the way of doing it proper. Morever it's too slow to respond by the
> time it reached servo8 due to pauses and loops.
>
> Thanks for giving me some enlightenment.
>
> regards
> wor
>
>
>
>
>
>
width. Perhaps that's why I'm not tapping a single channel output for
all.I do not have the R/C code ready yet but will be trying to see if
the respond for the entire program runs effectively.
Pardon as I'm first timer back after long rusty programming break
since school days.
wor
Your assumptions about the resonator are correct. Since it is a high-speed
resonator, the leads need to be short. Depending on your construction
methods stray capacitance can also affect the resonator -- if you have a
scope you should see oscillations (although your scope may load the
oscillator to the point that the chip won't run with the scope lead in
place). Some people find that placing a small capacitor from each clock pin
to ground helps them get oscillations started. Also, you might try placing a
10K resistor across the resonator's outside pins -- that sometimes helps as
well.
If you want to send me your code off list (alw@a...) I can see if
there is anything obviously wrong.
Another test is to see if you can write to a register and read it back?
Regards,
Al Williams
AWC
>
Original Message
> From: john & lisa [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=n-iR7_RuFRBCiu1mLh4IumXN074ByQ3mT6-QOkY_nDGpiRM2q5kSmgcoE4B94qjeIz0JrPlLWJ46nv7BP6WJDcJR]johnlisa@c...[/url
> Sent: Thursday, November 16, 2000 11:13 AM
> To: basicstamps@egroups.com
> Subject: Re: [noparse][[/noparse]basicstamps] Re: Pak VIII and BSII
>
>
> Hi Al, finally received the Pak VIII I ordered from your Website, arrived
> pretty quick actually. I've already built the circuit and
> connected it to my
> BSII, and programmed it, but it does not appear to work. I've checked my
> circuit over and over but it seams ok. I'm a little concerned about the
> resonator, I haven't seen one with three pins on it before and
> I'm assuming
> that the middle pin is ground, and the other two pins well I'm
> also assuming
> that it does not matter what way round it goes, but you know what they say
> about assumption (the mother of all mistakes right!) I've also got the Pak
> connected to pins 0 & 1 for clock and data and I'm pretty certain
> that I've
> changed the programme to suit. Also the servo's are on pin 6 and 7 of the
> Pak8, and I'm certain I've corrected the programme for this to, but not
> being any good at programming I'm not 100% sure. If you can confirm my
> assumptions for the resonator and give me any programming tips I would be
> very grateful.
> Many thanks in advance
> John
>
Original Message
> From: Al Williams <alw@a...>
> To: <basicstamps@egroups.com>
> Sent: Wednesday, November 15, 2000 4:25 PM
> Subject: RE: [noparse][[/noparse]basicstamps] Re: Pak VIII and BSII
>
>
>
>
>
pretty quick actually. I've already built the circuit and connected it to my
BSII, and programmed it, but it does not appear to work. I've checked my
circuit over and over but it seams ok. I'm a little concerned about the
resonator, I haven't seen one with three pins on it before and I'm assuming
that the middle pin is ground, and the other two pins well I'm also assuming
that it does not matter what way round it goes, but you know what they say
about assumption (the mother of all mistakes right!) I've also got the Pak
connected to pins 0 & 1 for clock and data and I'm pretty certain that I've
changed the programme to suit. Also the servo's are on pin 6 and 7 of the
Pak8, and I'm certain I've corrected the programme for this to, but not
being any good at programming I'm not 100% sure. If you can confirm my
assumptions for the resonator and give me any programming tips I would be
very grateful.
Many thanks in advance
John
Original Message
From: Al Williams <alw@a...>
To: <basicstamps@egroups.com>
Sent: Wednesday, November 15, 2000 4:25 PM
Subject: RE: [noparse][[/noparse]basicstamps] Re: Pak VIII and BSII