The system uses the 16 bit ultra low power MSP430F1611 microcontroller produced by BRND company as the control core, and uses the high-precision angle sensor MPU6050 continuous feedback angle signal to compare with the system preset value. Thus output the corresponding PWM through the field effect transistor IRF3205 to drive about two groups of DC fans, thermostatic element adjust the fan speed. Then change the angle of the windshield_, and use LCD12864 to display the angle of the windshield and the running state of the system in real time.
By using digital matrix keys as man-machine interface, the operation is simple and the software adopts hierarchical and modular design method, which makes the complex mathematical model and control algorithm simplified and developed rapidly. The controller is mainly composed of main control module, display module, input module, angle sensor module, motor drive module and acoustooptic prompt module. The specific structure is shown in Figure 1. The main control MCU adopts the 16 bit ultra low power MSP430F1611MCU produced by the BRND company as the control core. The display part adopts LCM12864 display screen, which can display the angle of the wind panel in real time.
The feedback part adopts the high-precision angle sensor MPU6050, and the real-time control of the DC fan angle through the PWM technology. The drive circuit of DC fan is driven by MOSFET IRF3205. The core control chip uses MSP430F1611 produced by TI Company, which has abundant internal resources. On-chip resources are 48KBflash, 10240BRAM, 8-channel 12bitA/D, double 12bitD/A, DMA, 48 I/O ports, 16-bit WDT, 1 16-bit Timer_A (3 capture/comparison registers), 1 16-bit Timer_B (7 capture/comparison registers), 2 USART interfaces, 8-channel PWM, so that it can process calculation angle quickly and in real time. Degree signal and make corresponding judgments to make the system more stable and reliable.
The PWM port of MSP430F1611 is used to control IRF3205 field effect transistor directly. IRF3205 is controlled by software to control the speed of DC fan and form a closed-loop system to stabilize the angle of wind plate. The working current of IRF3205 field effect transistor can reach 110A, which can almost meet the driving current of all small motors. Angle sensor adopts MPU6050 three-axis accelerometer gyroscope. The sensor converts measuring angle into digital signal. It can communicate with single-chip computer through only two data lines. It is simple to use, small in size and easy to place.
It can meet the accuracy requirements of the subject. MPU6050 can feedback the angle of the windshield back to the single chip computer in real time. The single chip computer compares the angle calculated and converted with the preset angle of the system, and outputs the appropriate PWM wave to control IRF3205 to adjust the speed of the fan, so as to realize the real-time control of the angle, as shown in Figure 2.
Because the windshield is easily disturbed by external wind and friction of supporting device, the relationship between speed and duty cycle of PWM can not be obtained directly, so it is necessary to compare the feedback value of angle sensor with the pre-set value of the system before adjusting and controlling the PWM. In order to realize the real-time correspondence between the angle of the windshield and the setting angle in the control angle, the software adopts the method of look-up table and fine-tuning.
The specific method is to first power the system, record the left and right motor PWM corresponding to each angle of 45-135 degrees, then compare the preset angle with the recorded angle in the actual control, and then output the corresponding PWM value because of the external loop. The interference of environment and uncertain factors of system hardware will cause errors in actual output angle. Therefore, after the corresponding PWM wave is output from the system look-up table for a certain time, the feedback value of the angle sensor is compared with the preset value, then the duty cycle of the PWM wave is changed and the speed is fine-tuned, so that the measured value is equal to or closest to the set angle.
The design flow of angle control software is shown in Figure 3.