| |
Avertissement
Ces pages ont été directement rédigées en anglais, car leur audience
potentielle était clairement cosmopolite. De fait, elles n'ont inspiré que des
réalisations anglo-saxonnes. So be it.
What it is about
These pages
describe an axis control cards system I have designed, of which a working
prototype has been made, along with the necessary interface software.
Axis control card specifications and capabilities
Number of axis:
- 3 in the prototype (i.e. right ascension, declination and dome control); a
fourth axis would ne nice, e.g. for a focuser system,
Choice of motors and related power amplifiers:
DC motors :
- DC brush motors, using a voltage amplifier (Vout = K * command)
- DC brush motors, using a current amplifier (Iout = K * command)
- DC brushless motors with accessible Hall effect sensors, and no dedicated
power amplifier; synchronised winding commutation is achieved by the axis
control card.
- DC brushless motors with dedicated power amplifier; synchronised winding
commutation is achieved by the power amplifier, and the system is "seen"
as in (1) above.
Stepper motors:
- Unipolar or bipolar stepper motors in "synchronised" mode. This
implies use of an optical encoder mounted on the motor's shaft, with a
number of points per turn that, multiplied by 4, be an integer multiple of
the motor's number of steps; Ex: a 150 points encoder may be used with a 200
steps stepper motor, since 150 * 4 = 200 * 3. This mode optimizes torque and
maximum reachable velocity for the motor.
- Unipolar or bipolar stepper motors in "non-synchronised" mode. A
simpler and cheaper encoder, such as Hewlett-Packard's, or a sloted
codewheel can be used.
Any mix of motors is allowed; for instance, one may use DC motor & reducer
assemblies for Right Ascension and Declination, and a stepper motor for rotation
of the dome. The reduction gear ratio for different axis may also be different,
and each motor has a different set of closed loop parameters. These parameters
can be reprogrammed "on the fly", depending on the current function,
for instance, the system can be optimized for speed for slewing functions, or
for precision while tracking and guiding.
Generally speaking, motors, especially of the DC brush kind, are cheap in the
sens they can be found in any junk yard. It may be just a bit more difficult to
find good quality reducers for a medium size to big scope. Small moto-reducers
can be found everywhere. DC brushless motors are the best DC motors one can buy,
because of their reliability and their high "horse power to the
liter". I would consider them a luxury for anything less than Mount
Palomar's telescope.
However, they are what could be used in re-vamping old telescope systems,
possibly with use of the axis control card described here.
Usable encoders:
An optical encoder is a rotary device whose output signals express the
angular position of the shaft it is mounted on with respect with a known
position. The encoder's role is to inform the axis control system of the current
shaft position and velocity.
There are three kinds, that carry very different price tags:
- The high quality rotary optical encoders that are used in production
machines typically have between 100 and 1000 points per turn, though there
are models with a higher resolution. They contain sophisticated electronics
and a very precise codewheel, and typically cost US$300 and up. Unless they
are salvaged from old machines, I'd say they are beyond reach of amateurs.
Their price is justified by the fact they can withstand very long use at
high velocities.
Some firms, such as Hewlett-Packard, make good quality optical encoders in
either reflective or transmissive technology that are designed to be mounted
directly on the motor's output shaft, such as this one. Typical price for
such components should be in the order of US$50 apiece. They are available
in up to 1024 points per turn resolution, but are less ruggedized than the
previous type. However, they perfectly fit an application such as telescope
control, because they are not supposed to operate at full speed for years.
- Finally, and using some care, it is very easy to build optical encoders by
making a codewheel, which is just a circular flange with equidistant slots,
with a mark to space ratio of 1; such wheels are probably available on the
market. Two optical forks (or one with two detectors) separated by half the
width of one tooth are in charge of creating the quadrature signals. A typical
number of points per turn for such a codewheel is in the range of 4 to 100,
all depending on the wheel's diameter.
A low number of points on the encoder is not to be considered as a negative
parameter for the overall resolution of the controlled axis: all depends on the
actual reduction gear that connects the motor to the telescope's main shaft.
For instance, if you use a 20 points codewheel with a DC motor, such as 3.600
rpm represents 1 degree per second on the RA axis when slewing, then the
tracking resolution of the telescope will be just fine, since you'll get 5
points, or 20 quadrature counts per second when tracking, which is more than
sufficient for very precise tracking and guiding!
However, and for those who wish to use stepper motors, it is to be noted that
a rather high precision encoder -as explained above- is necessary, this being
due to the fact that steppers have a very low range of velocities! Also the
encoder should have a third output signal called the index pulse, that occurs
once per revolution.
This is why I keep saying that if you can afford an axis control card such as
the one I have designed, then the best motion control system is achieved by use
of DC motors: they are powerful, have an excellent torque curve over velocity
and a wide range of achievable velocities, accept temporary overcurrent, have an
infinite angular resolution, and can be had for close to nothing. Also, the
necessary bridge power amplifier can be built with a couple of op amps and four
2N3055 transistors, about what you need to control a stepper motor!
On the other hand, if you already have stepper motors installed and can fit
them with optical encoders such as HP's, then you can use this axis control card,
and you'll find you make better use of the motor than before.
Cards outputs related to movement control:
For each motor, the following outputs are available:
- DC Voltage, supplied from an 8 bits command port connected to a Digital to
Analog converter. In the prototype, only one value for the gain is available;
however, and since the dynamics of both the command port output and the PWM
ouput are limited to 8 bits, it appears necessary to have a software
selectable gain on this output in the final version of the card.
- Signed or unsigned PWM line(sign is available); this signal may be
integrated by a low-pass filter to generate a voltage equivalent to the
previous one. Alternately, it is possible to feed it into a switching
amplifier whose output is connected to the motor; in this case the motor
itself acts as a low-pass filter.The PWM frequency is 20 KHz.
- 3 phase or 4 phase outputs for either stepper or DC brushless motors (when
used without their dedicated power amplifier).
Card's inputs related to movement control:
In addition to the "Limit" and "Stop" inputs mentionned
above, the following are available:
- "Limit" TTL input (end of travel switches)
- "Stop" TTL input (emergency stop)
Card's operating modes:
Under hardware control:
- Position Control
- Proportional Velocity Control
- Integral Velocity Control
- Trapezoidal profile
Under software control:
- Linear interpolation on three axis
Other features, such as circular interpolation, could easily be added in
software if needed for special applications.
Sampling period:
This parameter qualifies how "fast" the PID correction algorithm is
executed in the HCTL1x00 microcontroller. Faster is generally better, however
there are some constraints that make it handy to lengthen this sampling time, in
particular when low velocities can be achieved.
The sampling frequancy may be reduced while a motor is operating, and can be
set on a per axis basis.
Using a 2 Mhz clock, the achievable range of sampling periods is from 64µs
to 2048 µs (500 Hz).
Host computer Interface:
The prototype is controlled via the parallel port; this design comes from the
fact that a cheap used portable computer such an XT or 286 AT could be used to
control the card on the field.
Inputs/Outputs:
- 16 TTL inputs
- 16 TTL outputs
Software:
The software interface with the card is programmed in Borland Pascal v7.0,
and comes as a "unit" (.TPU file).
This is only handy for people that program in Borland Pascal or Delphi, of
course; hence a generic interface to this unit, in the shape of a Dynamically
Loadable Library (DLL) could be added that will make interfacing to other
languages, such as C/C++, Visual C++, Visual Basic, etc. possible.
The unit includes the following non exhaustive list of functions:
Program initialisation functions (set interface port)
Axis initialisation functions, on a per axis basis:
- Set sampling time (fully programmable and reprogrammable on the fly)
- Set output amplifier gain among two values
- Set axis Points per Turn
- Set Axis Amplifier Gain
- Set amplifier type to voltage or current
- Set Digital Filter's Gain
- Set Digital Filter's Zero
- Set Digital Filter's Pole
HCTL mode switching functions on a per axis basis:
- Soft and Hard Reset
- Idle mode
- Align mode
- Position Control mode
- Proportional Velocity Control mode
- Trapezoidal profile mode
- Get current active mode
I/O functions:
- Read Input Word
- Write Output word
Sub functions are provided, in the relevant modes, for "on the fly"
programming of new positions, velocities, or accelerations.
High level movements functions:
- Goto position and return
- Goto position and wait
- Linear interpolation in position mode
- Linear interpolation in integral velocity mode
Low level movements functions:
- Get actual position
- Get command position
- Reset position counter
- Get actual velocity
- Set velocity
- Set acceleration
Conversion functions (from quadrature points per sampling time to rpm and
vice-versa)
|