Automobile anti-theft alarm monitoring system based on single chip microcomputer design

Publisher:脑力驿站Latest update time:2015-07-27 Source: eechina Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Cars are becoming an indispensable part of people's lives. However, what worries car users is that the theft of vehicles is increasing year by year. This article aims to design a convenient, reliable and powerful car alarm. When the car encounters a dangerous situation, the alarm is immediately activated, and the corresponding information is sent to the designated mobile phone to notify the owner of the abnormal situation. The owner can monitor the situation in the car and control the car through the mobile phone to effectively prevent the car from being stolen. In addition, if an emergency button is added in the car, it can not only help the owner to seek help from the outside when he encounters robbery or other dangerous situations, but also help the police to locate the car. Considering the time and cost issues, this article only focuses on the detection of vibration information and the transmission and control of vehicle information. 

Vibration Information Detection

In Figure 1, when the object has an acceleration to the right, due to inertia, the distance between the middle baffle and the capacitor plate changes, resulting in a change in the capacitance value (there are also changes in capacitance by changing the area of ​​the capacitor plate). After a series of subsequent processing such as switching capacitors, unity gain amplification, and charge amplification circuits, a voltage signal proportional to the acceleration information can be obtained. The MMA7260QT acceleration sensor used in the system is based on the above principle. 







Traditional anti-theft alarms focus on the detection of instantaneous vibrations and impacts. Although they can identify situations where the car door is violently opened, they are very likely to cause false alarms (such as alarms caused by abnormal noises nearby). In response to the above problems, this paper has taken the following three improvement measures: 

(1) Added detection of the door opening action, and extracted the acceleration information when the door is opened as one of the bases for vehicle theft. 

(2) Appropriately selected the characteristic time when the door is violently opened, rather than simply relying on the acceleration peak crossing the boundary as the basis for vehicle theft. 

(3) Added measurement of the vehicle body tilt angle to prevent theft methods such as towing and whole vehicle transportation. The

transmission and control of vehicle information 

combines traditional anti-theft alarm technology with modern GSM digital mobile communication technology to realize vehicle status monitoring, dispatching, anti-theft alarm, anti-robbery alarm, remote control, tracking and positioning, and car phone functions. The system uses the TC35i GSM Modem module of SIEMENS, which can break through spatial limitations and transmit vehicle information to all parts of the world through the GSM network. Since the system requires the support of many functional modules, limited by time and cost, this paper only verifies the feasibility and practicality of the system through the following two points: 

(1) Send the current status of the vehicle to the designated mobile phone, requiring the ability to distinguish the source of information about the vehicle being stolen: door vibration, abnormal vehicle tilt angle, illegal entry, etc. 

(2) The mobile phone sends instructions to the GSM Modem module, requiring that only the set mobile phone number can obtain the control right of the system, and can distinguish different control instructions and execute them.

System Overview 

The system structure block diagram 

is shown in Figure 2: With the MC9S08QG8 microcontroller as the core, supplemented by MMA7260QT acceleration module, HOLUX GM-82 GPS module, TC35i GSM Modem module and other functional modules to achieve real-time monitoring of the car. The power supply part is planned to use the on-board battery as the main power supply; once the main power supply is cut off, it will switch to the built-in battery power supply and enter the energy-saving mode, which can work effectively for more than several months. 







System hardware 

MC9S08QG8 microcontroller and its peripheral circuits

This model of microcontroller is an 8-bit microcontroller promoted by Freescale. Its several built-in functions coincide with the requirements of the car anti-theft alarm system, so it is used as the system core.

The minimum system of the microcontroller uses the CT298 development board of Synhayato. The baseboard mainly consists of the following parts: microcontroller (MC9S08QG8), USB-mini B connector, power and reset switch, USB-COM converter (FT232R), BDM tool connector, input and output devices (button keys, LED lights, buzzer), MM-2860 socket, external expansion connection slot (grid pitch is 1mm, 16-pin flat cable connection slot) and test port. 

MMA7260QT acceleration module and its peripheral circuits 

The anti-theft system of modern cars usually uses the impact and vibration monitoring method of the car body for early warning, and the commonly used devices are mostly magnetic effect sensors. Due to some problems of the magnetic effect accelerometer itself, the subsequent signal processing circuit and microcontroller interface circuit will be complicated, resulting in reduced reliability of system alarm and high false alarm rate. In addition, the most effective way to deal with trailer or vehicle handling is to monitor the tilt angle of the vehicle body, but the magnetic effect sensor cannot measure static acceleration and cannot measure the tilt angle of the vehicle body. MMA7260QT is a single-chip integrated three-axis accelerometer designed and produced by Freescale. It can monitor the tiny vibration of the vehicle body and the tilt angle of the vehicle at the same time. Applying it to the car anti-theft system not only expands the monitoring range of the system, but also simplifies the system and improves the reliability of the anti-theft system alarm. The internal module structure of MMA7260Q is a measurement module that integrates three independent sensitive elements with mutually perpendicular measurement directions on a single chip. It is a capacitive accelerometer made by polysilicon micromachining surface technology; a plate of the capacitor is attached to the bottom of the mass block supported by the elastic structure on the surface of the silicon wafer, and the other plate of the capacitor is fixed. When the acceleration causes the relative position of the mass block to change, the capacitance value also changes, and then after passing through the capacitor voltage conversion circuit and the amplification and filtering circuit, a voltage signal proportional to the acceleration is output. 

TC35i GSM Modem Module

TC35i is a new generation of GSM communication module launched by Siemens. The TC35i wireless module is small in size, flexible in installation design, easy to integrate and low in power consumption. The module has an AT command set interface, supports short messages in text and PDU mode, Class II fax in the third group, and non-transparent modes of 2.4k, 4.8k, and 9.6k. The TC35i module is mainly composed of six parts: GSM baseband processor, GSM radio module, power supply module (ASIC), flash memory, ZIF connector, and antenna interface. As the core of TC35i, the baseband processor mainly processes voice and data signals in the GSM terminal, and covers all analog and digital functions in cellular radio equipment. Without the need for additional hardware circuits, it can support FR, HR and EFR voice channel coding.

Other auxiliary circuits 

In addition to the above main functional circuits, the system also includes some auxiliary circuits. They are mainly: 3.3V regulated power supply (the regulated power supply on the CT-298 development board provides limited current and cannot support the power supply of the entire system), which is composed of TI's TLV2217-33 LDO and some capacitors, and can provide 500mA of current; serial port level conversion circuit (convenient for connecting and communicating with TC35i), mainly composed of MAXIM's MAX3232, providing conversion between TTL level and 232C level; LED indicator drive circuit and key circuit, etc. 

System software 

The overall design idea of ​​system software 

The system mainly includes four working states: parking state, driving state, stolen state and robbed state. The single chip microcomputer first determines the parking state and driving state, which is mainly achieved by key identification technology. There are many types of key identification. This article envisions the use of radio frequency identification technology (RFID). Its basic principle is to use radio frequency to perform non-contact two-way communication to achieve the purpose of identification and exchange data. The radio frequency card and the card reader of the RFID system can complete the identification without contact. By reading and writing the RFID card, it can realize the automatic identification and management of various objects or equipment (people, items) in different states (moving, stationary or harsh environment). The RFID card can store 128 bytes of data. The first 4 bytes are the ID number. The ID number is unique in the world and can be used as the owner's identity identification mark. The remaining bytes can be used to store some auxiliary verification information. 

In the parking mode, the single chip will detect whether the vibration information, tilt information, door information, ignition information, and personnel information are normal in turn. The system will combine the above information to determine the vehicle status. If the conclusion is that the vehicle is stolen, the system enters the stolen mode. The system will first send the information to the owner, and then hand over the control to the owner. The owner can query the location of the vehicle, the information of the people in the car, and can also start a high-decibel sound and light alarm, shut down the engine, cut off the oil and power, etc. If the conclusion is that the vehicle is normal, the system returns to the starting state and cycles again. In driving mode, the system will continuously query whether the emergency button is pressed. Once the emergency button is pressed, the vehicle will enter the robbery mode. The system will first send the information to the designated mobile phone number (such as the owner's friend), and then hand over the control to the control center (through the designated mobile phone number), and the control center can also perform the above control operations.







Extraction and discrimination of vibration and inclination information 

As can be seen from the above, we need to extract the following three types of information from the acceleration information: body vibration when picking the lock, acceleration signal when the door is opened, and vehicle inclination change. Their waveforms are shown in Figure 3. Under normal circumstances, as shown in the stable area in the figure, the acceleration in the three directions of X, Y, and Z is basically unchanged (but there is a slight disturbance). When someone picks the lock, the acceleration value will experience a process of reduced amplitude oscillation, and the oscillation period is very short, only a dozen milliseconds. During the door opening process, the acceleration value will change greatly and last for a long time, up to hundreds of milliseconds. [page]

Through analysis, we can find that the acceleration values ​​when the lock is picked and the door is opened are related to the speed of acceleration change, and are more suitable to be expressed by difference; the change in inclination is only related to the magnitude of the change in the acceleration value, but has nothing to do with the speed of change, and can be directly expressed by the current acceleration. In response to the false alarms caused by sound wave vibration, this article adopts two methods: Since the frequency of sound wave vibration is much higher than the frequency of lock picking vibration, most of it can be filtered out by appropriately reducing the sampling frequency of ADC. The sampling frequency of the system is 1000Hz; a weighted average of several adjacent differential values, which is equivalent to the effect of low-pass filtering, can also filter out the vibration caused by sound waves. The system adopts a 3-item weighted average. Assuming that the value after ADC sampling and quantization 

is A=a(1)+…+a(i-1)+a(i)+a(i+1)+… and 

the weighting coefficients are M1, M2, and M3, the formula for weighted average processing is 

b(i)=[M1*a(i-1)+M2*a(i)+M3*a(i+1)]/(M1+M2+M3). 

The detection of the inclination angle is obtained by subtracting the current acceleration value from the acceleration value in the steady state. Assuming the initial acceleration value is a(0), when the absolute value of a(i)-a(0) is greater than the set value, it can be considered that the inclination angle changes beyond the standard and the alarm is activated. Part of the ADC initialization program is as follows: 













Transmission and control of vehicle information 

The transmission and control of vehicle information mainly rely on the TC35i GSM Modem module of Siemens. The microcontroller writes AT commands to TC35i through the serial port to achieve the purpose of information transmission and reception.

The main program for the microcontroller to control TC35i to send and receive information is as follows: 











MC9S08QG8 microcontroller programming precautions 

MC9S08QG8 microcontroller is different from the general 51 microcontroller. There are some points worth noting when programming, which are listed as follows: 

1) SOPT1 register writing problem: SOPT1 is a single-write register and can only be written once after each reset. Therefore, each bit of it must be written once, and cannot be written multiple times. For example, the following statement

The microcontroller only considers the first instruction to be valid, and the subsequent statements are invalid. This causes the external interrupt reset pin to be available, but the watchdog timer cannot be turned off. It should be written in the following form 

2) The ICS Trim Register (ICSTRM) register must be set in the chip's internal oscillation state. This register is used to adjust the clock frequency of the internal oscillator. Because the internal oscillator is made using semiconductor technology, the oscillation frequency of different chips will have deviations, and the Trim register is used to adjust this deviation. The adjustment value is generally written in a fixed position on the chip when it leaves the factory and can be used directly. However, during BDM debugging, the clock frequency will be adjusted according to the set frequency (which may be different from the initial value after power-on reset), which will cause a slight change in the clock frequency. As a result, the clock frequency in the BDM debugging state is different from that after power-off reset, causing inaccurate baud rate during SCI communication.
Reference address:Automobile anti-theft alarm monitoring system based on single chip microcomputer design

Previous article:Design of a wireless low-power geomagnetic vehicle detection sensor
Next article:Tire Pressure Monitoring System Global Solution

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号