Application of screw air compressor in high dust environment

Design of embedded DC motor PWM speed control system based on ARM Yang Xuecun, etc. In the design of acceleration and deceleration program, firstly, the speed measurement subroutine is called, then the PID algorithm subroutine is called, and the system is set according to the PID algorithm. speed.

In this design, the speed measuring module uses a method of detecting the low level in a certain period of time to calculate the speed, that is, using an external interrupt to calculate the number of times the Hall switch outputs an effective signal, and simultaneously starts the timer, using the timer to interrupt in a fixed time, according to Huo The number of times the switch outputs a valid signal calculates the speed of the DC motor.

When the Hall switch outputs a valid signal, that is, the low level, the external interrupt responds, the program enters the external interrupt subroutine, the number of valid signals of the Hall output is incremented by 1, and then the program clears the external interrupt flag and returns to the main function. In the design, the timer interrupt has higher priority than the external interrupt. The timer interrupt will respond once in the defined time. Calculate the speed value and clear the low level counted in the previous period and clear the interrupt flag. This design timer generates an interrupt for 40ms, and calculates the rotation speed according to the number of effective levels of the Hall element output within 40ms: speed = Hall element output active level number x25. Pulse width modulation (PWM) refers to pulse width modulation (PWM) The pulse width of the pulse train is changed according to a certain rule to adjust a modulation mode of the output amount and the waveform. That is, the basic period of the output signal is fixed, and the output power is controlled by adjusting the size of the duty cycle in the basic period. The LPC2131's PWM function is built on a standard timer. It has a 32-bit timer and prescaler control circuit and 7 matching registers. It can realize 6 single-sided PWM or 3 bilateral PWM outputs. These 2 types of mixed output.

The way to realize the closed loop of the design speed is to compare the speed difference between the real-time measured speed value and the speed value corresponding to the given duty ratio by the PID adjustment algorithm to control the output amount, and finally reach the speed stability. The overall working process is as shown.

The button speed has a total of 10 gears, corresponding to 10 PWM duty cycles. First, the PWM duty ratio is converted into a corresponding speed, that is, a given speed, and the speed error is obtained by making a difference from the measured speed, that is, the actual speed value. Using the incremental PID algorithm err current error; erri last error; err2 - error value before eni; KP * proportional coefficient; K, * integral constant; Klt * differential constant.

The obtained incremental value is added to the last actual speed to obtain the control amount, and the obtained control amount is the speed value, and the PWM speed directly controls the duty ratio, so the speed needs to be converted into the corresponding duty ratio. It is latched and output to the driver module. In addition, the operation of saving the error is performed at the end of the program to perform the next PID adjustment algorithm as shown.

PID adjustment algorithm flow system debugging results Through the joint debugging of software and hardware, the system can realize the following functions: the motor can be controlled by pressing the button; the speed can be measured and displayed; and the PID speed closed loop can be realized. The system has good activity and low cost, which provides an effective way for the realization of DC motor speed control system.

Sheetmetal Parts

Custom Stainless Steel Parts Welding Bending,Aluminium Sheet Metal,High Precision Welding Service Custom Stainless Steel Parts Welding Bending,,Metal Brass Aluminum Laser Cutting,Stamping Services Sheet Metal Fabrication

Our company has always had strict quality control standards in the market of refrigeration and heat exchange equipment, focusing on providing customised services to our customers. Not only do we have high requirements for the selection of raw materials, but we also keep up to date with the latest production processes and have high testing standards.



Our company mainly produces products for:Fin Evaporator.Fin Type Condenser.Capillary Tube. Coolant Reservoir.Plate Reinforcement Parts.Stamped Parts. Aluminum Tube .Instrument Testing Equipment.

If you have any interest, please feel free to contact us. We can provide customized service according to your drawings or samples.

Plate Reinforcement Parts,Oem Cnc Milling,Cnc Machinery Parts,Rapid Prototyping Cnc Machining

Xinxiang Yukun Refrigeration Technology Co.Ltd , https://www.yukunevaporator.com