Using DSP to control stepper motor to promote light device movement to realize measurement device positioning

The system plans to use DSP to control the stepping motor to promote the light device movement to achieve accurate positioning of the measuring device. The main controller to be used in the system is DSP28335. The controlled object is a 42-step motor with a minimum step angle of 1.8°. The DSP output PWM pulse wave is used to break the motor through the motor driver. The system changes the setting of the PWM parameters according to the specific control requirements, and corrects the process parameters through the relevant algorithms to complete the system purpose. The control accuracy of the motor control system is 10μm linear displacement, which can be used for the support of laboratory projects. The system can also be widely used in the field of motor control.

0 Preface

A stepper motor is an open-loop control device that converts an electrical pulse signal into an angular displacement or a linear displacement. In the case of non-overloading, the speed and stop position of the motor depend only on the frequency of the pulse signal and the number of pulses, and are not affected by the load change. Its rotation is operated step by step at a fixed angle and can be controlled by the pulse. The number is used to control the angular displacement to achieve accurate positioning. In order to realize the control of the stepping motor, the single-chip microcomputer is generally used as the controller, and the pulse output frequency and the pulse output number are controlled by some large-scale integrated circuits to realize the control of the stepping motor. However, the accuracy and reliability of the whole system are realized. There are defects. This system is a subsystem serving a project in the laboratory. The purpose of the system research is to adjust the relative movement of the experimental device accurately, quickly and stably, and find the best position and angle placement device. Therefore, the system intends to use the floating point DSP28335 as the system. The system controller is intended to use its integrated PWM output module to reduce the use of peripheral circuits and improve system reliability and system control accuracy.

1 system overall design

The overall design block diagram of this system is shown in Figure 1. It is proposed to use the digital signal processing chip DSP28335 to output a specific PWM pulse sequence according to the control algorithm. The pulse sequence realizes the control of the high-precision 42 stepping motor through a specific stepping motor driver, and automatically or manually adjusts the operation of the motor through a control algorithm. The status and running speed are sent to the LCD for real-time display. Through the detection of the system point, it is determined whether the control purpose of the system is achieved, and finally the selection of the system installation position is completed by a certain algorithm.


Figure 1 System overall design block diagram

2 system hardware implementation

The main controller to be selected for this system is TMS320F28335, which has 150MHz high-speed processing capability, 12-bit 16-channel ADC, 32-bit floating-point processing unit, and up to 18 PWM outputs, of which 6 are unique to TI. More accurate PWM output (HRPWM). In this system, it is the use of its independent PWM module to generate pulse signals. Because the subject needs precise positioning, the 42 stepping motor with control precision of 1.8° is selected to realize the device. The stepping motor is an open-loop control element stepping motor that converts the electric pulse signal into angular displacement or line displacement. The structure diagram is as follows. Figure 2 shows.


Figure 2 Stepper motor structure

Theoretically speaking, the driving method of the stepping motor can be realized only by changing the excitation of the stator coil by the cycle. However, since the motor has high requirements on the circuit driving capability, the system uses the external driving chip A3977, and the A3977 subdivision driver adopts high performance. A dedicated microstep computer control chip with a complete microstep motor driver with built-in converter. Simply input a pulse in one step to drive the motor for one step and determine the full, half, quarter, or 1/8 step mode through two logic inputs. Its internal synchronous rectification control circuit is used to improve the power consumption during pulse width modulation (PWM) operation, and the chip can automatically control its PWM operation in fast, slow and mixed attenuation modes. The driving chip is set to a full-step mode, which adopts a common negative connection method to enable, dir controls the direction, the step signal receives a pulse signal, the frequency of the signal determines the rotation speed, and the number of pulses controls the step distance of the motor. The overall hardware diagram of the system is shown in Figure 3. The host computer communicates the DSP after signal acquisition, so that the DSP generates the corresponding control signal and outputs it to the stepper motor driver A3977SED connected to the 42 motor to control the operation of the motor to complete the system control purpose.


Figure 3 system overall hardware diagram

3 system software design

The software design of this system is proposed from two aspects: 1 PWM pulse generation design, 2 stepper motor control mode design.

3.1 Generation of PWM pulse sequences

PWM is a very effective technique for controlling analog circuits using the digital output of a microprocessor. It is widely used in many fields from measurement and communication to power control and conversion. This system uses DSP to generate pulse sequence, DSP28335 has a total of 12 16-bit ePWM, which can perform frequency and duty cycle control. The PWM signal frequency is determined by the timing mode of the time base period register TBPDR and the time base counter. The counting mode used by the initialization program is the up counting mode. In the up counting mode, the time base counter increases from zero until the period register value (TBPDR) is reached, then the time base counter is reset to zero and begins to increment again.

The PWM signal period and frequency are calculated as follows:

ePWM clock

TBCLK=SYSCLKOUT/(HSPCLKDIV×

CLKDIV): (1)

Tpwm=(TBPRD+1)*Ttbclk:(2)

Fpwm=1/(Tpwm) (3)

The initial setup program flow chart is shown in Figure 4.


Figure 4 PWM initialization flow chart

3.2 Stepper motor control

The system is designed with manual and automatic control modes. The manual mode is mainly used in occasions where automation and control are not required. The stepping, acceleration and deceleration, forward and reverse rotation and start and stop of the motor are realized by buttons. The automatic mode is applied to working conditions requiring high degree of automation and control accuracy. For laboratory projects, the control mode adopted by this system is mainly automatic mode. After the upper computer is powered on, it starts to detect the output signal of the laboratory device (flow sensor), and compares it with two preset thresholds A and B (B>A). When the signal strength is zero, the motor pushes the sensor to high-speed cyclic scanning. At the scene until the signal strength is greater than the threshold A, the system determines that the coarse adjustment is successful. After that, the system enters the fine adjustment phase, the motor enters the low speed operation mode, and the sensor moves at a low speed until the signal strength is greater than or equal to the B intensity, and the system controls the motor to stop running. The control flow chart of the system is shown in Figure 5. In the system, the two signal thresholds designed for different working conditions provide the basis for setting the period register in the program design. Because the laboratory system has higher precision requirements, the initial value of the period register setting is larger, so that Fpwm The value is smaller and the motor speed is correspondingly lower. In this system, the EPWM2B port is used to output the PWM pulse, GPIO1 controls the motor rotation direction, and GPIO2 controls the motor start and stop.


Figure 5 system control program flow chart

4 system debugging analysis

4.1 PWM pulse modulation analysis

Figure 6 shows the pulse waveform output by the DSP and its corresponding parameters. The pulse frequency can be changed by modifying the parameter value, and the motor can be controlled by the point-to-output output of the DSP. Through the debugging analysis, the experimental purpose can be well realized, and the running state of the motor is continuously changed.


Figure 6 PWM pulse debugging

Outdoor Rental LED Display

Outdoor Rental LED Display is hot selling product in the led screen market. We usually use Nova MSD300 sending card and MRV328 receving card, other controll system also can be accepted, like Linsin,colorlight and so on.....About the led lamp, we use kinglight led lamp, IC is ICN2038S, refresh rate is 1920hz. We also provide other option if the client need higher quality, like Nationstar led lamp and refresh rate can make 3840hz. This 500x500mm LED display panel can also can make curved led display, ±15° flexible curved option.


Application:
* Business Organizations:
Supermarket, large-scale shopping malls, star-rated hotels, travel agencies
* Financial Organizations:
Banks, insurance companies, post offices, hospital, schools
* Public Places:
Subway, airports, stations, parks, exhibition halls, stadiums, museums, commercial buildings, meeting rooms
* Entertainments:

Movie theaters, clubs, stages.

Outdoor Rental LED Display,P3.91 Led Display,Led Advertising Display,Led Display Panel

Guangzhou Chengwen Photoelectric Technology co.,ltd , https://www.cwledpanel.com