Sheng Shi Shi Dai Electronic Technology Co., Ltd. Shenzhen 专业PCB抄板
中文版 ·Home ·Favorite
Keywords:
News Product Download
Technical Data
Technical Documents
   PCB copy
·Location:ShenShiShiDai > Achieved with the MCU and CPLD stepper motor controlAchieved with the MCU and CPLD stepper motor control

Achieved with the MCU and CPLD stepper motor control

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.


1 Introduction stepper motor principle

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.

We use four-phase unipolar stepper motor as an example. The structure shown in Figure 1:


Four four-phase winding leads (as opposed to phase A1 A2 B1 phase phase B2) and two public lines (to the power of the positive.) The windings of one phase to the power of the ground. So that the windings will be inspired. We use four-phase eight-beat control, ie, 1 phase 2 phase alternating turn, would enhance resolution. 0.9 ° per step can be transferred to control the motor excitation is transferred in order as follows:

If the requirements of motor reversal, the transmission excitation signal can be reversed.

2 stepper motor control program

Control system block diagram is as follows


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.

2.1 The hardware structure of the motor drive

Motor drive using the following circuit:
R1-R8 in which the resistance value of 320Ω. R9-R12 resistance value 2.2KΩ. Q1-Q4 as Darlington D401A, Q5-Q8 for the S8550. J1, J2 and the stepper motor connected to the six-lead

Sheng Shi Shi Dai Electronic Technology Co., Ltd. ShenzhenPhone:0755-83983211,83552460 Mobile:13058188266,13352923650 Fax:0755-81519370 Technical SupportQQ:756304969,627838610,1336784399
Address:Futian District, Shenzhen, Beijing Garden Road, 11th Floor Technical Support:ShenShiShiDai sitemap
Online customer service one
Online customer service two
张女士