Design of Stepping Motor Drive Module Based on CPLD

0 Preface

CNC technology is a technology that controls the automatic operation of machinery or other equipment by digital programming. CNC machine tools are machine tools that use CNC technology, or machine tools equipped with CNC systems. The machine tool numerical control system is mainly composed of several parts: input of part processing program, data processing, interpolation calculation and control of motion mechanism. This article mainly introduces the control of the last part of the motion mechanism, that is, how to control the motion of the motor. There are many kinds of motors available, here we choose stepper motors.

A stepper motor is a digitally controlled motor that is a precision actuator that converts electrical pulses into angular displacement. Its rotation is run step by step at a fixed angle. Each stepper motor sends a pulse motor to rotate a fixed angle. As long as the pulse number is correct, the motor can go in place without cumulative error, so the stepping The control of the motor can be controlled by an open loop. How to accurately and economically control stepper motors has become a topic of discussion among researchers. This article will use CPLD to achieve control of the stepper motor. And finally through the experimental simulation results.

1 stepper motor drive principle

The driving of the stepping motor is to energize the phase excitation windings of the stepping motor to realize the change of the internal magnetic field direction of the stepping motor to rotate the stepping motor. Let us use the stepper motor is four-phase, the four phases are A, B, C, D, corresponding to four pairs of magnetic poles. The inner surface of each magnetic pole is distributed with a plurality of small teeth of different sizes and different tooth pitches (different stepping motors, the number of small teeth is different), and it is assumed that IV is the number of small teeth in the rotor. When the four phases are energized in the order of A-B-C-D, the internal magnetic field of the stepping motor changes by one week (360°). This energization mode is a single-phase four-shot energization mode, and the stepping distance of the stepping motor at this time. angle:

θ=90°/N

If N=50, then θ=1.8°

If the selected power-on sequence is A-AB-B-BC-C-CD-D-AD, the power-on mode is the two-phase eight-shot power-on mode, and the step angle of the stepping motor is:

θ=45°/N

If N=50, then θ=0.9°

The step angle is the minimum angle that the stepping motor can rotate at one time. The smaller the step angle of the motor, the more accurate the motor is. Therefore, the method of selecting the driving motor to energize is the two-phase eight-shot powering mode.

2 design

A complete, high-precision stepper motor control system block diagram is shown in Figure 1. The CPLD is connected to the driver of the stepping motor. The driver amplifies the signal output from the CPLD and sends it to the stepping motor. Since the axes of the CNC machine are driven by the rotation of the motor, the rotation of the motor drives the action of the corresponding shaft.

The function of each component module is described as follows:

2.1CPLD module

Use CPLD to control the stepper motor to start, stop, and reverse the motor. The traditional way is to use a single-chip microcomputer to control the stepping motor, but in a numerical control system, the single-chip microcomputer has to do a lot of work. For example, the single-chip microcomputer must control the stepping motor and accept the data of the upper computer to perform corresponding calculations, and also control the display module. , as well as alarm processing, etc., if you use CPLD to drive the stepper motor, you can reduce the burden on the microcontroller. Using a large-scale programmable logic device as a controller can reflect that CPLD plays a higher role in control, rather than just being used as a logic device. And CPLD has a more economical price.

In addition, there are many peripheral interfaces of CPLD. For example, the EPM7032 produced by ALTERA Company has 36 I/O ports and more than 600 internal logic gates, except for the resources used to drive the stepper motor. Resources can also be used for other purposes in the system.

In the actual board design phase, if you design a circuit using traditional design methods, you must first decide which device class and specification to use, and then start by drawing the silicon layout, step by step, up to the design of the entire system. In the process, if there is a problem at which level must be reworked, the entire board will be scrapped. However, if CPLD is used, the design method is a top-down design method, which is the process of gradually refining each design process throughout the design process. For example, at the beginning of our design, we can connect the CPLD to the driver first, and then use the software settings to use the pins we have connected. If the program has an error, we can use the ISP (in the system programmable method). The new program is loaded into the CPLD without replacing the board.

2.2 drive module

The operation of the stepper motor must be driven by an electronic device. This device is a stepper motor driver. Since the signal output from the CPLD is not enough to drive the motor to rotate the motor, a driver must be connected between the CPLD and the stepper motor to amplify the CPLD. The signal that is output. Each time the CPLD sends a pulse signal, the stepper motor is rotated by one step angle through the driver. Therefore, by controlling the pulse frequency of the stepping motor, the motor can be adjusted. Pulsed fast motors run fast, and pulsed slow motors run slower. The control of the motor speed can be realized by adjusting the frequency of the CLK pulse sent to the CPLD indirectly; controlling the number of stepping pulses can accurately position the motor.

Office Teaching Projector

The selection of teaching projectors, with rich and bright colors, high-resolution projectors, and high-brightness laser light sources, can meet the needs of various large and medium-sized indoor teaching scenarios in schools, and provide teachers with good projection interactive teaching.

best business projector,office presentation projector,good office projector,office classroom projector,4k teaching projector

Shenzhen Happybate Trading Co.,LTD , https://www.happybateprojectors.com