In order to realize the angle control of the windshield, a design scheme is proposed with enhanced single-chip microcomputer STC12C5A60S2 as the main control circuit, 3.0-inch TFT color screen as the display unit, and the analog signal collected by the MMA7260Q acceleration sensor converted into a digital angle signal by a 12-bit A/D converter TLC2543CN. The single-chip microcomputer processes the signal, and the display screen displays the real-time angle and PID adjustment to control the angle of the windshield. The experimental results show that the system has high accuracy and can be automatically corrected to meet the design requirements.
The windshield control system adjusts the wind force and changes the windshield angle θ by controlling the fan speed. The display range is 0-60°, the resolution is 2°, and the absolute error is not more than 5°. When the spacing d=10 cm, the wind force is controlled by operating the keyboard to control the windshield angle θ. The control process is required to be completed within 10 s, as shown in Figure 1.
1. Determination of the plan
The windshield control system is mainly composed of a single-chip microcomputer control and display module, an angle information acquisition module, a motor drive module, an A/D sampling module, a power supply module, etc.
1) Angle information acquisition module: The photoelectric tube has low measurement resolution, cumbersome work and high process requirements; the potentiometer measures the angle and is easy to reset to zero, but the accuracy is not high enough, the adjustment is difficult, and the temperature drift is large. The MMA7260Q-3-axis small-range acceleration sensor has low power consumption, low noise, high resolution and high precision, and can be adjusted at multiple angles.
2) Motor drive module: NEC's motor control ASSP chip MMC-1 is used in combination with 1298N. MMC-1 is a multi-channel two-phase four-wire stepper motor /DC motor control chip, which is implemented based on NEC Electronics' 16-bit general-purpose MCU with a dedicated program. It can extend the dedicated motor control function of the main control MCU through VART or SOI serial, and can realize the forward and reverse control of the DC motor and 256 speed control. It also has an overcurrent detection function, an operating current of 2 A, and can drive two DC motors or one stepper motor at the same time.
3) A/D sampling module uses TLC2543CN to convert the analog quantity of angle information into digital signal. TLC2543CN is TI's 12-bit serial analog-to-digital converter. It uses switched capacitor successive approximation technology to complete the A/D conversion process, and its serial port input can save 51 series microcontroller I/O resources, with extremely high cost performance and resolution.
4) Selection of control system STC12C5A60S2 is used as the main controller. The STC series microcontroller is a single-clock, machine cycle (IT) microcontroller produced by Red Star Technology. It is a new generation of 8051 microcontroller with high speed, low power consumption and super anti-interference. The instruction code is fully compatible with the traditional 8051 and has built-in A/D PWM .
5) Display module selection: TFT color screen is used for angle display. The color screen has stable performance and high unit resolution. It can display text and graphics. The picture is vivid and the human-computer interface is friendly.
2 Analysis and calculation
This design can realize the acquisition and real-time display of angles, and display the angle value on the TFT color screen. The sensor collects angle information and performs PID calculation through the single-chip microcomputer. The MMA7260 Q-3 axis small-range acceleration sensor is used to collect angle information, and the analog signal is converted into a digital signal through the 12-bit A/D converter TLC2543CN. After calculation, the angle value is displayed on the TFT. When the collected angle information does not match the preset value, the single-chip machine will perform PID calculation, control the motor to adjust the wind speed, and then adjust the angle of the windshield.
Angle calculation:
3. Circuit system configuration
The main circuit block diagram of the windshield control system is shown in Figure 2.
3.1 Angle information collection and information processing system composition
The circuit diagram of the angle information acquisition and information processing system is shown in Figure 3. It consists of an angle signal acquisition circuit and an A/D sampling circuit. The MMA72600 acceleration sensor and an external shielded wire are used to detect the rotation angle of the windshield, and then the A/D converter TLC-2543CN completes the signal conversion. The shielded wire avoids the interference of the coil in the motor, and the bandgap precision voltage source MC1403 provides a 2.5 V reference voltage to improve the resolution of the system.
3.2 Motor drive circuit
The schematic diagram of the motor drive circuit is shown in Figure 4. The driver chip L298N is used as the main control chip for the drive motor, the 7805 voltage regulator is used to provide +5 V voltage, the optical coupler isolates the input and output signals, and the shielded wire avoids the interference of the coil in the motor to improve the accuracy of angle measurement.
3.3 Control and display circuit
The control and display circuit principle is shown in Figure 5.
3.4 Power supply
The schematic diagram of the power supply system circuit is shown in Figure 6. The power supply consists of a voltage conversion part, a filtering part, and a voltage stabilization part. It provides +5 V, +12 V, and +3.3 V voltages for the entire system to ensure stable operation of the circuit.
4. Testing and Result Analysis
4.1 Manual windshield angle data
The manual wind shield angle data is shown in Table 1.
4.2 Setting the windshield angle data
The data for setting the windshield angle are shown in Table 2.
Result analysis:
The accuracy of manual windshield angle measurement is 100%, the absolute error of preset windshield angle measurement is less than 5°, and the completion time is within 10s.
5 Improvements and Optimization
Since the system uses high-precision angle sensors to collect angle information, the wind shield swings too much during angle measurement and is not stable enough. On the premise of meeting the circuit performance indicators, we try to select devices with slightly lower precision and further optimize the circuit design.
6 Conclusion
This solution can make automatic corrections by comparing preset parameters with collected feedback parameters, and is a high-precision windshield angle control system.
Previous article:Experimental study on the irradiation effect of transient electromagnetic pulse on single chip microcomputer and research on its reinforcement method
Next article:BASCOM-8051 development environment single chip microcomputer programming system based on BASIC language
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- SensorTile.Box becomes bricked after firmware upgrade
- Window Comparator
- [GD32L233C-START Review] Part 2 Compilation, Software Development Environment Review
- Stuck inexplicably
- Realization of Chinese Characters and Graphics Overlay Based on DSP
- Please recommend, is there any domestic dual-channel H-bridge that can drive motors with an operating voltage of 12V or above?
- How to install and use pressure transmitter
- The flashing prompt cannot recognize the device. What's going on?
- Model-Based Design and Its Embedded Implementation
- Q&A on Connectivity: Why Wi-Fi 6 Could Be Your Competitive Advantage