SMS Based Automatic Two Wheeler Locking System
SMS Based Automatic Two Wheeler Locking System
SMS Based Automatic Two Wheeler Locking System
The aim of the project to design the SMS based vehicle locker security system. M-vehicle
has become one of the most familiar vehicle service providing technologies in different western
countries. Now-a-days billions of inhabitants are within a network through mobile network
coverage. But in the commercial vehicle like two wheeler. This technology has not been adopted
broadly yet. SMS based m-vehicle system has been proposed which is able to provide several
essential vehicle services only sending SMS to vehicle server from any remote location. This
proposed system is divided into five major phases: interfacing module, SMS technology
adoption module, SMS vehicle registration module, service generation module, and data failover
module. This system facilitates vehicle customers by providing four major services like balance
enquiry , balance transfer between authenticated customers, DPS payment and bill payment
without going to vehicle physically and save their precious time. At least, after evaluating each
module of this developed system a satisfactory accuracy rate 93.18 % is obtained.
BLOCK DIAGRAM
INTRODUCTION
According to the report published by National Crime Records Bureau (NCRB), in the
year 2011 alone 122,367 two wheeler vehicles were stolen in India. Out of which only 32,826
vehicles were recovered. Typically, two-wheelers are stolen right off streets or apartment parking
lots. By the time the police are alerted (which could be a few hours since the theft), the vehicles
are made underground leaving almost no traces. Later the vehicles are either dismantled or sold
in neighboring states/districts at throw-away prices, leaving the owner and police helpless in
bringing the thief to book. The story remains same for rest of the world. The only possible way
out of this problem is implementation of security system in the vehicle. The security system
should be capable of performing reasonably well even in unfavorable conditions to meet the
desired level of security The price of the security system should be reasonably low or else the
automobile manufacturers cannot implement such a system, as it will increase the overall cost of
the vehicle by a big margin. If the design of the security system is such that it is compatible with
most of the brands and classes of vehicles then it helps reducing the NRE cost. The overall
power consumption should be less as the source of supply for the security system is the 12V
battery of the vehicle. Keeping these requirements and constraints in mind we propose this new
design of Two Wheeler Vehicle Security System (TWVSS).
DESCRIPTION OF PROPOSED TWO WHEELER VEHICLE SECURITY SYSTEM
An overview of the complete system is described in this section before detailing the
specifications and the necessity for each module in the system. The general view of operation of
the proposed security system is shown in fig.ure. The conventional handle locking system is
replaced by a handle lock operated by servo motor and controlled by the Remote Keyless System
(RKS) . RKS has a transmitter and a receiver module. The receiver module is installed on the
vehicle and the owner of the vehicle has the remote (transmitter module). The RKS remote could
be used to lock/unlock the locking system (handle lock, fuel lock and rear wheel lock), switch
ON/OFF the engine and to turn off the alarm. Fuel lock replaces the knob at the nozzle of fuel
tank. Rear wheel lock is used to jam the sprocket of the wheel.
PIC 16F877A IC
LCD
MAX 232 IC
3310 MOBILE(GSM 900)
CRYSTAL OSCILLATOR
LED
SOFTWARE REQUIRMENTS
PIC C COMPILER
PIC IC PROGRAMMER
MICROCONTROLLER (PIC16F87XA)
This document contains device specific information about the following devices:
PIC16F873A
PIC16F874A
PIC16F876A
PIC16F877A
the PIC16F873A and PIC16F876A have one-half of the total on-chip memory of the
PIC16F874A and PIC16F877A
the 28-pin devices have three I/O ports, while the 40/44-pin devices have five
the 28-pin devices have 14 interrupts, while the 40/44-pin devices have 15
the 28-pin devices have five A/D input channels, while the 40/44-pin devices have eight
the Parallel Slave Port is implemented only on the 40/44-pin devices
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide
range of applications. A 16x2 LCD display is very basic module and is very commonly used in
various devices and circuits. These modules are preferred over seven segments and other multi
segment LEDs. The reasons being: LCDs are economical; easily programmable; have no
limitation of displaying special & even custom characters (unlike in seven
segments), animations and so on.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this
LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely,
Command and Data.
The command register stores the command instructions given to the LCD. A command is
an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting
the cursor position, controlling display etc. The data register stores the data to be displayed on
the LCD. The data is the ASCII value of the character to be displayed on the LCD. Click to learn
more about internal structure of a LCD.
Pin Diagram:
Pin Description:
Wireless MODEMs
Wireless MODEMs are the MODEM devices that generate, transmit or decode data from a
cellular network, for establishing communication between the cellular network and the computer.
These are manufactured for specific cellular network (GSM/UMTS/CDMA) or specific cellular
data standard (GSM/UMTS/GPRS/EDGE/HSDPA) or technology (GPS/SIM). Wireless
MODEMs like other MODEM devices use serial communication to interface with and
need Hayes compatible AT commands for communication with the computer (any
microprocessor or microcontroller system).
GSM/GPRS MODEM
GSM/GPRS MODEM is a class of wireless MODEM devices that are designed for
communication of a computer with the GSM and GPRS network. It requires a SIM (Subscriber
Identity Module) card just like mobile phones to activate communication with the network. Also
they have IMEI(International Mobile Equipment Identity) number similar to mobile phones for
their identification. A GSM/GPRS MODEM can perform the following operations:
The MODEM needs AT commands, for interacting with processor or controller, which
are communicated through serial communication. These commands are sent by the
controller/processor. The MODEM sends back a result after it receives a command. Different AT
commands supported by the MODEM can be sent by the processor/controller/computer to
interact with the GSM and GPRS cellular network.
GSM/GPRS Module
A GSM/GPRS module assembles a GSM/GPRS modem with standard communication
interfaces like RS-232 (Serial Port), USB etc., so that it can be easily interfaced with a computer
or a microprocessor / microcontroller based system. The power supply circuit is also built in the
module that can be activated by using a suitable adaptor.
Mobile Termination is interfaced with the GSM mobile network and is controlled by a baseband
processor. It handles access to SIM, speech encoding and decoding, signaling and other network
related tasks. The Terminal Equipment is an application processor that deals with handling
operations related to keypad, screen, phone memory and other hardware and software services
embedded into the handset. The Terminal Adapterestablishes communication between the
Terminal Equipment and the Mobile Termination using AT commands. The communication with
the network in a GSM/GPRS mobile is carried out by the baseband processor.
The GSM/GPRS module, on the other hand, always needs a computer or external
processor/controller to receive AT commands from. GSM/GPRS module itself does not provide
any interface between the user and the network, but the computer to which module is connected
is the interface between user and network.
An advantage that GSM/GPRS modules offer is that they support concatenated SMS
which may not be supported in some GSM mobile handsets. Also some mobile handsets can’t
receive MMS when connected to a computer.
AT Commands
AT commands are used to control MODEMs. AT is the abbreviation for Attention. These
commands come from Hayes commands that were used by the Hayes smart modems. The Hayes
commands started with AT to indicate the attention from the MODEM. The dial up and wireless
MODEMs (devices that involve machine to machine communication) need AT commands to
interact with a computer. These include the Hayes command set as a subset, along with other
extended AT commands.
The Hayes subset commands are called the basic commands and the commands specific to a
GSM network are called extended AT commands.
AT commands' syntax
Case Sensitivity -
The AT commands are generally used in uppercase letters. However some MODEMs and
mobile phones allow both uppercase and small case letters.
Single Command -
The AT commands include a prefix AT which indicates the beginning of the command to
MODEM; and a carriage return which indicates the end of the command.
However string ‘AT’ itself is not the part of the command. For example in ATD, D is the
command name not ATD.
Command Line -
Multiple AT commands can be sent to MODEM in a single command line. The commands in
a line are separated by a semi-colon (;).
For example:
<Carriage return><Line feed>OK<Carriage return><Line feed>
<Carriage return><Line feed>ERROR<Carriage return><Line feed>
<Carriage return><Line feed>+CBC: 0, 60<Carriage return><Line feed> etc.
Sequence of Execution -
In the command line, the command appearing first is executed first. The execution then
follows for second appeared command and so on. The execution of commands in a command
line takes place in sequential manner.
If an error occurs in the execution of a command, an error result code is returned by the
MODEM and the execution of the command line is terminated irrespective of presence of other
commands next in the command line.
Types of commands:
There are four types of AT commands:
1) Test commands
2) Read commands
3) Set commands
4) Execution commands
For more details, see AT Commands.
Different Result Codes:
RESULT CODE DESCRIPTION
OK Successful Execution of a command
ERROR Execution of a command failed
+CMS ERROR Message service failure, is returned with an error code
Figure given below shows the complete circuit of a regulated power supply with a
transistor series regulator as a regulating device. Each part of the circuit is
explained in detail.
Transformer
A step down transformer is used to step down the voltage from the input AC to the
required voltage of the electronic device. This output voltage of the transformer is
customized by changing the turns ratio of the transformer according the electronic
device specs. The input of the transformer being 230 Volts AC mains, the output is
provided to a full bridge rectifier circuit.
The FWR consists of 4 diodes which rectifies the output AC voltage or current
from the transistor to its equivalent DC quantity. As the name implies the FWR
rectifies both half’s of the AC input. The rectified DC output is given as input to
the filter circuit.
Filter Circuit
The filter circuit is used to convert the high rippled DC output of the FWR to
ripple free DC content. Filter is used to make the waveforms ripple free.
IC7805
A variable regulated power supply, also called a variable bench power supply, is one
which you can continuously adjust the output voltage to your requirements. Varying
the output of the power supply is recommended way to test a project after having
double checked parts placement against circuit drawings and the parts placement
This type of regulation is ideal for having a simple variable bench power
supply. Actually this is quite important because one of the first projects a
hobbyist should undertake is the construction of a variable regulated power
supply. While a dedicated supply is quite handy e.g 5V or 12V,it’s much handier to
have a variable supply on hand, especially for testing.
Most digital logic circuits and processors need a 5 volt power supply. To use
these parts we need to build a regulated 5 volt source. Usually you start with an
unregulated power to make a 5 volt power supply, we use a LM7805 voltage regulator
IC (Integrated Circuit).
#undef SIMULATION
#ifdef SIMULATION
#else
#endif
// These are delays for recurring SMS sending, defined separately for every
#define STEPS_CYCLES 7200 // send another SMS after this value x 3 secs
//#define STEPS_CYCLES 100 // send another SMS after this value x 3 secs
#define DOOR_CYCLES 7200 // send another SMS after this value x 3 secs
#define MAINS_CYCLES 7200 // send another SMS after this value x 3 secs
#define GSM_POWER RA1 // digital OUT for GSM power enable pin
// every string are in the EEPROM program memory to save data RAM space
// ------------------------------------------------------------
/*
and RA5/OSC1/CLKIN
When the SCS bit of the OSCCON register = 0, the system clock source is
register (CONFIG).
*/
FOSC=XT
#define HIGH_LEVEL 1
#define LOW_LEVEL 0
#define ON 1
#define OFF 0
#define false 0
#define true 1
// ------------------------------------------------------------
#include <xc.h>
#include <PIC16F688.h>
#include <string.h>
// ----------------- GLOBAL VARIABLES -------------------------
CLRWDT();
if (isFast == stealth) {
__delay_ms(900);
LED_SMS = OFF;
__delay_ms(499);
LED_SMS = ON;
__delay_ms(399);
} else {
LED_SMS = OFF;
__delay_ms(250);
LED_SMS = ON;
__delay_ms(200);
CLRWDT();
LED_SMS = OFF;
__delay_ms(250);
LED_SMS = ON;
__delay_ms(200);
CLRWDT();
while (*s) {
while(TXIF == 0);
TXREG = *s++;
CLRWDT();
while(TXIF == 0);
__delay_ms(800);
CLRWDT();
send_to_modem(s);
while(TXIF == 0);
wait(20, stealth);
}
// ------------------------------------------------------------
void main(void) {
// register (CONFIG)
__delay_ms(1000);
CLRWDT();
STEPS_CYCLES,
DOOR_CYCLES,
MAINS_CYCLES
};
wait(120, true); // give the user some time after power on to leave the area
LED_SMS = OFF;
__delay_ms(1000);
CLRWDT();
__delay_ms(1000);
CLRWDT();
while (1) {
wait(40, stealth); // give the user 1 minute to turn off the alarm system
__delay_ms(300);
} else {
__delay_ms(300);
// init UART
SPBRG = 9; // with this config this means 38400 bit/s
BAUDCTLbits.BRG16 = 0;
wait(40, stealth); // wait for startup and the "+PBREADY" which indicates mobile
service connection
char msg[8];
strcpy(msg, "Steps\n");
strcat(message, msg);
strcpy(msg, "Door\n");
strcat(message, msg);
strcpy(msg, "Mains\n");
strcat(message, msg);
__delay_ms(1000);
send_to_modem(mode_text);
send_to_modem(char_mode);
send_to_modem(param);
send_to_modem(mobile_no);
send_sms(message);
// power off
} // end else
cycleCounters[0]++;
cycleCounters[1]++;
cycleCounters[2]++;
__delay_ms(1200); CLRWDT();
__delay_ms(1448); CLRWDT();
LED_SMS = ON;
__delay_ms(40);
LED_SMS = OFF;
ADVANTAGES
Easy to operate.
Sophisticated security.
Simple and Reliable Design.
Isolates both GSM and GPS signal.
LIMITATIONS
It does not work without network.
APPLICATIONS
Stolen Vehicle Recovery: Both consumer and commercial vehicles can be outfitted with
RF or GPS units to allow police to do tracking and recovery. In the case of LoJack, the
police can activate the tracking unit in the vehicle directly and follow tracking signals.
Fleet Management: When managing a fleet of vehicles, knowing the real-time location
of all drivers allows management to meet customer needs more efficiently. Whether it is
delivery, service or other multi-vehicle enterprises, drivers now only need a mobile phone
with telephony or Internet connection to be inexpensively tracked by and dispatched
efficiently.
Asset Tracking: Companies needing to track valuable assets for insurance or other
monitoring purposes can now plot the real-time asset location on a map and closely
monitor movement and operating status.
Field Sales: Mobile sales professionals can access real-time locations. For example, in
unfamiliar areas, they can locate themselves as well as customers and prospects, get
driving directions and add nearby last-minute appointments to itineraries. Benefits
include increased productivity, reduced driving time and increased time spent with
customers and prospects.
Transit Tracking: This is the temporary tracking of assets or cargoes from one point to
another. Users will ensure that the assets do not stop on route or do a U-Turn in order to
ensure the security of the assets.
To avoid the accident dead ,immediately they give the instruction to nearby ambulance
CONCLUSION
This project presents vehicle accident detection and alert system with SMS to the user
defined mobile numbers. The GSM alert based algorithm is designed and implemented with
MCU in embedded system domain. The proposed Vehicle accident detection system can track
geographical information automatically and sends an alert SMS regarding accident.
Experimental work has been carried out carefully. The result shows that higher sensitivity and
accuracy is indeed achieved using this project. EEPROM is interfaced to store the mobile
numbers permanently. This made the project more user-friendly and reliable. The proposed
method is verified to be highly beneficial for the automotive industry.