Development of a Secured Vehicle Spot Detection System Using GSM

The number of vehicles stolen is increasing annually. The alarm system for vehicles is commonly used to expose the burglars publicly to make a scene. If the vehicle owner is far away, it will be hard to distinguish the threat to the vehicle from the intruder. To deter such crime, there should be a safer protection mechanism for vehicles around the globe. Moreover, overcrowd parking lot problems have always been an issue. Nevertheless, it became even worse with the progressing urbanization and population expansion. Anyone may have experienced that moment of panic when you realize you have no idea where you parked your vehicle. Note that, the keyless remote control of vehicles has a short-range radio transmitter. It usually can reach up 5–20 meters. Therefore, this paper develops a proposed system that is used for detecting vehicle location using Global System for Mobile Communications (GSM). It is basically capable to switch ON and OFF vehicle alarm system to detect the location of the vehicle in a crowded area. PIC microcontroller that has been embedded in the system programmed using C language. The intelligent proposed system also designs to enhance the security feature for the transportation era. The proposed system offers better service and cost-effective for the vehicle owners.


Introduction
In modern society, transportation is an essential element. Increased number of vehicles on the road continuously confirmed intelligent transport systems are inevitable. Recently, the automotive manufacturers companies are working and competing together with substantial technology organizations to deliver the most exceptional, most comfortable, and most secure vehicles on the market. The existing vehicle alarm systems have lock and alarm employed within vehicle. If a thief can manage to pick the lock, then it becomes easy for the thief to stop the alarm and steal the vehicle without the vehicle owner's knowledge. To avoid such situations, there must be a better security system for the vehicle.
Global System for Mobile Communications (GSM) and Short Message Service (SMS) technologies are frequently utilized for wireless data transmission [1][2][3]. The GSM module is a standard developed by the European Telecommunications Standards Institute (ETSI). It possesses SIM card slot which can send any an informative SMS to the destination. Exploitation of these technologies have become popular more than ever before because it does not involve much cost. Moreover, it is convenient, offline, and accessible aspect of transmitting and receiving data with high reliability. The proposed controllable system includes a magnetic sensor which acts as a caution call prior the robbery is been initiated. If the theft identified, alerted massage will be fed to a microcontroller which is interfaced with a GSM modem. The microcontroller sends it to the concerned vehicle owner in the form of an SMS over GSM modem. It also interfaced with relay which is immobilized the vehicle ignition system on demand. Adopting such technology will be highly useful to transport companies to keep protecting and detecting their vehicles. Also, in crowded areas the proposed system has the ability to detect the vehicle location by sending SMS from the owner' cellular to trigger the alarm system with huge sounds. Briefly, the contributions of the proposed vehicle spot detection system are: - • To locate the position of the owner's vehicle in crowd area.
• To warn the vehicle owner if an invasion happens via the GSM module.
• To activate the alarm system for the vehicle and defuse the engine in robbery time.
The remaining of paper is arranged as follows: Section 2 investigates the related works, Section 3 introduces the proposed system overview, Section 4 describes the system design and the implementation, Section 5 conducts the results. Finally, the conclusion is covered in Section 6.

Related Works
This section examines the previous selected research works that have been done. There are many distinct technologies were applied to control vehicles, especially when they have been hijacked. Some of the technologies are alarming system, IoT, password security, Arduino, face reorganization, GPS, deep learning, Cloud Computing, RF communication, Radio-Frequency Identification (RFID) and so forth as in [4][5][6][7][8][9][10][11][12][13][14]. Each technology technique is suitable with its function but in some system, Internet accessibility is need continuously. Failing to do so, the system can go down. Namely, without Internet connectivity, the system is useless because in some cases only google maps can display vehicle position.
Samuel and Alexander developed anti-vehicle theft system using GSM and GPS with image acquisition. Their prototype has security button if it is not pressed after starting the engine, the vehicle will be immobilized. Then, E-mail comprising the image of the unapproved person and the co-ordinate of the vehicle will be sent to vehicle owner [15]. This research work [16] studies a vehicle tracking system which is used various sensors to discover alcohol consumption and identify the accident. The Sensor values can be monitored from a distance using thing speak channel. Furthermore, RFID technology has been employed to simplify security to the vehicle tracking and antitheft system.
Kaustubh and Vibha [17] proposed a detailed study of the vehicle detection in dynamic conditions. Various problems demonstrate the difficulty of vehicle identification in unpredictable road driving conditions. By transition in transport, the far undisclosed benefits of autonomous vehicles have an immense effect. These technologies have given cars with the ability to minimize energy usage, collisions, and emissions and to reduce the cost of congestion. In this work numerous collections of visual data such as ground, shadow, and light are represented eligible for car identification.
One of the papers done by Muruganandham and P. Mukesh shows an active technology that are built in order to achieve automated location of vehicles and can transfer position information in real time [18]. The vehicular monitoring system involves a hardware device installed in the vehicle unit and a remote monitoring server. The extracted information from GSM/GPRS/Server is available to approved owners of the system via website via the Internet. Authors in this paper [19] investigate the same pervious work, however the PHP-written web interface is used to connect directly to a database. The database table contains geographic coordinates and unique ID of the vehicle. Moreover, a mobile app was created to display a position on Google maps. A.Swapna et al. used the following technologies GSM, GPS and RF communication [20]. The authors proposed smart helmet and bike that make riders to drive more securely than before. Md. Marufi et al. [21] used an Arduino UNO board with At-mega328 microcontroller, GSM module and GPS receiver to monitor a moving vehicle and report the status of the vehicle. The proposed system will guarantee safety and security of vehicle, driver, and passengers. Through using the camera, it can further boost the vehicle tracking system built on Arduino to obtain a real-time view. In [22][23], authors develop a theoretical model of GSM network-based vehicle tracking system and design simulation of vehicle lane tracking using Matlab. Sabah et al. [24] employs a new diagrammatic language in constructing a conceptual (non-technical) model of vehicle-tracking systems. The proposed tracking system uses Thinking Machine (TM) which can be the foundation for building larger and more sophisticated advanced fleet management and optimization systems.
A decent system has a certain margin of error, which is why it is an outstanding system if the system makes a minimal error. This work [25] tests the exactness of the location that is being dispatched to user when the vehicle on the run or stationary in the city.

The Proposed System Overview
For all vehicle owners, automotive protection is a big concern. Vehicle owners as well as manufacturers companies are always looking for modern and upgraded vehicle safety features. In this section, the methodology for the proposed secured vehicle detection system is elaborated thoroughly.
The new system can be mounted and concealed in vehicle without anyone noticing. The block diagram of the proposed system is presented in Figure 1. Putting together the pieces, the bird's eye view for the proposed system is depicted in Figure 2. The block diagram consists of vehicle owner mobile phone, GSM module, microcontroller, buzzer, relay, and magnetic sensor. Generally, the proposed system places into sleeping mode while the vehicle tapped by the owner otherwise it turns to active mode. The microcontroller acts as brain to the system. The relay used to immobilize the vehicle ignition system.  The GSM modem has a valid SIM card with a sufficient top-up amount to be able to send SMS and received ongoing call. Every wireless modems and dial-up modems, need an AT command to interact with a mobility device or computer machine. AT is the abbreviation of Attention. These commands are instructions used to control a modem. "AT" or "at" begins every command line. The "AT" prefix tells the modem the command-line is begun. Namely, it is not portion of the AT command name. Two forms of AT commands exist: Basic commands and extended commands as well. The basic commands are AT commands that do not start with "+" such as D (Dial) and A (Answer). Whereas, the extended commands are AT commands that start with "+" such as +CMGS (Send SMS message), +CMGL (List SMS messages) and +CMGR (Read SMS messages). By the way, all GSM AT commands are extended commands. The proposed controllable system retains two fundamental operations modes.
The first mode can be described as follows: In conjunction with crowd area, the owner can send SMS massage with "#" symbol to GSM module to activate the alarm in order to locate the vehicle. Also, the vehicle owner has another option which is the privilege to call the GSM SIM number directly to active the alarm. Figure 3 displays pseudo code for the detection and safety procedures of the proposed system. As we can see from the code below, if a call has been initiated by the vehicle owner, the GSM has to hangs up the call using "ATH" command. This command is known to end the voice call. Then, it will activate the buzzer and LED. Finally, the vehicle owner can send SMS message to GSM module with symbol "%" to switch on the relay or "$" to shut down the relay in order to turn on the vehicle engine. In contrary, the second mode is used for security purposes. It can be explained as follows: The vehicle owner receives a SMS threat notification massage from the proposed system in case the alarm system buzz sounds when the vehicle is tampered with and designates that intruder is in progress. Afterwards, the microcontroller initiations the relay to cripple the vehicle ignition system. Figure 4 depicts the pseudo code of the magnetic sensor loop. Whenever the magnetic sensor is off, the pull-up resistor is used to making sure that the voltage is well-defined even when the switch is open. As we can observe from the code below, while (1) is used for infinite loop. As soon as, the magnetic sensor has been triggered by intruder movement, the buzzer and LED will be enabled and followed by a warn SMS sending to the vehicle owner. Finally, the relay consequently will be turned on to disable the car engine.

Fig. 4. Pseudo code of the magnetic sensor loop
The pseudo code of sending the SMS message from GSM to the vehicle owner is shown in Figure 5. As we can noticed from the code, the AT+CMGS command has been used to send message with text "Car Security System Thief!" to the vehicle owner phone.

System Design and Implementation
In the development of the vehicle detecting system controlled by a microcontroller, hardware and software design techniques are needed [26]. Overall system is partitioned into four major design units. The main hardware units are the PIC16F886 microcontroller, GSM modem module, buzzer and 5V relay. Besides that, the proposed system has magnetic switch and LM2596 step down voltage regulator module. These elements are briefly discussed below in this section.

PIC16F886 microcontroller
The PIC16F886 microcontroller is an embedded controller made up by Microchip Technology as shown in Figure 6. It is powerful yet easy-to-program with. Also, it is one of the 8-bit microcontroller comes with 28 pins. Each pin can perform multiple functions. The PIC16F886 microcontroller is the most important unit in the proposed system. A typical microcontroller can be seen as a small computer which includes a processor, memory, and input/output (I/O) peripherals on a single chip. Essentially, the PIC16F886 microcontroller assembles input, processes this information, and outputs a precise action based on the information collected.  Figure 7 [27]. It is used widely for common applications. The operating voltage of the chip is from 3.4V to 4.4V. The SIM800L GSM module doesn't come with onboard voltage regulator. So, an external power supply adjusted to voltage is needed. The GSM module responds to AT command set. The AT commands are instructions used to control a modem. It is the abbreviation of attention. AT is the prefix that notifies the modem about the start of a command line. However, it is not part of the AT command name. There are two kinds of AT commands: basic commands and extended commands. The basic commands do not begin with "+", whereas the extended commands are AT commands that start with "+".

LM2596 step down voltage regulator
LM2596 step-down switching voltage regulator is suitable for acquiring a voltage lower than the input, with very high efficiency of up to 98%. Some termed it a buck converter circuit. The adjustable version can take in input voltage from 4.5V to 40V and transform it to fluctuating voltage sourcing up to of 3A of constants current. The LM2596 regulator is very user-friendly because it needs very limited number of parts. It has a multi-turn trimpot (potentiometer) that a person can utilize to modify the LM2596's output voltage. As, the potentiometer possesses 25 turns of regulation you can effortlessly alter the output of the module to exactly the voltage you require. In short, this voltage stabilizer circuit has the advantages of high efficiency and low heat.

Relay
In the proposed system, a relay is an electromagnetic switch that integrates to PIC16F886 microcontroller in order to activate or deactivate the vehicle engine. It connects with 19, 20 and 22 pins of the microcontroller. This device managed by a reasonably small electric current that can turn on or off a much larger electric current. Numerous relays are protective in function. They were earlier used in the electric telegraph and Morse code. The essential operation of the relay is to make or break contact with the aid of a signal without any human engagement in order to switch it ON or OFF. Explicitly, if a relay contact is normally open (NO), then there is an open contact when the relay is not energized. Otherwise, if a relay contact is Normally Closed (NC), then there is a closed contact when the relay is not energized. Later this device was improvised and applied in several applications such as switch starting coils, heating elements, pilot lights, audible alarms and prevent equipment damage. Lastly, the relay requires 5V DC supply for the coil voltage.

Buzzer
Buzzer is an electronic signalling instrument that might be mechanical, electromechanical or piezoelectric. This beeper is very tiny and compact 2-pin structure thus can be clearly installed and manipulated on PCB or breadboard. In the proposed system, the buzzer is working in three cases: Received SMS from the vehicle owner, received ongoing call from the vehicle owner and the magnetic sensor is ON.

Schematic diagram and PCB design
This sub-section represents the schematic diagram of the proposed system as shown in Figure 8. In addition, it displays the top and bottom PCB composite layer in Figure 9 and Figure 10 respectively. The PCB design is a natural and quick addition of the design process [28]. The power supply portion is very crucial for all electronic circuits. The incoming 12V will be regulated by LM2596 step down voltage regulator to feed the GSM as well as the microcontroller with 4V. Proteus, ISIS and ARES professional programs are used for drawing the schematic diagram and PCB of the proposed system.

Flowchart
Self-explanatory flowchart for the proposed vehicle spot detection system is presented in Figure 11. It summarizes the operations steps for the proposed system. Programming of the system design is accomplished using MikroC Pro from Mikroelektronika and PIC kit 2 software as well. The code for the proposed system begins by setting up and configuring the PCB components such as internal oscillator, comparators, buzzer, LED, relay and magnetic sensor. Next, the GSM modem is going to be initiated by using AT+CMGF and AT+CNMI command. The AT+CMGF (Format Message) is used to choose the operating mode of the GSM modem or mobile phone. The parameter's value may be either 0 or 1. The values 0 and 1 denote to SMS PDU mode and SMS text mode respectively. Additionally, the AT+CNMI command is used to show how to handle newly arrived SMS messages. Afterward, the code utilizes the AT command +CMGD (Delete Message) to erase the pervious SMS message(s) from message storage. The vehicle owner can send a "#" sign message or dial the SIM number of GSM to detect the location of the car. This will cause energizing the buzzer and LED. The magnetic sensor is designed to detect intrusionunauthorized entryinto a vehicle. In time of robbery, a caution message will be sent to vehicle owner. Then, the microcontroller will trigger ON the buzzer, LED and relay to prevent the robbery. Eventually, the vehicle owner can control and immobilize the vehicle ignition system by sending "%" and "$" symbol signs to GSM in order to switch the relay ON or OFF, respectively.

Results
At the beginning, the proposed system has been tested successfully in breadboard as illustrated in Figure 12. Then, it has been built in a printed circuit board (PCB) for possible commercialization. Once the proposed system gets started, the (Light Emitting Diode) LED will turn ON for a while in order to checkup the GSM module with the SIM slot are working perfectly as depicted in Figure 13. As we can see from Figure 14. whenever the magnetic sensor is switched ON indicating the robbery in progress, the alarm system "LED and Buzzer" will be activated and the relay will be started to immobilize the vehicle ignition system.

Fig. 14. Opening the magnetic switch circuit
Besides that, the vehicle owner's mobile phone will receive intruder alert notification i.e., a SMS massage entitled with "Car Security System Thief!!!" as displayed in Figure 15.  Figure 16. shows the final assemble prototype for the proposed system. It helps any vehicle owner to detect the vehicle location in full packed areas by sending SMS text with "#" symbol. Otherwise, the vehicle owner could call the prototype fitted within the vehicle to trigger the alarm system for spot recognition.

Conclusion
Wireless communications allow users the possibility of accessing to any sort of information from anywhere and at any moment. This paper develops a secured vehicle spot detection system based on GSM with minimal hardware and software requirements. Therefore, the anti-theft proposed system is very low-cost solution for public and private vehicles. Moreover, it offers a user friendly, easily installable and safety insurance benefits. The prototype has been implemented successfully. The obtained result validates that, the prototype works perfectly in case of detecting the vehicle spot in congested environment and guarding any vehicle from hijacking intruders. In conclusion, this system should be considered for commercialization in automotive industry worldwide.