Controlling Servos from PC
Archiver
Posts: 46,084
Anyone have some good resources on the subject line? I know the scott
edwards board does it but I am interested in learning how to do it, not
just utilizing someone elses. Thanks.
- Matt
edwards board does it but I am interested in learning how to do it, not
just utilizing someone elses. Thanks.
- Matt
Comments
you all about how to do it.
Original Message
From: Matt Johnson [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Ci68Nk5l2I8w8UGBJqXobpBXbe9iz3PogFKOd6yKE5pe2VttxFYcxufT5JxnCR1HaVNlywP5yz0]matt@m...[/url
Sent: Saturday, July 13, 2002 12:54 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Controlling Servos from PC
Anyone have some good resources on the subject line? I know the scott
edwards board does it but I am interested in learning how to do it, not
just utilizing someone elses. Thanks.
- Matt
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
basic stamp.
- Matt
On Sat, 13 Jul 2002, Matt Johnson wrote:
>
> Anyone have some good resources on the subject line? I know the scott
> edwards board does it but I am interested in learning how to do it, not
> just utilizing someone elses. Thanks.
>
> - Matt
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
The timing requirements for servo control are precise. You might find an
offboard microcontroller is, in fact, the best solution. It can take
commands from the PC and go from there (this is the SEETRON mini SSC).
I can't imagine any PC OS that would allow you to create 1.0 - 2.0
millisecond pulses every 20 milliseconds without interfering somewhere ...
especially running the hugely complex C# and .NET stuff.
But then, I like microcontrollers....
-- Jon Williams
In a message dated 7/13/02 5:37:01 PM Central Daylight Time, matt@m...
writes:
> Let me clarify. I want to do it using C# and .NET and a PC. Not using the
> basic stamp.
>
> - Matt
>
> On Sat, 13 Jul 2002, Matt Johnson wrote:
>
> >
> > Anyone have some good resources on the subject line? I know the scott
> > edwards board does it but I am interested in learning how to do it, not
> > just utilizing someone elses. Thanks.
> >
> > - Matt
>
[noparse][[/noparse]Non-text portions of this message have been removed]
Original Message
From: Matt Johnson [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Fwb_8NIClmh6dwio3bMo6uci4rTAtxmFrNzkShkf1fg-ci-hhnJBwhMuq-kNkEUjka7Q]matt@m...[/url
Sent: Saturday, July 13, 2002 5:23 PM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] Controlling Servos from PC
Let me clarify. I want to do it using C# and .NET and a PC. Not using the
basic stamp.
- Matt
On Sat, 13 Jul 2002, Matt Johnson wrote:
>
> Anyone have some good resources on the subject line? I know the scott
> edwards board does it but I am interested in learning how to do it, not
> just utilizing someone elses. Thanks.
>
> - Matt
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
timer/processor, simply because of how the CPU gets time-sliced with background
tasks. That said, years ago I did just what you are asking on an (8088) DOS
only machine using QuickBasic4.5 to control a handful of servos through the
printer port. If I remember correctly there was a trick in order to obtain
correct timing cycles. Essentially I would create a LARGE string variable that
corresponded to each servo (20K+ string length) and set all of the characters
within each string to "0". This in effect is my 1mS to 2mS window for the
servo.
By setting a single character in the string to something other than "0" and
doing
a search for it became my servo position precision timing.
example code flow:
'Determine position of servo you want and set corresponding
servo String
'position to something other than "0"....for example "X"
'Set the Printer port pin HIGH 'Start servo SYNC pulse
Z=INSTR(Servo1$,"X") 'We don't care what Z is because we already
'know we are simply using a
built-in string
'search function to create a
precision delay.
'Set the Printer port pin LOW 'End servo SYNC pulse
'Here, the "OFF-TIME" is not as critical as the "ON-TIME" for the
servo's so
'a long FOR/NEXT delay will work here or you can "stagger" the
servo control and
'proceed to the next servo before you repeat the cycle and start
all over again.
>Then this is probably not the right resource to find your answer....
>
>The timing requirements for servo control are precise. You might find an
>offboard microcontroller is, in fact, the best solution. It can take
>commands from the PC and go from there (this is the SEETRON mini SSC).
>
>I can't imagine any PC OS that would allow you to create 1.0 - 2.0
>millisecond pulses every 20 milliseconds without interfering somewhere ...
>especially running the hugely complex C# and .NET stuff.
>
>But then, I like microcontrollers....
>
>-- Jon Williams
>
>
>In a message dated 7/13/02 5:37:01 PM Central Daylight Time, matt@m...
>writes:
>
>
> > Let me clarify. I want to do it using C# and .NET and a PC. Not using the
> > basic stamp.
> >
> > - Matt
> >
> > On Sat, 13 Jul 2002, Matt Johnson wrote:
> >
> > >
> > > Anyone have some good resources on the subject line? I know the scott
> > > edwards board does it but I am interested in learning how to do it, not
> > > just utilizing someone elses. Thanks.
> > >
> > > - Matt
> >
parallel port of the PC (with a resistance) to the servo input. A QBASIC
program generate a pulse of between 1 and 2 ms and repeat it at
aproximattely at 50 HZ. All the timing was calibrated with freqin and pulsin
instructions in a Basic Stamp connected to the output from the PC.
repeat:
out 888,1
delay1
out 888,0
delay2
goto repeat
All the experiments of the Basic Stamp manual can be made easily with an
old PC
Carlos Contreras
presidente Club Cientifico de Pe