1. Fields of the Invention
The present invention relates to current controllers of inductors and to motors with inductive windings and motion control, and, more particularly, to an apparatus and method of controlling motion by controlling the drive currents in the motor windings of the motor which produces the motion.
2. Discussion of Background and Prior Art
The control of a motor position is accomplished by controlling the current through the two or more inductive windings that create the magnetic fields necessary for the motor's operation. Many circuits have been designed to control motor winding currents and to solve the problems of power switch control. Some H-bridge drivers do not recirculate current through the viewing resistor or current measuring device, so current cannot be measured when in the recirculate mode. Switching transients are large and must be filtered to prevent them from affecting the mode of operation. The control of motor current is dependent on many factors including inductance, velocity, load, and power supply voltage. With an H-bridge driver, the added complexity of motor commutation must also be factored into the current control solution. Therefore, there is a need for, and it is an object of the present invention to provide, an improved solution to the problems associated with regulating the winding current in motors and inductive devices generally.
Presently, stepping and micro-stepping motors are used in a variety of applications. Micro-stepping motors are particularly useful in applications which require fairly fine (i.e. small) movements while stepping motors are typically used in applications which require coarser (i.e. larger) movements.
For example, a contour milling machine may require very precise coordinated motion on multiple axes while a drill may just need to get to a desired position as rapidly as possible before beginning a precise single axis move. When moving at a slow pace, micro-stepping creates smooth, precise motion, but when going at a fast pace, it provides little or no benefit and causes the control processor to approach its computational limit.
Therefore, there is a need for, and it is an object of the present invention to provide, an apparatus or method for controlling a motion causing motor in such a manner that the step sizes of the motor may be dynamically varied from micro-steps to full steps during the motion process.
Prior art U.S. Pat. No. 4,743,824 to Andersson ("Andersson") and, prior art U.S. Pat. No. 4,908,562 to Back ("Back") disclose a method and apparatus for the micro-stepping of a two-phase stepping motor for controlling the magnitude and direction of the current through a motor winding wherein the driver is operated to provide one of three different operational states, (i.e. charge, hold, or discharge). The circuit timing for operating the Andersson apparatus is achieved by using analog means (i.e. a ramp generator, a set of comparators, and the input voltage). The circuit timing for operating the Back apparatus is determined by the clock rate, the clock pulse width, and a delay device (i.e. uses a one-shot circuit to control timing).
Prior art U.S. Pat. No. 4,749,931 to Kegal ("Kegal") discloses a method and apparatus for controlling the magnitude and direction of the current through a motor winding wherein the controller is operated in one of two different operational states (i.e. charge or discharge). The circuit timing for operating the Kegal apparatus is determined by a clock and a comparator.
Kegal discloses a method that makes a decision to charge or discharge current into the motor winding on each clock pulse and continues in the selected mode until the next clock pulse. In this method, the period of the charge or discharge of current is determined by the clock frequency.
Back discloses a method that uses a viewing resistor in series with the motor winding and a differential amplifier to translate the measured current to a ground reference so that motor current can be measured while in the hold state. A mixture of synchronous and asynchronous logic that is clocked off both edges of the clock pulse in conjunction with a delay device comprises the timing control circuit.
Anderson discloses a method that uses a viewing resistor in the return lead of an H-bridge switch to measure the current flow to the motor winding. A current comparator decides if the current is over the desired value and another creates a timing signal that is used to inhibit the current comparison. The control circuit comprises an asynchronous flip/flop used to maintain the operating mode along with miscellaneous logic to resolve the sign of the current.
Back and Andersson both disclose a pulse width modulation method where the control cycle is initiated by the clock, timed by internal parameters, and terminated by the output of a comparator. Kegal, on the other hand, discloses a bucket brigade approach where a current is sourced or sinked for a fixed time after each clocked decision. These prior art patents, however, are limited to the control of motors based on internal parameters, and they do not disclose systems that use state machines or in which external commands or states are fed to the control module (i.e. a mealy state machine with command inputs, comparator inputs, a phase input and feedback from the present state which results in synchronized control of motor current). Since the feeding of external commands to the driver module would result in more direct control of the motor, such a system is highly desired.
Also, these prior art patents do not disclose a central timing control for the system so that all system timing parameters are generated from a common source which gives precise control of the timing and noise associated with multiple drivers switching their operational state. Back and Andersson have further limitations in that they require a number of separate means to filter switching transients, and this is disadvantageous in that the noise of switching transients will affect the operation of adjacent modules. Therefore, there is a need for, and it is an object of the present invention to provide, a timing apparatus which creates a common timing for digitally filtering switching transients and controlling the times when current samples are going to be taken to determine whether a charge or discharge cycle is required.
Prior art methods of comparing currents have the further limitation of not being able to distinguish whether a positive or a negative current is being compared (i.e. do not teach a method of signed comparison). The prior art comparators are limited in that they do not allow separate current comparisons for sourcing current to and sinking current out of the motor windings. Therefore, the problem of current runaway is possible in some discharge cycle techniques resulting in driver or motor damage. Furthermore, a signed comparison method would control current more precisely since the current can be measured during discharge. Furthermore, dual (i.e. signed) comparison allows the charge and discharge current limits to be biased to allow for more symmetrical operation of the circuit. Therefore, there is a need for, and it is an object of the present invention to provide, an apparatus for controlling current in an inductive device by performing signed comparisons of the desired currents with the actual currents in the inductive device. Stepping motors is one of many typical applications.
Finally, the prior art has also made use of a variety of computer algorithms to set parameters and calculate variables needed to execute external computer commands. It is known in the art to have computer algorithms that make use of a position register, a velocity register, an acceleration register, and a timed interrupt source. One limitation, however, of using an acceleration register is that it requires more calculations in the inner loop that is activated at a high rate. This uses up the computational resources of the processor which, in effect, means that additional microprocessors may be needed in order to perform all of the calculations. Therefore, there is a need for, and it is an object of the present invention to provide, a method for controlling a motor that makes use of a computer algorithm in which the acceleration register and associated acceleration calculations are eliminated.
It is an object of the present invention to overcome the problems and limitations of the prior art and to satisfy the needs that have just been identified and discussed.
It is a further object and advantage of the present invention to provide an apparatus and method that can better control a motor having multiple phases.