1 System solution description
According to the requirements, this system consists of six modules: single-chip microcomputer minimum system, human-computer interaction module, fan control module, angle detection module, sound and light alarm module, and system power supply. The specific block diagram is shown in Figure 1.
1.1 Microprocessor module
The STC12C5A60S2 microcontroller from STC is used as the microprocessor.
This microcontroller is an enhanced 51 microcontroller with the characteristics of high speed, low power consumption and super strong anti-interference. It integrates MAX810 dedicated reset circuit, 2-way PWM, and 8-way high-speed 10-bit A/D converter (speed up to 250,000 times/second), which is very consistent with the system requirements.
1.2 Angle detection module
The MMA7361 acceleration angle sensor is used to measure the angle. The acceleration angle sensor calculates the inclination angle of the device relative to a certain plane by measuring the acceleration caused by gravity. The angle sensor is sensitive, the output data is accurate and the price is moderate. There are three types of angle measurement using acceleration sensors: single-axis inclination measurement, dual-axis inclination measurement and three-axis inclination measurement. In this design, since only the angle between the sailboard and the vertical direction is measured, single-axis inclination measurement is selected. The principle of single-axis inclination measurement is shown in Figure 2. A single axis (i.e., the x-axis) rotates through gravity.
[page]
Since this method only uses a single axis and requires a gravity vector, the calculated inclination angle can only be accurate when the device has a specific direction and the x-axis is always in the center plane. According to basic trigonometric principles, the projection of the gravity vector on the x-axis will produce an output acceleration equal to the sine of the angle between the x-axis of the accelerometer and the horizontal line. The horizontal line is usually a plane perpendicular to the gravity vector. When the gravity is an ideal value of 1 g, the output acceleration is:
AX. OUT[g]=lgxsin(φ)
In actual use, referring to the technical manual of the sensor MMA7361 used and the principle of measuring angles using an accelerometer, the relationship between the output voltage and the measured angle is:
Wherein, VOUT represents the output voltage of the accelerometer, VOFFSET represents the offset of the accelerometer when the gravity acceleration is 0 g,
represents the sensitivity of the accelerometer, 1 g represents the gravity acceleration on the earth, and θ represents the deflection angle.
Therefore, the angle value can be obtained as follows:
The angle detection circuit diagram is shown in Figure 3. The angle detection module outputs the angle analog quantity, which is converted by the single-chip AD and calculated by the above formula to obtain the measured angle value.
[page]
1.3 Fan Control Module
PWM (Pulse Width Modulation) is a method of digitally encoding analog signal levels. It is a very effective technology for controlling analog circuits using the digital output of a microprocessor. Compared with the voltage speed control method, PWM speed control has the advantages of high precision and easy control. At the same time, the selected microcontroller integrates a PCA module, which can directly output PWM and is convenient to use.
This system uses a DC motor to drive the fan to rotate. The motor driver chip MC33886 is a monolithic integrated H-bridge component, which is suitable for driving low-power DC motors. This circuit selects the full-bridge working mode of MC33886. When using a single chip, the temperature of the drive circuit will be very high. Sometimes the temperature will exceed the maximum temperature of the MC33886 self-protection, causing the drive to stop working. In order to solve this problem, two identical MC33886s are connected in parallel, and it is found that the temperature is effectively controlled and the driving ability of the circuit is further improved. The circuit is shown in Figure 4.
In order to accurately control the fan speed and achieve the purpose of controlling the angle of the sailboard, the system uses the single-chip microcomputer to obtain the actual angle of the sailboard through the angle detection module, compares it with the preset angle, and outputs an adjustable PWM signal through the PI controller to drive the DC motor to rotate, thereby forming a wind speed closed-loop control system, that is, negative feedback control. The block diagram of the motor speed control module is shown in Figure 5.
[page]
2 System software design
The system software is mainly completed by the main program and various subroutines. In the main program module, it is necessary to complete the initialization of various parameters and interfaces, PCA module initialization, LCD screen initialization, angle acquisition, keyboard scanning, main loop and other tasks. The main program flow chart is shown in Figure 6(a). In the fan speed control, this system adopts the incremental PI algorithm, and the specific flow chart is shown in Figure 6(b).
3 Conclusions
The windsurfing control system designed in this paper can well complete the windsurfing angle measurement and control tasks. Among them, the STC12C5A60S2 single-chip microcomputer is very suitable for vocational college students to learn single-chip microcomputers. At the same time, the angle closed-loop PID control system of the system can quickly and accurately adjust the angle. The whole system runs stably, the human-computer interaction interface is friendly, and the number of devices used is small, the circuit is simple, and the cost performance is high.
Previous article:Features and Applications of USB2.0 Controller CY7C68013
Next article:Single-chip DSP controller solution
Recommended ReadingLatest update time:2024-11-17 00:02
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
- Intelligent Control Technology of Permanent Magnet Synchronous Motor (Written by Wang Jun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- ECG display based on ST
- TMS320C66x study notes on algorithm operation time measurement
- TI revolutionizes car access with Bluetooth low energy technology
- [GD32L233C-START Review] Serial communication function test and program analysis
- Qorvo PAC Series Chips in High-Speed DC Motor Control
- Today at 14:00 | ST Award-winning Live Broadcast "ST60 Contactless Connector and Application Exploration"
- TI engineers share how to easily solve the overheating problem caused by overloading of power banks
- Some controversial PCB layout rules of thumb
- Help on using Darlington tube
- FPGA Implementation of Selected Area Capture of DVI Output Image