Design and optimization of windshield angle control system based on STC12C5A60S2

Publisher:星辰小鹿Latest update time:2018-03-23 Source: eefocusKeywords:STC12C5A60S2 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

     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.


a.JPG

    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:

   b.JPG


    3.  Circuit system configuration

    The main circuit block diagram of the windshield control system is shown in Figure 2.

c.JPG




    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.

d.JPG


    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.

e.JPG

      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.f.JPG


    4. Testing and Result Analysis

    4.1 Manual windshield angle data

    The manual wind shield angle data is shown in Table 1.

g.JPG

 


    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.

Keywords:STC12C5A60S2 Reference address:Design and optimization of windshield angle control system based on STC12C5A60S2

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

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号