comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert C. Leif" <rleif@rleif.com>
To: "'comp.lang.ada mail to news gateway'" <comp.lang.ada@ada.eu.org>
Subject: RE: Driving Servos (was: Great opportunity for Ada application)
Date: Fri, 14 Feb 2003 21:28:12 -0800
Date: 2003-02-14T21:28:12-08:00	[thread overview]
Message-ID: <mailman.1.1045286998.9948.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: <3E4D2C7E.2010306@cogeco.ca>

I was hoping that at least some kind of higher level package could be
created. It does appear that some of the components , possibly in the form
of generics could be created. 
Parenthetically, my present servomotor controller board's software will not
even load. I also have a very expensive CCD camera for my microscope with
signal averaging software that produces artifacts. The commercial software
for both is written in C++. This is why I am an Ada fanatic! I believe that
most of us customers would greatly appreciate and pay for reliable software.
Bob Leif

-----Original Message-----
From: Warren W. Gay VE3WWG [mailto:ve3wwg@cogeco.ca] 
Sent: Friday, February 14, 2003 9:51 AM
To: comp.lang.ada@ada.eu.org
Subject: Driving Servos (was: Great opportunity for Ada application)

Marin David Condic wrote:
> Ada code to control servo motors? Yeah. Unclassified source exists to do
> that. But that doesn't mean that a company would give it to you. Most
would
> consider it to be "proprietary" in some way. Besides, the code would
likely
> be very specific to the particular servo in question and to the particular
> application.

Unless you are talking about "standard stepping controller chip" hardware,
I doubt that much source code would be useful anyway.

> It depends on what you want. The actual control laws that drives a given
> actuator is typically rather small. You get a request, it does some rate
and
> range limiting, you have some kind of transfer function and you generate
an
> output. There's a bit more to it when you get into the minor loop closure,
> but that is also very device and application specific. Most of the code
goes
> into failure detection and accommodation which again is very device and
> application specific. Beyond that, you have an even larger hunk of code
that
> deals with the I/O and scheduling of your control laws - the Operating
> System, if you will. Possibly you can use something off the shelf there,
but
> it depends a lot on what the box that is going to hold the whole thing
looks
> like.
> 
> MDC

Back when I used to wire MC68705 microcontrollers to old floppy
disk drive stepper motors (5.25 inch at the time), I just used
3 pairs of transistors (2N2222 I think, or maybe it was a
pair of PNP and NPN -- I forget now..) to do the driving,
with 6 pairs inputs to the base of the driver
transistors.

IIRC, most of the floppy seek mechanisms
for 5.25 drives, used a 3 winding stepping motor. The drivers
were a bit more complicated than this, because there are
issues with "back EMF" when the coil winding is switched
off. If you use a straight diode for this, motor speed is
very limited (slow), but with the appropriate use of diode
+ resistor, I think I met an appropriate compromise
(there are more advanced ways to do this "right" however).

The assembly language code had to carefully raise or lower
inputs on those transistors according
to strict guidelines (for example you could not allow
both of the + and - inputs at the same time, since
with my arrangement, the current would short through the top
and bottom pair of drivers, not a healthy event!)  Then there
was timing to consider too, since you cannot always do things
at the speed of software ;-)

I used onboard timer(s), that then provided interrupts
that would indicate when the next "step" was needed etc.
Of course the process of going in one direction or the
other, required some other orchestrations to occur.

The point of this post is really that if you have a fairly
custom driver arrangement, no off the shelf code is likely to
be of much help. Especially if you're dealing with resource
constrained chips like the MC68705 series chips. I believe
the PIC chips are still rather limited, though I've not
kept in touch.

If only I could retire and do fun things like that again..

But it's hard to imagine an Ada95 program fitting into
a 2KB EPROM however..

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg





  reply	other threads:[~2003-02-15  5:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-12 17:09 Great opportunity for Ada application Jerry Petrey
2003-02-12 17:33 ` Rodrigo García
2003-02-12 18:12 ` David Botton
2003-02-12 20:19   ` Jeffrey Carter
2003-02-13  1:55     ` Jerry Petrey
2003-02-13 16:03       ` Robert C. Leif
2003-02-14 13:16         ` Marin David Condic
2003-02-14 17:50           ` Driving Servos (was: Great opportunity for Ada application) Warren W. Gay VE3WWG
2003-02-15  5:28             ` Robert C. Leif [this message]
2003-02-18 11:00             ` Bernd Trog
2003-02-19 14:29               ` Warren W. Gay VE3WWG
2003-02-19 16:24                 ` Jeffrey Carter
2003-02-19 18:35                   ` Vinzent Hoefler
2003-02-19 23:45                     ` DPH
2003-02-20 13:56                       ` Vinzent Hoefler
2003-02-20  1:41                     ` Jeffrey Carter
2003-02-20  8:11                       ` Martin Dowie
2003-02-20 17:30                         ` Jeffrey Carter
2003-02-23 17:18                           ` Martin Dowie
2003-02-12 20:23   ` Great opportunity for Ada application David Marceau
2003-02-13  2:10     ` James S. Rogers
2003-02-13 15:37       ` Jerry Petrey
2003-02-23  6:09       ` James S. Rogers
2003-02-13 12:31 ` Marin David Condic
2003-02-13 15:20   ` Jerry Petrey
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox