datasheets.com EBN.com EDN.com EETimes.com Embedded.com PlanetAnalog.com TechOnline.com   UBM Tech
UBM Tech

SMS for automobile security system developers

By Ankur Verma - October 7, 2008

Automobile theft is a major menace faced by millions of automobile owners around the world. Though there are existing securities systems (See References 1 and 2) but they have some loopholes like very limited range (500-800m) to alert the automobile owner about his automobile theft and also it is not possible to track the stolen automobile with the existing devices. Tracking devices based on GPS are available, but they are costly. So there arises the need of a system that has an ideally infinite range of theft alert and simultaneously provides the automobile owner with some real control options after his automobile has been stolen.

For tackling above problems, Short Message Service (SMS), provided by almost all the GSM operators is being used for making SMS-based Security System (SMSSS) which gives wireless control over the automobile for a vast area, limited only by the non-availability of GSM signals. SMS stands for Short Message Service, a technology that enables the sending and receiving of messages between mobile phones. There are many potential uses for SMS messages in today's information age; the scope of SMS applications is limited only by people's imaginations. A lot of innovative applications are now built on top of the SMS technology and more are being developed.

System overview

SMSSS is installed in the automobile which has to be guarded against theft. As soon any door of the automobile is opened, a SMS is sent to the automobile owner, alerting him of 'theft attempt' on his automobile. Upon the reception of this message, automobile owner replies with a SMS containing a password to 'Immobilize' the stolen automobile. After authenticating the password, SMSSS cuts off the automobile's ignition and also informs the automobile owner about the exact location of the automobile by an SMS containing exact location information. Also, the automobile owner can track his stolen automobile by sending a SMS containing a password seeking location information. SMSSS then replies with the SMS containing location information. shows the SMSSS Block Diagram. GSM mobile phone is being interfaced with AVR microcontroller circuit via Serial Communications port. GSM phone is controlled by sending AT commands from the microcontroller.

GSM modem and its interfacing

SMSSS uses GSM Modem for sending SMS (Intrusion warnings) and receiving SMS (Turning off the ignition) from owner. It is interfaced to the automobile via a microcontroller circuitry. A GSM/GPRS modem is a wireless modem that works with GSM/GPRS wireless networks. A GSM AT Compliant mobile phone can be considered as "GSM Phone with inbulit modem". There is not much difference between mobile phones and GSM modems in terms of SMS transmission rate, since the determining factor for the SMS transmission rate is the wireless network. After connecting a mobile phone or GSM/GPRS modem to a microcontroller, it is controlled by sending instructions to it which are called AT (Attention) commands. Table 1 lists the AT commands that are used in SMSSS. There are two ways of sending SMS messages: by text mode and by PDU (Protocol Description Unit) mode. If text mode is used, the application is limited by the set of preset encoding options. If PDU mode is used, any encoding can be implemented. SMSSS employs PDU mode for sending and receiving messages. and Table 2 show how to check which mode is supported by your mobile phone or GSM/GPRS Modem. and Table 3 show a simple example that shows the response of the AT commands used in the HyperTerminal program to send an SMS message in PDU mode.

Understanding PDU structure of outgoing SMS

Table 4 describes SMS PDU structure of a sample message:
PDU: 0011000C9119497198932300000B05E8329BFD06

Understanding PDU structure of incoming SMS

Table 5 describes SMS PDU structure of a sample incoming message:
PDU: 0791198986919949240C911949719198230000703022514001000DC8329BFD06

Microcontroller and its interfacing circuit

ATmega8 microcontroller (See Reference 3) is used in SMSSS. It receives an input from the automobile door circuitry connected to Pin0 of Port C which calls an interrupt subroutine for sending an alert SMS to automobile owner using GSM modem connected to Pin0(Rx) and 1(Tx) of Port D. It also triggers Pin0 of Port B connected to the relay of immobilization automobile circuitry after receiving immobilize SMS from owner.

For the above Interfacing, the following initializations are required:

  • Initializing UART of AT Mega 8

The various USART registers required to be initialized are:

a.       USART Control and Status Register B : It is initially set to 00011000 for Enabling Receiver & Transmitter

b.      USART Control and Status Register C : It is initially set to 10000110 for setting the USART in asynchronous mode with no parity bit, one stop bit & 8 data bits.

c.       USART BAUD RATE REGISTERS -- UBRRL is set to 51 and UBRRH is set to 0. Baud rate is thus set to 9600bps.

  • Other Initialization

1.      MCU Control Register: It is initially set to 00000000. Interrupt is generated on low level at INT0 pin.

2.      General Interrupt Control Register – GICR : It is initially set to 01000000 for

                                                   i.      Enabling Interrupt on INT0

3.      Stack pointers (SPL & SPH) are also initialized to RAM END.

System description (See )

1.      As soon as the automobile door is opened interrupt pin PD2 (INT0) of the microcontroller goes from high to low.

2.      The interrupt routine starts executing and sends pre-stored data using the command "AT+CMSS=1," to the GSM phone connected to the serial port of the microcontroller.

3.      On receiving the above data via the serial port, the GSM phone accesses the message content + number to which SMS has to be sent + various other parameters stored in an encoded form in the Phone/GSM Modem memory at location 1 and sends the corresponding SMS to the automobile owner's mobile phone via the GSM network.

4.      The vehicle owner receives the alert SMS indicating the need of a password within few seconds of ignition.

5.      In response to the above SMS (or otherwise), the owner can send a four digit secret PASSWORD to the mobile phone/GSM Modem present on the stolen automobile.

      The password contents can be:

·        Any 4 digit Location password: The present location of automobile is obtained from the network by sending the command 'AT+CGREG?' to the GSM phone. The network reply containing the location information composed into a SMS PDU by the microcontroller is stored at location 2 of the phone memory. This SMS(containing location information) is sent to the number from which the SMS containing LOCATION password was received. Thus, the exact location of the automobile is obtained via this SMS.

·        Any 4 digit Immobilize password: The ignition coil of the automobile, which supplies current to the spark plugs of the automobile, is cutoff via a relay connected to the output port of the microcontroller and thus immobilizing the automobile.

6.      The received SMS is by default stored at the next empty memory location of the GSM Phone/Modem memory (location 3 in our case). The microcontroller constantly monitors the 3rd memory location via AT command (AT+CMGR=3). If there is an incoming message at the 3rd location its contents are read and the four digit password is compared to the one stored in the microcontroller memory. Each incoming message is deleted after being read and processed from location 3. The system always keeps on looking for a new message at location 3.

Conclusion

SMSSS has added very useful security features to the automobile. The owner can get the location of the automobile whenever he wants just by sending an SMS to the GSM AT Compliant mobile phone concealed in the automobile. The owner can cut off the ignition if he receives an intrusion message conveying the information of opening of the door. The trigger for sending a SMS can be received from other events also such as vibration of the automobile (when interrupt pin of microcontroller is connected to vibration sensor, it changes output (Logic) when vibration occurs).

SMSSS can be developed by using above explained technique costing much less than the existing security systems. It can give a good competition to existing options in the market by providing many features at a low cost of approximately $66 (See ).

The complete schematic of the ATMega8 Kit Circuitry is shown in .

The other schematics namely relay circuitry, ignition circuitry and circuitry needed for generating desired power supplies are shown in , , respectively.

The source code for the SMSSS is shown in Listing 1.


References
  1. Autocop

  2. Nippon Security Systems

  3. AVR Atmega8 Datasheet

Loading comments...

Share your thoughts.

To comment please Log In.

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
KNOWLEDGE CENTER