0 Introduction
In the context of the international financial crisis, especially in the fiercely competitive automotive industry, improving the technology of China's automotive electronic products and reducing the price of products are very important to reduce the cost of the whole vehicle. The integration of automobile protection systems is an unstoppable trend. The AT89C52 microcontroller with reliable system performance, low cost, flexible and simple software design, rich hardware interface functions, good expansibility and strong versatility has been used to develop keyboards, LCD displays, multi-channel vibration collection, etc., combining many automobile protection systems such as automobile reversing safety distance reminder, automobile wireless remote control anti-theft alarm, automobile power lock encryption, automobile driving monitoring of the distance of the rear vehicle, etc., to implement comprehensive monitoring of the driving environment, and centrally compare and analyze various data. In this way, the integrated active and passive systems can achieve stronger safety performance and protect the safety of vehicles, passengers and even pedestrians to the greatest extent. Its value far exceeds that of independent and unrelated protection systems.
1 Functions and design requirements of automobile protection system
1.1 Design requirements of automobile protection system Design
an automobile protection system that can monitor the distance status of the vehicle behind while driving; when reversing, there can be a reminder of the reversing safety distance; when leaving the vehicle, there can be dual protection functions of power lock encryption and wireless remote control anti-theft alarm.
1.2 Performance indicators of automobile protection system design
(1) Measurement distance: All measurement ranges are within 10 m;
(2) Measurement accuracy: reversing safety distance is within 1 cm; driving distance measurement is within 0.1 m;
(3) Use a 7-segment digital display tube to display the reversing safety distance setting value, and display the distance measurement change value when measuring the distance while driving;
(4) The control panel consists of a 4×4 keyboard, and each function operation has an indicator light or a 7-segment digital display tube prompt.
1.3 Overall planning of the automobile protection system
Figure 1 Framework diagram of the automobile protection system
2 Optimization and design of key hardware of automobile protection integrated system
2.1 Design of distance measurement
The propagation speed of infrared rays is relatively fast, and the calculation requirements of propagation time are relatively high. Since the measurement distance in this design is only within 10m. Therefore, the ultrasonic measurement technology can be used to measure the distance to meet the design requirements, as shown in Figures 2 and 3.
[page]
2.2 Design of voice reminder
The voice reminder is composed of HFC5212 voice chip, with an operating voltage of 3~6V. The language integrated circuit HFC5212 stores the language signal of "beep, please pay attention" and adopts level and non-hold triggering mode. Its highest operating voltage is not higher than 5V. For this reason, the circuit provides 5V voltage from the I/O port of the microcontroller. R8 is its oscillating resistor. Changing its resistance value can change the tone of the voice. The trigger end of HFC5212 is II pin connected to the I/O port of the microcontroller. In this way, once the microcontroller outputs a high potential, it will be quickly triggered and sound. If the microcontroller always outputs a high potential, HFC5212 will always be triggered to sound. The voice signal it outputs is amplified by Q1, driving the speaker to emit a reminder voice of "beep, please pay attention", thereby improving the awareness of prevention. The reversing voice reminder circuit is shown in Figure 4.
2.3 Design of vibration sensor module
The vibration sensor adopts Z02B high-sensitivity vibration sensor module. The working voltage of Z02B is DC 2.66 V (typical application 3 V, limit 12 V). Since the output amplitude of the module is the module terminal voltage, it can reach the trigger voltage of the digital module, so it is connected to the I/O port of the microcontroller through the NAND gate when used. When testing the vibration sensor module, the module output capacity can directly drive an LED light-emitting tube. The module output state can be observed through the light-emitting tube, and a multimeter cannot be used to test whether there is an output. When installing, the copper surface of the module needs to be close to the object. The sensor has extremely high sensitivity and can detect extremely weak vibration waves; it has high impact resistance and can withstand strong vibration working conditions that similar sensors cannot withstand; it has good waterproof performance and can adapt to working environments with high humidity. Therefore, Z02B is very suitable for vibration signal collection for car anti-theft, and is installed in some vibration-sensitive places such as car doors and windows, and trunk lids. The vibration sensor circuit is shown in Figure 5.
2.4 Anti-theft alarm module design
The TDC1808/TDC1809 used for anti-theft alarm transmission and reception is a wireless remote control transmission and reception component. They use built-in antennas and can transmit digital signals or analog signals. They are suitable for various wireless remote control devices and have the characteristics of small size, long remote control distance, and strong anti-interference ability. Encoding and decoding use VD5026/VD5027 special encoder and decoder. The anti-theft alarm transmission and reception circuit is shown in Figure 6 and Figure 7.
The anti-theft alarm voice uses the KD9561 voice chip, which stores four voice functions. Different connections to its function pins will make it emit different voices. In this design, the police car voice alarm is selected. In addition, the LM386 chip is used to amplify the voice. The low-power integrated amplifier circuit made of LM386 amplifies the signal output power to drive the speaker. The anti-theft alarm voice circuit is shown in Figure 8.
3. Analysis and design of software program
3.1 Algorithm design of ultrasonic distance measurement
The principle of ultrasonic distance measurement is that an ultrasonic signal emitted by the ultrasonic generator T is reflected back when it encounters the object to be measured and is received by the ultrasonic receiver R. In this way, as long as the time taken from emitting the signal to receiving the return signal is calculated, the distance between the ultrasonic generator and the reflecting object can be calculated.
Distance calculation formula: s=d/2=(v×t)/2. s is the distance between the object to be measured and the rangefinder, d is the round-trip distance of the ultrasonic wave, v is the speed of sound, and t is the time taken for the ultrasonic wave to go back and forth. [page]
T=1/(40×1000)s=0.000025s=0.025ms
In AT89C52 single chip microcomputer, when timer T0 is selected, working mode 2 timing can automatically reload the time value, then the initial value of the time constant of timing is x=256-t(fosc/12), t is the timing time, the unit is μs; fosc is the crystal frequency used by the system.
T0 initialization assignment:
(Since 1 2.5 is rounded off, the value is 1 3, so the actual frequency is only 38.462 kHz)
3.2 Design of power lock software encryption
In PC, software encryption usually adds some algorithm to the data, which is more than enough for PC with powerful computing function. But for single-chip microcomputer, overly complex algorithm will greatly reduce the speed of single-chip microcomputer and occupy a lot of storage space. Therefore, in this design, power lock encryption adopts a data comparison method. Using C language to define two arrays of global variables is equivalent to opening up two specific data spaces in memory, one for storing passwords and the other for storing passwords entered by users, and then verifying passwords by comparing data, which can greatly improve the computing speed and reduce the storage space occupied. The schematic diagram of password comparison storage and setting is shown in Figure 9.
3.3 Design of key prompt sound
The key prompt sound drives the buzzer through the microcontroller outputting a certain frequency signal, so that the buzzer makes a sound. The frequency of its sound is shown in Table 1.
The system uses a mid-frequency "Do" tone with a frequency of 523Hz, and its period is:
T=1/f=1/523Hz=1912μs.
Because to make the buzzer sound, it is only necessary to change the state of its signal within half a period, so the actual time to power the buzzer is only T\'=T/2=956μs.
3.4 Program flow chart
AT89C52 is used to implement the four major functions of car reversing safety distance reminder, car wireless remote control anti-theft alarm, car power lock encryption, and car driving monitoring of the distance of the rear vehicle. The program is mainly divided into the main program module, password lock program module, reversing setting program module, driving distance measurement program module and password setting program module. Use C language to design the microcontroller program, and adopt the structured program design idea: use the "top-down" method in the overall design, and use modular programming in the program design. The specific programming is based on the following program flow chart:
4 Conclusions
This integrated system was applied to the Geely King Kong JL7152U CX MT modified experimental vehicle and the following experimental data were obtained:
The following conclusions can be drawn from the above experimental data analysis:
(1) This system implements comprehensive monitoring of the driving environment. The AT89C52 single-chip microcomputer can centrally compare and analyze various data, thereby achieving a high degree of integration of active and passive safety systems.
(2) The design of the program in the system core has good "affinity" and can modify its parameters according to different driving environments. The reliability of the system reached 99% in 250 full-scale functional tests, and the components used to develop this system are low-priced, so the system has a high cost-effectiveness.
(3) Through the AT89C52 single-chip microcomputer interface and memory expansion, the system has good scalability.
Previous article:Design of Aircraft Electrical Box Tester Based on AT89S52
Next article:Development of a Visual Electronic Stethoscope Based on AT89S52
Recommended ReadingLatest update time:2024-11-16 17:41
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 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
- 【RPi PICO】Flashing light
- LED life issues
- How big is the driving capability of the DSP chip?
- Analysis and solution of temperature rise factors of CITIC Hua circuit board
- MSP430AFE235
- [RVB2601 Creative Application Development] Three-in-one OLED display for calendar, time, temperature and humidity
- GD32E103 eval board download error
- EEWORLD University - Brushless Motor Tutorial
- Introduction to FPGA design process and tool software
- EEWORLD University----[High Precision Laboratory] Interface: RS-485