Integrated design and application of automobile protection system based on AT89C52

Publisher:JoyfulHeartedLatest update time:2012-11-20 Source: 电子技术 Keywords:AT89C52 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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]

The frequency of ultrasonic wave is 40kHz, mechanical wave, through calculation, the period of ultrasonic wave can be calculated. The period of ultrasonic wave is:
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.

Keywords:AT89C52 Reference address:Integrated design and application of automobile protection system based on AT89C52

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

Design of Multi-ultrasonic Signal Fusion Processing System Based on AT89C52 Single Chip Microcomputer
1 Introduction In the ultrasonic ranging navigation system of mobile robots, a single ultrasonic sensor is difficult to complete the comprehensive detection of the environment due to its inherent deficiencies such as the emission angle. Therefore, in practice, a large number of ultrasonic sensor array
[Microcontroller]
Design of Multi-ultrasonic Signal Fusion Processing System Based on AT89C52 Single Chip Microcomputer
Design of intelligent traffic light using AT89C52 microcontroller
introduction With the increasing number of cars in cities, the problem of urban traffic congestion is gradually attracting people's attention. Traffic lights are an important tool for the traffic control department to manage urban traffic. At present, the time of most traffic lights is set. Regardless of the traffic p
[Microcontroller]
Design of intelligent traffic light using AT89C52 microcontroller
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号