Stepper motor is a kind of pulse signal converted into angular displacement of the servo actuator. It features simple structure, reliable operation and convenient control. Step value is not particularly voltage, temperature changes, the error will not be long-term accumulation, to the actual application of this has brought great convenience. It is widely used in consumer products (printers, cameras), industrial control (CNC machine tools, industrial robots), medical equipment and other mechanical and electrical products.
The usual method is to use stepper motor control CPU (PC machine, SCM, etc.) with a dedicated stepper motor drive controller to achieve, which there is high cost, with all aspects of inconvenience (different types of motor drive control must be appropriate paired devices) and other issues.
CPLD device has the speed, low power consumption, confidentiality, program design is flexible, anti-interference ability, and the peripheral circuit interface and convenient, more and more used in various industrial, measurement, instrumentation and so on. SCM is also suitable for applications that require complex control algorithms of the occasion. Therefore, this design approach are: acquiring the signal with a microcontroller to calculate the required control operation of the stepper motor information, then pass CPLD, CPLD to the received information into the actual stepper motor control signal (running direction running speed) output to the motor drive circuit. The advantage is that MCU and CPLD their own way. SCM can focus on processing the input signal and output information between the conversion of complex algorithms. Do not take up too much CPU resources to directly control the motor, which also reduces the possibility of the introduction of interference; CPLD MCU simply transmitted over the information into the motor control signal. This will play the advantages of both SCM and CPLD.
Usually for the permanent magnet rotor motor, when current flows through the stator windings, the stator windings produce a magnetic field vector. The magnetic field will lead to a rotor angle of the magnetic field makes the direction of a rotor and the stator's magnetic field direction. When the stator magnetic field vector rotating at an angle. Transferred along with the rotor at an angle to the magnetic field. An electrical pulse for each input, the motor turning a point forward. It is the angular displacement of the output and input the number of pulses proportional to speed and pulse frequency is proportional to. Power to change the order of winding, the motor will reverse. Therefore, the number of available control pulse, frequency and power the motor windings of each phase in order to control the stepper motor rotation.
If the requirements of motor reversal, the transmission excitation signal can be reversed.
The program uses AT89S51 as the main control device. It is compatible with the AT89C51, but also increased the SPI interface and the watchdog module, which not only makes the debugging process becomes easy and also more stable. The microcontroller in the program mainly for field signal acquisition and operation of the stepper motor to calculate the direction and speed information. Then sent to the CPLD.
CPLD with EPM7128SLC84-15, EPM7128 programmable logic device of large-scale, for the ALTERA company's MAX7000 family. High impedance, electrically erasable and other characteristics, can be used for the 2500 unit, the working voltage of +5 V. CPLD receives information sent from the microcontroller after converted to the corresponding control signal output to the stepper motor drive. Put the control signal drives the motor windings after the input, to achieve effective control of the motor.