Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Declaration

We hereby declare that the project entitled ‘’GSM based Vehicle Fuel Theft Detection
System” submitted in partial fulfillment of the requirement of the BSc degree in Electrical
and Computer Engineering (ECE) in BIT (Bahir Dar Institute of Technology), is recorded
of our Own work carried out by the academic year2009/17 under the supervision and
guidance of Mr. Gashaw. M, Department of Electrical Engineering.
The extent and source of information are derived from the existing literature and have been
indicated through the project at the appropriate places. The matter embodied in this work
is original and has not been submitted for the award of any other degree, either in this or
any other University.
Declared by:
Name Signature
1.Gizachew Worku……………………………………………………
2. Girma Asfaw …………………………...........................................
3 .Gojjam Mulaw………………………… …………………………
4. Hana Astatikie…………………………………………………….
Confirmed by:
Signature: …………………………………
Project Advisor:
Mr. Gashaw.M
Signature……………………………………….

i
Acknowledgment

Starting from blessing the lord, we would like to express our deep gratitude and
appreciation to all those guys gone multiply our effort to complete this project. We place
on record and warmly acknowledge the continuous encouragement, invaluable
supervision, timely suggestions and inspired guidance offered by our adviser Mr. Gashaw
in bringing this project to a successful completion.
Last but not the least we express our sincere thanks to our entire department staff who has
patiently extended all sorts of help for accomplishing this undertaking.
Finally, we must acknowledge with due respect the constant supports and patience of our
friends.

ii
Contents
Declaration ........................................................................................................................... i
Acknowledgment ................................................................................................................ ii
List Of Figures .................................................................................................................... v
List of Acronyms .............................................................................................................. vi
ABSTRACT ...................................................................................................................... vii
CHAPTER ONE ................................................................................................................. 1
Introduction ......................................................................................................................... 1
1.1. Statement of the Problem ..................................................................................... 1
1.2. Significance of the project ....................................................................................... 1
1.3. Objectives of the Project .......................................................................................... 2
1.3.1. General Objective ................................................................................................. 2
1.3. 2. Specific Objectives .............................................................................................. 2
1.4. Methodology Used in this Project............................................................................ 2
1.5. Scope of the Project ................................................................................................. 3
CHAPTER TWO ................................................................................................................ 4
Review of Literatures .......................................................................................................... 4
CHAPTER THREE ............................................................................................................ 6
System Design and Analysis ............................................................................................... 6
3.1. System Components and Operations ....................................................................... 6
3.1.1 Software Components .......................................................................................... 12
3.2. System Design and Analysis .................................................................................. 13
3.2.1. Block Diagram of the system .......................................................................... 13
3.2.2 Flow chart that shows overall operation .............................................................. 14
3.2.3. Circuit Design ................................................................................................. 15
3.2.3. Arduino Code .................................................................................................. 16
CHAPTER FOUR ............................................................................................................. 20
Results and Discussions .................................................................................................... 20
4.1. Software simulation results and discussions .......................................................... 20
4.1.1 Regulator simulation result .............................................................................. 20
4.1.2. System Simulation .......................................................................................... 20
CHAPTER FIVE .............................................................................................................. 24

iii
Conclusion and Recommendations ................................................................................... 24
5.1 Conclusion .............................................................................................................. 24
5.2 Recommendations for Future work ........................................................................ 24
List of References ............................................................................................................. 25

iv
List Of Figures
FIGURE 3. 1 ARDUINO ......................................................................................................................................... 7
FIGURE 3. 2 BUZZER............................................................................................................................................. 8
FIGURE 3. 3 GSM MODULE ................................................................................................................................... 9
FIGURE 3. 4 LIQUID CRYSTAL DISPLAY(LCD) ............................................................................................................ 10
FIGURE 3. 5 APEARANCE AND SCHEMATIC REPRESENTATION OF ZENER DIODE ................................................................ 11
FIGURE 3. 6 ZENER DIODE CHARACTERISTIC GRAPH WHEN OPERATING IN FORWARD MODE ............................................... 11
FIGURE 3. 7 ZENER DIODES CHARACTERISTIC GRAPH IN FORWARD AND REVERSE MODE .................................................... 12
FIGURE 3. 8 GENERAL SYSTEM BLOCK DIAGRAM ...................................................................................................... 13
FIGURE 3. 9 FLOW CHART .................................................................................................................................... 14
FIGURE 3. 10 CIRCIUT DESIGN .............................................................................................................................. 15

FIGURE 4. 1REGULATOR SIMULATION RESULT .......................................................................................................... 20


FIGURE 4. 2SIMULATION RESULT1 ......................................................................................................................... 20
FIGURE 4. 3ARDUINO PROGRAM SECTION THAT RESULTS IN SIMULATION 1 ................................................................... 21
FIGURE 4. 4INPUT SIGNAL GIVEN TO THE SYSTEM ..................................................................................................... 21
FIGURE 4. 5SIMULATION RESULT 2 ........................................................................................................................ 22
FIGURE 4. 6 SIMULATION RESULT 3 ....................................................................................................................... 23

v
List of Acronyms
GSM……………………………………………………. global system for mobile communication

SMS……………………………………………………… short message service

IDE………………………………………………………...integrated development environment

GPRS……………………………………………………. general packet for radio service

LCDs …………………………………………………. Liquid Crystal Display


IDE…………………………………………………….. Integrated Development Environment
EDA…………………………………………………. Electronic Design Automation

LED………………………………………………… light emitting diode

vi
ABSTRACT
Currently almost of the public have their own vehicle, fuel theft is happening in the parking
where there is no any kind of security. Vehicle security is more challenging. So in order to
bring a solution for this problem this system can be implemented. To avoid this an Arduino
based fuel monitoring system is implemented. The system makes use of an embedded
system based on Global.
System for Mobile communication (GSM) Technology and Arduino. In this project a try
is given to program a GSM module incorporating to report occurrences of fuel theft
detection automatically via the GSM communication platform (using SMS messaging).
The main concept in this design is introducing the mobile or cell phone into an embedded
system communication.
In this paper we have focused on developing an enhancement of the vehicle fuel alarm
security system via SMS. In attempt of theft the system sends text message to the car owner
and at the same time starts up an alarm from the buzzer installed within the system.

vii
CHAPTER ONE
Introduction

1.1. Statement of the Problem

Fuel theft in parked vehicles is increasing day by day these days. Moreover, increasing fuel
prices adds to the frustration of a fuel theft. Fuel is among the most common component
of a vehicle that is frequently stolen. Car’s and motor vehicle’s fuel is easily stolen by
fetching it from the tank. Fuel can be stolen from vehicles and storage tanks by the use of
siphoning equipment that can vary from the basic tube to more sophisticated arrangements
involving pumps and the cutting of fuel lines [2]. Vehicle Petrol theft is one of the main
concerns of many bike owners and car owners. In the developing countries the fuel theft
rate is incredibly high. So, the issue of fuel theft has become a major annoyance for the
users which may one of the causes to derive increasing fuel price [3].So it is better to search
an automatic way that can overcome the problem of fuel theft. This project focuses on the
fuel theft problem and puts forward an effective solution for this problem. It successfully
detects fuel thefts using a unique method. It detects weather the vehicle is turned off. If the
fuel decreases while vehicle is turned off, it triggers an event and this event is linked to
message sending functionality. If the fuel level in the tank decreases while vehicle is in
OFF state, then an alert will be sent to user’s mobile in text form .

1.2. Significance of the project


The significance of this project is obvious as it can be used in Car, Bikes and all Vehicles.
It can also be used in various industries or companies which have bus or caps for their
employees. This project can be fitted in this transportation buses to detect the petrol theft.
protecting the fuel of their car is the major concern for most car owners . In business cars
the owner is not the driver of the car, and the fuel can be sold by the driver without
permission of the owner. This situation can be controlled by using this system. The owner
loss will be reduced and become profitable. so that, this project has a significant role in
solving the underlying problem.

1
1.3. Objectives of the Project

1.3.1. General Objective


The general objective of the project is to develop a GSM based fuel level theft detection
system with sms indication when fuel theft is attempted.

1.3. 2. Specific Objectives


The aim of this project is
 To design an electronic embedded system that automatically detects fuel theft and
sends a message notification for the vehicle owner.
 To design a system that take its own action by producing sound immediately after
it detects the theft.to
 Enable the car owner to receive a notification with his cell phone via a GSM
network whenever a fuel theft is detected.
 To reduce the fuel budget cost of the vehicle owner
 To build trust between driver and owner of the business car

1.4. Methodology Used in this Project


The methods we have been followed to accomplish this project are
 We tried to look the previous works that were done on this area. We reviewed
different literatures that have the concept fuel theft detection.
 For the simulation purpose we were collecting software and software libraries from
the internet and individuals.
 We were gathering information from our friends that helps us for the completion of
the project
 We were also taking advice about the project from our advisor assigned by the
faculty
 Analyzing the principle of operation and characteristics of the system components
were the major duty.
 Each system components were simulated before they are organized as a whole
required system.

2
 Finally, the whole system is simulated many times. We observed the results and we
made an improvement many times.

1.5. Scope of the Project


Since the project relies on detecting the level of the liquid, the application of this project is
not limited only to vehicles. But, it can be extended to other application areas like
industries. For other applications we have to use a rectifier and regulator that converts
220/230 V ac main line to 5V DC. Our system contains only 12V DC to 5V DC regulator.
This system uses two intelligent components that are driven by programming codes. The
overall system is controlled by the program stored in Arduino. The complexity to develop
this system comes from the programming. The system components are small sized and take
small space to place in the car. It is also easy to install the system. The implementation of
this project is proceeded up to running the simulation due to limitation in accessing the
materials like GSM module and Arduino.

3
CHAPTER TWO
Review of Literatures

Previous works have been conducted on this and related idea. Many journal papers are
made based on fuel theft detection and prevention system.
Nandini Hiremath ,Mrunali Kumbhar1and Aakriti Singh Pathania ,2015, on their proposed Smart
Fuel Theft Detection system use Microcontroller ARM 7.” This system makes use of smart fuel
theft detection with GSM alert and GPS tracking system. Using the ARM7 microcontroller, the real
time position of vehicle and its fuel content is sent to owners mobile in case of intrusion. The system
includes GPS module, Microcontroller, GSM module, LCD and a keypad. The GPS module
transmits coordinates to the microcontroller that converts the data which is sent to the user in text
format. This text message contains longitude and latitude of the location. This smart system gives
24x7access to fuel consumption, alerts when fuel drains and storage tank leaks immediately
identified”. Their research work was carried out by making use of ARM7LPC2148, GPS module
and GSM module. The Power supply for the entire system is 3.3V & 5V [4].
Naomi Somer Lepcha, Tshering Sangmo Sherpa and Jitendra Singh Tamang ,2015, on their paper
focused on developing an enhancement of the vehicle alarm security system via SMS. Their
Antitheft security system utilizes an embedded system designed with GSM to monitor and
safeguard a car. In attempt of theft the system sends text message to the car owner and at the same
time starts up an alarm from the buzzer installed within the system. The GSM module is for
communication between the microcontrollers with mobile phones through UART [5].
Prof. Trupti K. Wable, Prof. Rajashree R. Shinde ,2016, in their paper explain about the
limitation digital fuel meter,” Nowadays all world become digital so that we can easily
deals with real time system. At same time digital fuel meter also implemented in recent
vehicle system but actual fuel present in fuel tank of bike not shown in term of digits that
show in terms of bar or deflecting needle so that we did not get idea about actual fuel
present in fuel tank of bike it only shows level of fuel present in fuel tank.”
But they used it in their prosed system for detection of fuel theft.” Because of Digital Fuel
Meter in that PIC microcontroller used so that it sends SMS to owner of bike when fuel get
theft using GSM module and buzzer will start to indicate that fuel get theft all this process
is real time so that more accurate and secure” [6].

4
Lastly, they concluded that their proposed system increased the standard of measurement
system using Digital Fuel Meter because of Digital Fuel Meter cheating with customer by
fuel filling station can be avoided and performance of system also improved with the help
of Digital Fuel Meter.
Mahendra Chourasiya,Dattatray Shinde , Ajeet Kaulage and Miss. B. R. Thawali ,2015,
proposed fuel theft prevention system. The Proposed System uses GSM module and micro
controller.” The aim to design and develop this system in the real time environment is to prevent
the fuel theft. It consists of a microcontroller circuit and GSM module. This will be used in a bike
with a battery. When the vehicle is in the parking or any place in idle mode and if someone tries to
take off the fuel this system will detect the decreasing level of the fuel with the help of the float
sensor and create an event. This event created by the microcontroller will send a SMS with help of
the GSM module on owner’s mobile phone and will also ring a buzzer or siren present in the bike.
The beauty of the system is that the larcener will not be able to deactivate this system because the
system will be hidden in the side panel of the bike and also the buzzer will be hidden”.
Finally, they concluded their system is a unique method of designing and implementing a low cost
circuit to detect the fuel theft attempted by using GSM technology and ARM LPC2148 [6].

5
CHAPTER THREE
System Design and Analysis

3.1. System Components and Operations

This project has a GSM modem which send sms to owner of vehicle when there is fuel
theft going on. The system uses a level sensor which senses the level of the fuel in the tank
and sends a voltage level to the Arduino analog pin which is proportional to the fuel level.
Whenever the car is at rest and its fuel level is decreasing, the system is triggered to take
an action based on the program loaded in Arduino. Then the Arduino turns on the buzzer
and sends SMS to the car/bike owner. The Microcontroller of an Arduino is a main heart
or Central Processing Unit of the system. If we are driving our car or bike, petrol or the
diesel level will decrease which can trigger the microcontroller through the level sensor.
To avoid this situation, we will take a signal from ignition key. Whenever the bike owner
or car owner or driver inserts key into the ignition lock and switch it on then at that time a
signal will be given to the Arduino. This way the system understands that the bike/car has
been started and so it will not send text. So once the person gets out of the car then he/she
will remove the key and system is activated. The level of the fuel is compared with the
value it has when the key is removed. If the value is decreased the Arduino turned the
buzzer on and it sends a message to the phone number included in the code of the Arduino.
3.1.1 Hard ware Components
1. Liquid level sensor
Liquid level sensors are termed as the sensors used for detecting liquid levels or interfaces
between liquids such as water and oil or solids and liquids. These sensors can also be
defined as transducers or as integrated systems with instrumentation and control
capabilities. This type of liquid level sensor is one of the most important sensors and plays
a vital role in variety of industrial and consumer applications.
Industrial applications include liquid-level sensing in transport tanks, storage tanks and
water treatment tanks, and also in the petrochemical industries for sensing liquids such as
petrol, diesel and other fuels. Level sensors are designed for specific applications compared
to general applications [9].

6
This is an important block at the input side of Arduino. The function of liquid level is to
detect the variation in fuel level and it gives variable output voltage as per the variations in
level. This liquid level sensor can be used for any type of liquid. So it can be used for petrol
as well as diesel or in some cases it can be used for water level detection as well.
2. Arduino
Arduino is an open-source platform used for building electronics projects. Arduino consists
of both a physical programmable circuit board (often referred to as a microcontroller) and
a piece of software, or IDE (Integrated Development Environment) that runs on our
computer, used to write and upload computer code to the physical board. Arduino provides
a standard form factor that breaks out the functions of the micro-controller into a more
accessible package [8].
Arduino is the central part of our system. It is connected to all components. It is the
component that have to be program. It receives an input signal from the level sensor and
the ignition key through the input ports that are assigned by the program. The gsm module
and the buzzer connected to the ports that are assigned as an output port. Based on the
program the Arduino decides when and at which input port signal level should the output
ports are activated. For example, based on the signal that comes from the ignition key it
decided whether the total system should be activated or not. Most of the intelligence and
computation work is completed by the Arduino.

figure 3. 1 Arduino

7
3. Buzzer or siren
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or piezoelectric. Buzzer plays very important role in our project. A
buzzer is turned on whenever petrol theft is going on or petrol is stolen. Buzzer will be
turned on as soon as there is decrease in petrol level without ignition key. Loud noise of
buzzer will draw attention of persons in the surrounding so they can come to know that
something wrong is happening with the car. This can save further fuel theft. The buzzer is
connected to the port of an Arduino assigned as digital output.

figure 3. 2 Buzzer

3.GSM module
GSM is a mobile communication system; it is stands for global system for mobile
communication (GSM). It is widely used mobile communication system in the world.
GSM is an open and digital cellular technology used for transmitting mobile voice and data
services operates at the 850MHz, 900MHz, 1800MHz and 1900MHz frequency bands [8].
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.
A GSM/GPRS MODEM can perform the following operations:
1.Receive, send or delete SMS messages in a SIM.
2. Read, add, search phonebook entries of the SIM.
3. Make, Receive, or reject a voice call.

8
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 [7].
AT commands are instructions used to control a modem. AT is the abbreviation of
ATtention. Every command line starts with "AT" or "at". That's why modem commands
are called AT commands. Many of the commands that are used to control wired dial-up
modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to
online data state), are also supported by GSM/GPRS modems and mobile phones. Besides
this common AT command set, GSM/GPRS modems and mobile phones support an AT
command set that is specific to the GSM technology, which includes SMS-related
commands like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from
storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages) [8].
In our project GSM module is used to send messages to the owner of the car or bike. We
have to insert a GSM sim card into this GSM modem. An Arduino sends the commands
for sending SMS to the GSM modem. These commands are sent through serial
communication port. This technology is used because many times we go to the multiplex
or theater or shopping mall and we park car on the road or in the parking area so we are
not near the car or the bike. Whenever petrol theft is going on user will get SMS and user
can rush to the bike or car to check the safety of bike.

figure 3. 3 GSM module

9
4.Liquid Crystal Display
The LCDs have a parallel interface, meaning that the microcontroller has to manipulate
several interface pins at once to control the display. The interface consists of the following
pins:
A register selects (RS) pin that controls where in the LCD's memory we are writing data
to. We can select either the data register, which holds what goes on the screen, or an
instruction register, which is where the LCD's controller looks for instructions on what to
do next. LCDS consists the following pins
 A Read/Write (R/W) pin that selects reading mode or writing mode
 An Enable pin that enables writing to the registers
 8 data pins (D0 -D7). The states of these pins (high or low) are the bits that you're
writing to a register when you write, or the values you're reading when you read.
 a display contrast pin, control the display contrast
 power supply pins (+5V and Gnd) pins that we can use to power the LCD,
 LED Backlight (Bklt+ and BKlt-) pins turn on and off the LED backlight,
respectively.
The process of controlling the display involves putting the data that form the image of what
you want to display into the data registers, then putting instructions in the instruction
register [10]. We used it to indicate the status of the system and to show the fuel level in
the tank.

figure 3. 4 Liquid Crystal display(LCd)

10
5.Zener diode
Zener diodes are semiconductor diodes which have been manufactured to have their
reverse breakdown occur at a specific, well-defined voltage (its “Zener voltage”), and
that are designed such that they can be operated continuously in that breakdown mode.
Commonly available Zener diodes are available with breakdown voltages (“Zener
voltages”) anywhere from 1.8 to 200 V.

figure 3. 5 Apearance and schematic representation of zener diode

figure 3. 6 zener diode characteristic graph when operating in forward mode

11
The Zener still conducts electricity in the forward direction like any other diode, but also
conducts in the reverse direction, if the voltage applied is reversed and larger than the
Zener breakdown voltage.

figure 3. 7 Zener diodes characteristic graph in forward and reverse mode

Zener diodes has many applications such as clipper, clamper and voltage regulator. We
used zener diodes as regulator. the voltage supplied by the car battery is 12V DC .But
many electronic circuit uses 5V as an input voltage.so that We used a simple circit that
contains zener diode that performs this task.

3.1.1 Software Components


1.Arduino Software (IDE)
The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains
a text editor for writing code, a message area, a text console, a toolbar with buttons for
common functions and a series of menus. It connects to the Arduino and Genuino hardware
to upload programs and communicate with them.

12
2.Proteus software
The Proteus Design Suite is an Electronic Design Automation (EDA) tool including
schematic capture, simulation and PCB Layout modules. We use this software for
simulation. We used it to simulate our system.

3.2. System Design and Analysis


3.2.1. Block Diagram of the system

Power Source

BUZZER
LEVEL
SENSOR

GSM
ARDUINO MODEM

IGNITION
KEY
LCD

figure 3. 8 General system Block Diagram

13
3.2.2 Flow chart that shows overall operation

start

No Ignition key on? yes

Lcd display “system


Lcd print “system deactivated’
Read fuel level Active”
Fuel level displayed
Lcd print fuel level

Level decrease ?

Yes No

Lcd print Lcd print Fuel level


Send SMS turn on Buzzer ”Fuel theft detected”

figure 3. 9 flow chart

 The system checks if the car is being driven by checking the switch signal that is
fed to the Arduino. If there is signal the system will be deactivated. Any Decrease
in the fuel level doesn’t trigger the system to take action. But, the fuel level will be
displayed.
 If there is no signal from the switch, the system will be active. If there is a decrease
in fuel level ,the system will take action. It send sms to the owner and turned the
buzzer on.

14
3.2.3. Circuit Design

RV1
LM016L
LCD

R1 R2 100
1.02k 1.02k

VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14
12V D1
1N5338BRL

CAR BATERY CTS


ARDUINO
Xmodem, Ymodem, Zmodem

RTS
0
TXD PD0/RXD A5
RX
1 PC5/ADC5/SCL
PD1/TXD A4
TX

DIGITAL (~PWM)
VT52, VT100, ANSI
2 PC4/ADC4/SDA
RXD PD2/INT0 A3
3 PC3/ADC3 level sensor

ANALOG IN
PD3/INT1
~
A2
4 PC2/ADC2
PD4/T0/XCK A1
5 PC1/ADC1

ATMEGA328P-PU
PD5/T1
~
A0
6 PC0/ADC0
PD6/AIN0
~
7
PD7/AIN1

1121
8
R3 R4

microcontrolandos.blogspot.com
PB0/ICP1/CLKO
9
PB1/OC1A
~
10
1.02k 1.02k PB2/SS/OC1B
~
11
PB3/MOSI/OC2A
~
12 RESET
PB4/MISO
13
PB5/SCK
IGNITION SWITCH
IGNITION SWITCH(COM)
AREF

D2
1N5338BRL

ARDUINO UNO R3
BUZ1 VCC=R2

BUZZER

GSM MODULE
Power BTN
NEXT www.TheEngineeringProjects.com

STATUS

ON SIM900D
TXD
RXD
S2-1041Y-Z097C

CE0980

SIM Card
SIM900D-GREEN

figure 3. 10 circiut Design

3.2.3.1. Component Interfacing


3.2.3.1.1. Arduino
Power ports
The power input port of the Arduino is connected with the output terminal of the regulator
The ports are no shown in fig. As they are a hidden pin for proteus simulation software.
Serial ports
The serial ports PD0, PD1, PD2, PD3, PD4, PD5 and PB5 of the Arduino used as serial
data transmission from the Arduino to the gsm module and LCD.

15
In this circuit diagram PD0 and PD1 the default tx , rx port is connected with the virtual
terminal that displays the AT commands sent by the Arduino to the gsm module. This is
only for simulation purpose. The tx , rx of the virtual terminal is connected with rx,tx of
the Arduino .The other PD pins are connected with the four serial port of the lcd.
The four ports are labeled as D4, D5, D6 and D7. It is through this port the Arduino sent
the messages to be displayed.
PB5 or pin 9 is connected with the rx pin of the GSM module. The Arduino sends the AT
commands through this port serially.
Analog ports
The level sensor is connected to pin A0 which is assigned to receive the analog voltage
level which is proportional to the level in the fuel tank. For simulation purpose we
connected pis wise linear signal generator to pin A0.
Digital ports
The buzzer and the signal that comes from ignition switch is connected with Digital pins.
Normally the ignition switch signal is 12V.but this is regulated by the regulator and the
output is given to pin-8.
The buzzer is connected to pin 13. Whenever the system detects fuel theft this pin goes to
high state and the buzzer will be turned on.
3.2.3.1.2.The LCD
 VDD is connected with the out put of the regulator
 VSS is connected with ground
 RS pin to digital pin 12 of the Arduino
 Enable(E) to digital pin 11 of the Arduino
 Potentio meter wiper is connected with VEE to control the brightness
3.2.3.1.3.The Ignition Switch
It is connected with the regulator input. For simulation purpose we use a high input
impedance single pole switch.

3.2.3. Arduino Code


#include <SoftwareSerial.h>

16
#include<LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
SoftwareSerial mySerial(9, 10);
const int ignite=8;
const int level=0;
int prev;
int temp;
void setup()
{
pinMode(level,INPUT);
pinMode(ignite,INPUT);
Serial.begin(9600);
lcd.begin(16,2);
}
void loop()
{
if(digitalRead(ignite)==LOW)
{
lcd.setCursor(0,0);
lcd.print("system activated");
prev=analogRead(level);
lcd.setCursor(0,1);
lcd.print("prev=");
lcd.setCursor(6,1);
lcd.print(analogRead(level)*5/1024);
if(analogRead(level)<prev)
{
lcd.setCursor(0,0);

17
lcd.print("theft detected");
levelprint();
digitalWrite(13,HIGH);
delay(1000);
digitalWrite(13,LOW);
int i=0;
while(i<=3)
{ sendSMS();
delay(5000);
}}
else
{
digitalWrite(13,LOW);
} }
else
{
analogRead(level);
digitalWrite(13,LOW);
lcd.setCursor(0,0);
lcd.print("system deactivated");
lcd.setCursor(0,1);
lcd.print("cur=");
lcd.setCursor(5,1);
lcd.print(analogRead(level)*5/1024);
}}
void levelprint()
{float temp=analogRead(level);
lcd.setCursor(7,1);

18
lcd.print("curre=");
lcd.setCursor(12,1);
lcd.print(temp*5/1024);}
void sendSMS()
{
Serial.println("AT+CMGD=1"); //Delete privious sent SMS
delay(1000);
Serial.println("AT+CMGF=1"); //Set SMS configuration
delay(1000);
Serial.print("AT+CMGW="); //Write New SMS
Serial.write(34); //Double quotes ASCII Code
Serial.print("+251918268043"); //Enter Your Mobile number
Serial.write(34);
Serial.println(); //Send Crrige return
delay(1000);
Serial.println("Alert: Theft Detected");
delay(1000);
Serial.write(26); //Cntrl+Z
delay(1000);delay(1000);
Serial.println("AT+CMSS=1"); //Send SMS from memory location 1
delay(4000);}

19
CHAPTER FOUR
Results and Discussions
4.1. Software simulation results and discussions
4.1.1 Regulator simulation result

figure 4. 1Regulator simulation result

The designed regulator is given 12V DC voltage as input and its output is measured using
DC voltmeter.
The result is 5.04V DC as shown in fig.4.1 which is very close to the desired 5V DC output.

4.1.2. System Simulation

figure 4. 2simulation result1

In this case the switch is off and the vehicle is assumed to be at rest. But the system monitor
the fuel level and system is active as displayed by the LCD. The fuel level at this condition
also displayed.

20
figure 4. 3Arduino program section that results in simulation 1

figure 4. 4Input signal given to the system

21
The above figure shows the signal we used in place of the level sensor. Since we cannot
find any sensor library, we make a decision to use this signal. We made an assumption the
output of the level sensor is linear and it can be resemble as the above figure

figure 4. 5simulation result 2

For this case the system doesn’t detect the decrement in the fuel level .Because there is a
signal from switch. So the Arduino assume it as the car is driven by some one. But the fuel
level will be displayed.

22
figure 4. 6 simulation result 3

Now the system detects theft and sends AT commands to the GSM module as shown in
fig.4.1 .The GSM module in turn sends it to the GSM network.The message will be
received by the cell phone of the owner.

23
CHAPTER FIVE
Conclusion and Recommendations
5.1 Conclusion
From the results that we found from the simulation, the system is able to detect changes
in the fuel level. It can also take actions based on the situation it detects. We believe that if
the system is installed in vehicles, it will have the ability to prevent the fuel theft. The
power section of the circuit design is effective on distributing regulated voltage.
This is a unique method of designing and implementing a low cost circuit to detect the fuel
theft attempted by using GSM technology. This system will help us to solve the fuel theft
problem.

5.2 Recommendations for Future work


To the future this system can be improved by
 Integrating vibrator sensor .This sensor can sense the vibration of fuel tank and
sends digital signal to the Arduino.
 Further improvement can be done by sending the fuel level to the owner by sms .

24
List of References

1.http://www.researchgate.net/publication/292143922_GSM_Based_Fuel_Theft_Detecto
r_Using_Microcontroller
2. http://www.westmercia.police.uk/media/5830/Fuel-theft-advice-
sheet/pdf/Fuel_Theft_Advice_Sheet.pdf

3.http://academia.edu/10224813/Automatic_prevention_model_for_vehicle_fuel_theft
4 Nandini Hiremath, Mrunali Kumbhar, Aakriti Singh Pathania, International Journal of
Engineering Research & Technology (IJERT), Vol. 4 Issue 09, September-2015.

5 .Naomi Somer Lepcha,Tshering Sangmo Sherpa, Jitendra Singh Tamang, GSM Based Fuel Theft
Detector Using Microcontroller Department of E&C Engineering, Sikkim Manipal Institute of
Technology (SMIT), Volume-4 Issue-3, 2015.

6. Prof. Trupti K. Wable, Prof. Rajashree R. Shinde,”GSM Based Digital Fuel Meter and
Fuel Theft Detection using PIC Microcontroller”, International Journal of Advanced
Research in Science, Engineering and Technology ,Vol. 3, Issue 4 , April-2016.
7.http://www.nowsms.com/faq/what-is-a-gsm-modem
8 .http:// www.developershome.com/sms/atCommandsIntro.asp
9. http:// www.efxkits.co.uk/liquid-level-sensor-and-types-of-level-sensors/
10. http:// www.arduino.cc/en/Tutorial/HelloWorld

25

You might also like