0% found this document useful (0 votes)
121 views

Engine Lock 100%progress

This document appears to be a project report for an embedded automobile engine locking system using GSM technology. It includes an abstract that describes the project as designing and developing an embedded system to prevent vehicle theft using a GSM-enabled microcontroller installed in the engine. The report also includes sections on literature review covering relevant topics, the components used such as microcontrollers, LCD displays, relays and more. It aims to protect vehicles from unauthorized access by entering a password and notifying the owner via SMS if an incorrect password is entered.

Uploaded by

Grace Joseph
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views

Engine Lock 100%progress

This document appears to be a project report for an embedded automobile engine locking system using GSM technology. It includes an abstract that describes the project as designing and developing an embedded system to prevent vehicle theft using a GSM-enabled microcontroller installed in the engine. The report also includes sections on literature review covering relevant topics, the components used such as microcontrollers, LCD displays, relays and more. It aims to protect vehicles from unauthorized access by entering a password and notifying the owner via SMS if an incorrect password is entered.

Uploaded by

Grace Joseph
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

TECHNICAL UNIVERSITY OF MOMBASA

SCHOOL OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRICAL AND ELECTTONIC ENGINEERING
BACHELOR OF SCIENCE IN ELECTRICAL AND ELECTRONIC ENGINEERING

YEAR 5 SEMESTER 2

EEE 4502

100% Project presentation submitted in partial fulfilment requirements for the degree in Bachelor of

Science in Electrical and Electronic Engineering

Embedded Automobile Engine Locking System


BY

TENKES NDOINYIO

BSEE/124J/2016

MOBILE NO.: 0722854936

SUPERVISOR: MR. MUKHAYA

DATE SUBMITTED: 30th November 2021.


DECLARATION

I, TENKES NDOINYIO, declare that the contents of this project report represent my own
unaided work, and that the report has not previously been submitted for academic examination
towards any qualification. Furthermore, it represents my own opinions and not necessarily those
of the Technical University of Mombasa.

Signed Date
ABSTRACT

This project deals with the design & development of an embedded system, which is being used
to prevent /control the theft of a vehicle. The developed instrument is an embedded system
based on GSM technology. The instrument is installed in the engine of the vehicle. An
interfacing GSM modem is also connected to the microcontroller to send the message to the
owner’s mobile.

The main objective of this instrument is to protect the vehicle from any unauthorized access,
through entering a protected password and intimate the status of the same vehicle to the
authorize person (owner) using Global System for Mobile (GSM) communication technology.
This system deals with the concept of network security. The main concept in this design is
introducing the mobile communications into the embedded system. The entire designed unit is
on a single board. A four-digit password is set as default, using the user mobile phone and is
displayed on the 16x2 LCD. If in case we enter a wrong password a message is sent to the
owner’s mobile number and a buzzer is heard after a delay of milli second’s time.
For this 100% progress report, sufficient literature review has been conducted on the embedded
automobile engine locking system using GSM technology, from which the circuit block
diagram was adopted. The possible methodologies of realizing the project goal have equally
been evaluated which then enabled the various circuit designs to be constructed. The overall
circuit has finally been designed and simulated, and the project full construction and
actualization was successful.

ii
DEDICATION

To my family, hope you will find it relevant someday. Also, to any student in the field of
electrical engineering who will find it useful in future research.

iii
ACKNOWLEDGEMENTS

My appreciation goes to all those who have helped me in making this project a success.

I thank God the Almighty for the gift of life, peace, guidance and wisdom that he has given me
throughout the process of developing this project. It is through him that I have been
strengthened to work.

My great gratitude goes to my supervisor Mr. Mukhaya for taking his time to provide
assistance, ideas and guidance in developing this project.
I would like to thank my parents for having always been there for me, providing moral and
financial support in my academic work.
My friends who offered me support, ideas and even actual help in developing this project

iv
TABLE OF CONTENTS

Table of Contents

DECLARATION .................................................................................................................... i
ABSTRACT ......................................................................................................................... ii
DEDICATION ..................................................................................................................... iii
ACKNOWLEDGEMENTS ..................................................................................................... iv
TABLE OF CONTENTS ......................................................................................................... v
LIST OF FIGURES .............................................................................................................. vii
LIST OF TABLES ............................................................................................................... viii
LIST OF ABBREVIATIONS ................................................................................................... ix
CHAPTER ONE ................................................................................................................... 1
1 INTRODUCTION .......................................................................................................... 1
1.1 Background Information .................................................................................................. 1
1.2 Overall and Specific Objectives ........................................................................................ 1
1.2.1 Overall Objective .................................................................................................................1
1.2.2 Specific Objectives ...............................................................................................................1
1.3 Problem statement .......................................................................................................... 2
1.4 Assumptions and Limitations ........................................................................................... 2
1.4.1 Assumptions ........................................................................................................................2
1.4.2 Limitations ...........................................................................................................................2
1.5 Justification ..................................................................................................................... 2
CHAPTER TWO .................................................................................................................. 3
2 LITERATURE REVIEW........................................................................................................... 3
2.1 Introduction .................................................................................................................... 3
2.2 VEHICLE THEFT DETECTION BY GSM ................................................................................. 3
2.3 Anti-Theft Control System Design Using Embedded System .............................................. 4
2.4 Theft control system for an automobile ........................................................................... 4
2.5 vehicle loading monitoring detection using a load sensor and GSM ................................... 5
2.6 Anti-theft GSM based vehicle management systems......................................................... 6
2.7 Microcontrollers .............................................................................................................. 7
2.7.1 ATMEGA 328P microcontroller .............................................................................................7
2.7.1.1 ATmega328P UART Communication Module ................................................................................ 8
2.7.1.2 SPI Communication ATmega328P .................................................................................................. 8
2.7.1.3 I2C Communication Module .......................................................................................................... 8
2.7.1.4 TIMERS MODULES.......................................................................................................................... 8
2.7.1.5 SYSTEM CLOCK ............................................................................................................................... 9
2.7.1.6 COMPARATOR MODULE ................................................................................................................ 9
2.7.1.7 ATmega328P CAPTURE/COMPARE/PWM Channels ...................................................................... 9
2.7.1.8 ANALOG TO DIGITAL CONVERTER Channels .................................................................................. 9
2.8 Relay Control ................................................................................................................. 11
2.9 Liquid Crystal Display (LCD) unit ..................................................................................... 11
2.10 Switching Transistor .................................................................................................... 13
2.11 Buzzer ......................................................................................................................... 14
2.12 Arduino IDE ................................................................................................................. 14
2.13 Simulation Software .................................................................................................... 14
2.12 Literature Review Summary ......................................................................................... 16

v
CHAPTER THREE .............................................................................................................. 17
3 METHODOLOGY .......................................................................................................... 17
3.1 Introduction .................................................................................................................. 17
3.2 Design ........................................................................................................................... 17
3.2.1 Introduction .......................................................................................................................... 17
3.2.2 Understanding circuit component functions and determining performance specification . 17
3.2.2.1 Circuit functions; ....................................................................................................................... 17
3.2.2.2 Alarming to panic culprits ......................................................................................................... 18
3.2.2.3 Starting and stopping the engine ............................................................................................... 19
3.2.2.4 Sending and receiving SMS ....................................................................................................... 20
3.2.2.5 Components performances and Specifications ........................................................................ 21
3.2.2.5.1 Power Supply ..................................................................................................................... 21
3.2.2.5.1.1 TRANSFORMER ............................................................................................................ 21
3.2.2.5.1.2 RECTIFIER .................................................................................................................... 22
3.2.2.5.1.3 Filter Capacitor ............................................................................................................ 23
3.2.2.5.1.4 VOLTAGE REGULATION ............................................................................................... 24
3.2.2.5.2 GSM MODULE ......................................................................................................................... 25
3.2.2.5.3 12V Relay............................................................................................................................ 25
3.2.2.5.4 Buzzer ................................................................................................................................. 27
3.2.3 Overall circuit diagram and circuit operation................................................................... 29
3.2.3.1 Circuit diagram .......................................................................................................................... 29
3.2.5.2 Circuit Operation ....................................................................................................................... 29
3.3 Construction.................................................................................................................. 30
3.3.1 Introduction ...................................................................................................................... 30
3.3.2 Procurement of Components and Parts ........................................................................... 30
3.3.3 Software Simulation Stage ............................................................................................... 30
3.3.4 Breadboard stage .............................................................................................................. 33
3.3.5 Soldering Strip Board Stage .............................................................................................. 34
3.3.6 Housing ............................................................................................................................. 35
3.4 Testing .......................................................................................................................... 36
3.4.1 Introduction ...................................................................................................................... 36
3.4.2 Determining the Test Procedures .................................................................................... 36
3.4.3 Identifying functional test to be done .............................................................................. 36
3.4.4 Functional test measurements and results obtained....................................................... 37
3.5 Challenges encountered/lessons learned ....................................................................... 38
3.6 Deliverables achieved/not achieved ............................................................................... 38
3.7 Project costing ............................................................................................................... 39
3.8 Project Time Management ............................................................................................. 40
3.9 Conclusion..................................................................................................................... 41
3.10 Recommendations........................................................................................................ 41
References ...................................................................................................................... 42
APPENDICES .................................................................................................................... 44
APPENDIX A1: Atmega328 block diagram ................................................................................. 44
APPENDIX A2: Transistor load line characteristics .................................................................... 45
APPENDIX A3: Atmega328p pin configuration .......................................................................... 45
APPENDIX B1: Atmega328p Datasheet ..................................................................................... 46
APPENDIX B2: Project Program Code ....................................................................................... 46

vi
LIST OF FIGURES

Figure 2.1 Block Diagram for Vehicle Theft Control System .................................................................................... 3
Figure 2.2 Block diagram of anti-theft control system ............................................................................................ 4
Figure 2.3 block diagram Theft control system for an automobile.......................................................................... 5
Figure 2.4 block diagram of Vehicle loading monitoring system ............................................................................. 6
Figure 2.5 block diagram of Anti-theft GSM based vehicle management System .................................................. 6
Figure 2.6 ATmega328P Architecture ...................................................................................................................... 7
Figure 2.7 Relay connection diagram .................................................................................................................... 11
Figure 2.8 LCD controller diagram ......................................................................................................................... 12
Figure 2.9 Electromechanical Relay Operation ...................................................................................................... 12
Figure 2.10 NPN Transistor .................................................................................................................................... 13
Figure 3.1 block diagram of the embedded automobile engine locking system ................................................... 18
Figure 3.2 buzzer circuit diagram .......................................................................................................................... 19
Figure 3.3 interfacing ATmega328P with relay circuit diagram ............................................................................ 20
Figure 3.4 GSM shield ............................................................................................................................................ 20
Figure 3.5 power supply blocks.............................................................................................................................. 21
Figure 3.6 structure of a laminated Transformer core .......................................................................................... 21
Figure 3.7 Bridge Rectifier circuit .......................................................................................................................... 23
Figure 3.8 Smoothing diagram .............................................................................................................................. 23
Figure 3.9 LM7805 Pinout Diagram ....................................................................................................................... 24
Figure 3.10 GSM module pinout diagram ............................................................................................................. 25
Figure 3.11 Relay switching circuit ........................................................................................................................ 26
Figure 3.12 Overall project circuit diagram ........................................................................................................... 29
Figure 3.13 Proteus simulation circuit ................................................................................................................... 31
Figure 3.14 Proteus simulation circuit for satisfied operation conditions ............................................................. 32
Figure 3.15 proteus simulation circuit for unsatisfied operating conditions ......................................................... 33
Figure 3.16 breadboard circuit connection ............................................................................................................ 34
Figure 3.17 soldering diagram of the circuit.......................................................................................................... 35
Figure 3.18 project mounted onto the housing ..................................................................................................... 36
Figure 3.19 project diagram when the correct password was entered ................................................................. 37
Figure 3.20 project diagram when the wrong password is entered. ..................................................................... 38

vii
LIST OF TABLES
Table 3.1 Project Costing ....................................................................................................................................... 39
Table 3.2 Project time management ..................................................................................................................... 40

viii
LIST OF ABBREVIATIONS

GSM: Global System for Mobile communications

GPS: Global Positioning System

LCD: Liquid Crystal Display

ix
CHAPTER ONE

1 INTRODUCTION

1.1 Background Information

In these days, automobile thefts are increasing at an alarming rate all over the world. So to
escape from these thieves most of the vehicle owners have started using the theft control
systems. The commercially available anti-theft vehicular systems are very expensive. Here, we
make an attempt to develop an instrument based on 8051 microcontroller and operated using
GSM technology. The instrument is a simple and low-cost vehicle theft control embedded
system.
The Global System for Mobile communications (GSM) is the most popular and accepted
standard for mobile phones in the world established in 1982 and it operates in 900 MHz
frequency. Over billion people use GSM service across the world. The utility of the GSM
standard makes international roaming very common between mobile phone operators, enabling
subscribers to use their phones in many parts of the world. GSM differs significantly from its
predecessors in both signaling and speech clarity, as its channels is digitized. It means that the
GSM system is now considered as a third generation (3G) mobile communication system.

At 100% report, the intensive literature review conducted has delivered sufficient information
leading to fine adjustments in the project, adoption of the suitable circuit designs, components
considerations, the overall circuit design and simulation and finally the circuit hardware was
assembled and the embedded automobile engine locking system is ripe for use in preventing
vehicle theft.

1.2 Overall and Specific Objectives

1.2.1 Overall Objective


To design, construct and test an embedded automobile engine locking system that
protect vehicles from unauthorized access by giving a secure password and controlling
it by using GSM technology.

1.2.2 Specific Objectives


i. To conduct a literature review on Embedded automobile engine locking system
ii. To design Embedded automobile engine locking system
iii. To construct Embedded automobile engine locking system
iv. To test Embedded automobile engine locking system

1
1.3 Problem statement

Currently most of the people having their own vehicle, theft is happening on parking
and sometimes in driving insecure places. So, there is a need to develop a system which
can be used to protect the vehicle from any unauthorized access, through entering a
protected password and intimate the status of the same vehicle to the authorized person
(owner) using Global System for Mobile (GSM) communication technology. Therefore,
an embedded automobile engine locking system in this project is efficient in protecting
vehicles from unauthorized access.

1.4 Assumptions and Limitations

1.4.1 Assumptions
i. It is assumed that there is network coverage throughout so as to send SMS
notification to vehicle owners.
ii. It is assumed that there is an existing vehicle over which the circuit will be
connected
iii. Virtual terminal represents GSM system.
1.4.2 Limitations
i. Limited to a network subscriber i.e., Safaricom, Telkom and airtel

1.5 Justification

The development of GSM Car Security System is a solution to all vehicle owners to
increase the security of their vehicle from car theft as it can alert the owner by sending
SMS messages after detecting an intruder and the owner also can monitor their car status
by sending SMS messages.

2
CHAPTER TWO

2 LITERATURE REVIEW

2.1 Introduction

Many researchers have come up with ways and means of solving this common problem of
vehicle theft. Other methods are being faced out while others are being invented. Some of the
systems that have been made using different control modules so as to assist in the reduction of
vehicle theft are highlighted briefly in this chapter. Some of these systems are;

1. Vehicle Theft Detection System


2. Anti-Theft Control System Design Using Embedded System
3. Theft control system for an automobile
4. vehicle loading and monitoring system using a load sensor and GSM
5. Anti-theft GSM based vehicle management systems
6. Microcontrollers

2.2 VEHICLE THEFT DETECTION BY GSM

In the works by D. Gurunath, Dr. Sreeja Mole S (2018), This GSM based vehicle theft control
system retrieves vehicle status whether it is in theft mode. This data is fed to the
microcontroller, which is interfaced to a GSM modem. The microcontroller generates the
vibrations and sends an SMS to the concerned authority over GSM modem on periodical
intervals which is set by the user. An LCD display is connected to the microcontroller for
crossing the data received before being sent over GSM.

Figure 2.1 Block Diagram for Vehicle Theft Control System

3
2.3 Anti-Theft Control System Design Using Embedded System

In the works by Vinoth Kumar Sadagopan (2011) designed a system in which when the key
is inserted in the key hole the inductive proximity sensor detects the key and triggers the
microcontroller. A password check message is displayed on the LCD provided inside the car
and at the same time the owner is alerted with a message about the usage of his car.
Totally three trials are provided to enter the correct password. If the entered password is
incorrect a second electronic lock system gets activated and the doors are locked. An alert
message is sent to the police and the owner about the illegal access of his car. With the help of
GPS the exact location of his car is found and the key of the second lock system is available
only with the owner hence a total control over the vehicle is established.

Figure 2.2 Block diagram of anti-theft control system


2.4 Theft control system for an automobile

In the works by Wankhade, P.P. and Dahad, S.O., 2011, This project deals with the
design & development of a theft control system for an automobile, which is being used
to prevent/control the theft of a vehicle. The developed system makes use of an
embedded system based on Global System for Mobile communication (GSM)
technology. The designed & developed system is installed in the vehicle. An interfacing
mobile is also connected to the microcontroller, which is in turn, connected to the
engine. Once, the vehicle is being stolen, the information is being used by the vehicle
owner for further processing. The information is passed onto the central processing
insurance system which is in the form of the sms, the microcontroller unit reads the sms
and sends it to the Global Positioning System (GPS) module and using the triangulation

4
method, GPS module feeds the exact location in the form of latitude and longitude to
the user’s mobile. By reading the signals received by the mobile, one can control the
ignition of the engine; say to lock it or to stop the engine immediately. The main concept
in this design is introducing the mobile communication into an embedded system. The
designed unit is very simple & low cost. The entire designed unit is on a single chip.

Figure 2.3 block diagram Theft control system for an automobile

2.5 vehicle loading monitoring detection using a load sensor and GSM

In the works by Odonkor, E.N. and Ofosu, W.K., 2020, Vehicle overloading is one of
the major problems confronting many developing nations and Ghana is not an exception.
Two attendant problems are accidents, and damage to road infrastructure. Weighing
stations may be the answer to these conditions, but few are used for measuring the
weight of some specific vehicles in Ghana. A vehicle loading monitoring detection using
a load sensor and GSM model with an automatic engine lock system is proposed in this
study as a solution. The proposed system will detect vehicle overloading and
automatically call the owner of the vehicle or the road safety officer in that event.
Proteus software is used for designing and simulating the circuit while programming is
done using the Arduino software. Microcontroller ATMEGA 328 serves as the brain of
the design and Global System for Mobile Communications (GSM) module serves as the
communication link. A Liquid Crystal Display (LCD) is used to display the status of the
vehicle. In addition, a buzzer is to sound an alarm when vehicle overloading is detected.
The system has facilities to lock a vehicle engine automatically.

5
Figure 2.4 block diagram of Vehicle loading monitoring system

2.6 Anti-theft GSM based vehicle management systems

Samir Rana, Ritu Mewari, Lata Nautiyal (2018) designed an Anti-theft Security System for
Vehicles. It consists of three modules. First, the user’s license is scanned by means of NFC tag
and when it is read, the microcontroller sends a message to the owner for authorization. The
authorized user can access the vehicle for an authorized period of time.

Second, if the license is lost and finds any illegal activity, the user is allowed to lock the vehicle
by using mobile application to prevent from theft.
Third, if anyone tries to unlock the vehicle, the microelectromechanical system sends a signal
to microcontroller, immediately an emergency alert message sends to both the owner and the
current user, simultaneously alarm blows out to have a surrounding attention.

Figure 2.5 block diagram of Anti-theft GSM based vehicle management System

6
2.7 Microcontrollers

Microcontroller is a device that acts like the brain of any system. It performs complex functions
by taking in signal from various input interfaced to it and consequently providing command to
various outputs connected to it as per the program. There are many types of microcontrollers
available in the market and they vary from one another. These microcontrollers are discussed
as follows.

2.7.1 ATMEGA 328P microcontroller

ATmega328P is one of the high performances AVR technology microcontroller with a large
number of pins and features. It is designed by 8-bit CMOS technology and RSIC CPU which
enhance its performance and its power efficiency get improved by auto sleeps and internal
temperature sensor. This ATmega328P IC comes with internal protections and multiple
programming methods which helps the engineers to priorities this controller for different
situations. The IC allows multiple modern era communications methods for other modules
and microcontrollers itself, which is why the microcontroller ATmega328P usage has been
increasing every day.

Figure 2.6 ATmega328P Architecture

7
2.7.1.1 ATmega328P UART Communication Module
Although there are multiple kinds of communication systems within the devices and modules
but the most common one is USART. It is one of the simplest and easiest method for implement
and understanding by most of the developers and systems. In this method, two wires used to
send and receive the data. The USART pins of microcontroller ATmega328P are:

 RX – GPIO2
 TX – GPIO3
The data can be sent by specified the sending rate within the controllers but it can also use the
external clock pin to keep the data sync.

 XCK – GPIO6
USART/UART communication system can be used to program the microcontroller.

2.7.1.2 SPI Communication ATmega328P


It one of the best serial communication systems in the case of multiple peripherals. SPI protocol
allows multiple devices to use the same channel for communication. It consists of four wires,
two for data sending and one for clock but the fourth wire is used to select the peripherals knows
as a select slave. In the case of multiple peripherals number of the select slave, pins will be
increased. The SPI pins of the microcontroller are:
 MOSI – GPIO17
 MISO – GPIO18
 SS – GPIO16
 SCK – GPIO19
2.7.1.3 I2C Communication Module
Most of the peripherals come with the I2C communication method which is one way at a specific
time. I2C protocol only uses one data wire and one clock wire. Data wire will transfer and
receive the data and clock wire will send the clock pulse to keep the data sync. The wires on
the microcontroller are:

 SDA – GPIO27
 SCL – GPIO28
2.7.1.4 TIMERS MODULES
ATtiny328P has two internal timers. We can use these timers to make counters and to generate
pulses. Both of these timers are dependent on an oscillator. Both timers can use the internal and
external clock to operate, but they also have an internal pin which can be used to count

8
according to the external pulses. All of these pins in microcontroller ATmega328P are given
below:

 T0 – GPIO6
 T1 – GPIO11
 TOSC1 – GPIO9
 TOSC2 – GPIO10
 ICP1 – GPIO
ICP1 is an input capture pin which can be used to capture the external pulse at a specific interval
of time. When an input pulse will occur on this pin then it will generate a timestamp which can
tell when the external signal was received.

2.7.1.5 SYSTEM CLOCK


The internal clock and external clock pulses can be divided by the Prescaler and their value can
be received at an external pin. The external pin for divided clock pulses will be:

 CLKO – GPIO14
2.7.1.6 COMPARATOR MODULE
The microcontroller has internal comparator modules for analog signal. This module takes the
input in inverting and non-inverting form which can be used further for any internal purpose or
it can also be used to generate the output signals. Comparator pins of the microcontroller are
listed below:

 AN0 (Positive) – GPIO12


 AN1 (Negative) – GPIO13
2.7.1.7 ATmega328P CAPTURE/COMPARE/PWM Channels
There are six capture/compare/PWM pins are used to generate the desired time pulse-based
signal. It uses a Prescaler to divide the time pulse. All of these pins in ATmega328P are:

 OC0B – GPIO11
 OC0A – GPIO12
 OC1A – GPIO15
 OC1B – GPIO16
 OC2A – GPIO17
 OC2B – GPIO5
2.7.1.8 ANALOG TO DIGITAL CONVERTER Channels
In ATmega328P there are 6 ADC channels that can be used to convert the analog signal to
digital. The analog converter needs to be activated first by its power pin (AVCC). The ADC

9
channels use power supply voltage as a reference to differentiate the different levels of the
analog signal. The analog pins of the controller are:

 ADC0 – GPIO23
 ADC1 – GPIO24
 ADC2 – GPIO25
 ADC3 – GPIO26
 ADC4 – GPIO27
 ADC5 – GPIO28
 AVCC – Pin20
AREF PINS
Sometimes the analog signal voltages are fluctuating but it kept measuring by the controller
according to the power input of the controller. To measure it by any other power input or by the
power of analog signal generating device, an analog voltage reference AREF will be used. This
pin will detect the maximum value of the analog signal and then it will be able to give the proper
output. AREF pin in ATmega328P is:

 AREF – GPIO21
RESET: In ATmega328 there is some reset to restart the microcontroller in some conditions.
In all of these resets there is an external reset to reset the device using an external signal:
 RESET – GPIO1
POWER: Every controller needs the power to operate and it always has a power input pin. In
ATmega328P the power pins are three in number. One pin is for voltage and the remaining two
are for common ground. Both of these ground pins are connected internally, it doesn’t matter
which one is used. The power pins of the microcontroller are:
 VCC – Pin7
 GND – Pin8, Pin22
OSCILLATOR: The controller comes with 8MHz changeable oscillator. However, it can also
use the external oscillator up to 40MHz. To use the external oscillator, oscillation pins will be
required for input and output of the signal. Those pins are given below:
 XTAL1 – GPIO9
 XTAL2 – GPIO10

10
2.8 Relay Control

A relay is an electromechanical switching device that allows a high-power circuit to be


controlled by a small input current, using an electromagnetic coil to operate a set of changeover
switches. When a supply voltage is connected to the coil, current flows and a magnetic field
will be produced that attracts the armature to close one set of contacts and/or open another set
which in turn switch a load on/off. On de-energizing the relay, the magnetic flux in the coil
collapses and produces a fairly high voltage in the opposite direction. This resulting voltage can
damage the driver transistor and thus a reverse- biased diode is connected across the coil to
short-out the spike when it occurs.

Figure 2.7 Relay connection diagram


Based on the fact that the microcontroller pins can only provide up to 25 mA in comparison to
a relay coil which requires approximately 100 mA to operate, a switching transistor is used for
adjustment purposes with its collector circuit connecting to the relay coil. When +5 V is
delivered to transistor base, transistor activates the relay, which then using its contacts, connects
to the load in the circuit. The purpose of the resistor at the transistor base is to keep a 0 V on
base to prevent the relay from activating by mistake. Relay coils normally operate at +12 V or
+24 V, but a 5 V relay can be connected directly to a digital or microcontroller system.

2.9 Liquid Crystal Display (LCD) unit

A 16x2 character Line LCD module is a parallel port module. An 8051 program must interact
with the outside world using input and output devices that communicate directly with a human
being. One of the most common devices attached to an 8051 µC is an LCD display. LCD
requires 3 control lines as well as 8 I/O lines for the data bus. So, this LCD will require a total
of 11 data lines.

11
Figure 2.8 LCD controller diagram
The operating circuit (circuit 1), see the figure 16, is connected to a solenoid coil wound round
iron core. A current in the coil forms an electromagnetic which attracts the soft-iron armature.
This brings the contact point together, circuit 2 is closed and current flows. When the circuit 1
is switched off the steel spring returns the armature to the open position and current in circuit 2
is switched off.

Figure 2.9 Electromechanical Relay Operation


Normally, relay have 5 terminals out of which two terminals are of coils, a common terminal,
normally closed terminal and a Normally Open terminal.

Follow the steps to identify the relay pins;

 Take a multimeter and adjust it to resistance measurement mode (usually in 2K


mode).

 If you see, the five pin is arranged in two columns. One column consists of 3
pins where other consist 2 pins. The two-coil pin and a common pin are situated

12
in one side as shown in figure below. The pin which lies in center are common
pin and the two side pins are coil pins.

2.10 Switching Transistor

Transistor switches are used for a wide variety of applications such as interfacing large current
or high voltage devices. Transistor BC547 is used for interfacing a relay a low voltage digital
logic microcontroller. The reason for choosing this transistor over other transistors is because
relay needs a minimum rating of 5mV and 16mA and has comparatively higher rating than
other transistors. In cut-off region, the operating conditions of the transistor are zero input base
current (IB ), zero output collector current ( IC ) and maximum collector voltage ( VCE ) which
results in a large depletion layer and no current flowing through the device. Therefore, the
transistor is switched “Fully-OFF”. In saturation region, the transistor will be biased so that the
maximum amount of base current is applied, resulting in maximum collector current resulting
in the minimum collector emitter voltage drop which results in the depletion layer being as
small as possible and maximum current flowing through the transistor. Therefore, the transistor
is switched “Fully-ON”.

Figure 2.10 NPN Transistor


The diagram above represents a typical bipolar transistor in a circuit. Charge will flow between
emitter and collector terminals depending on the current in the base. Because internally the base
and emitter connections behave like a semiconductor diode, a voltage drop develops between
base and emitter while the base current exists. The amount of this voltage depends on the
material the transistor is made from, and is referred to as VBE. In a switching circuit, the idea is
to simulate, as near as possible, the ideal switch having the properties of open circuit when off,
short circuit when on, and an instantaneous transition between the two states. Parameters are
chosen such that the "off" output is limited to leakage currents too small to affect connected

13
circuitry; the resistance of the transistor in the "on" state is too small to affect circuitry; and the
transition between the two states is fast enough not to have a detrimental effect.

2.11 Buzzer

A 5V Buzzer Module General Description: A buzzer or beeper is an audio signaling device,


which may be mechanical, electromechanical, or piezoelectric. Typical uses of buzzers and
beepers include alarm devices, timers and confirmation of user input such as a mouse click or
keystroke. Buzzer is an integrated structure of electronic transducers, DC power supply, widely
used in computers, printers, copiers, alarms, electronic toys, automotive electronic equipment,
telephones, timers and other electronic products for sound devices. Active buzzer 5V Rated
power can be directly connected to a continuous sound.

2.12 Arduino IDE

Arduino IDE is a GUI based Software that supports all the Arduino based microcontrollers. It
is a cross platform application written in the programming language Java. It is an open-source
Software (IDE) that makes it very easy to write code and also upload it to the board. It runs on
various operating systems Windows, Mac OS X and Linux. It originated from the IDE for the
languages such as Processing and Wiring. A program written with the IDE for Arduino is called
a "sketch". The Arduino IDE supports the languages such as C and C++ using special rules to
organize the code. The Arduino IDE supplies a software library called Wiring from the Wiring
project, which provides a lot of common input and output procedures.

2.13 Simulation Software

According to (Banks, 2001), Simulation is the process of imitation of the operation of a real-
world process or system over time. They require the use of models; the model is a representative
of the key characteristics or behaviors of the selected system or process, whereas the simulation
represents the evolution of the model over time. Quite often, computers with the appropriate
software are used to execute the simulations.

Types of circuit simulators


Today there are innumerable circuit modeling and simulation software of which a few are
described below:

14
I. Proteus: It’s described as a Virtual System Modeling and circuit simulation
application. It combines mixed mode SPICE circuit simulation application, animated
components and microprocessor models to facilitate co-simulation of complete
microcontroller-based designs. Proteus has the ability to simulate the interaction
between software running on microcontroller and any analog or digital electronics
connected to it, it simulates Input/Output ports, interrupts, timers, USARTs and all other
peripherals present on each supported processor (Proteus).
Advanced one supports a range of useful functions and features like graph-based
analysis which includes frequency, noise, distortion, Fourier parameters etc. The
software runs on the Windows operating system.
II. CircuitLogix: this is a student version electronics simulation software that enables
performing analog, digital and mixed mode circuit analysis and simulation. It’s a SPICE
simulation software that provides 4000 devices on its student version which is 1/3 of
the pro version. This circuit building software give access to switches, linear IC and
digital IC, FET, Transistors, relays, displays, signal generators, SCR’s, opto isolators,
photo diodes, semiconductors, motors etc. it also works on Windows system.
III. TINA Design Suite: it’s a circuit simulator, circuit designer and PCB design software
package for analyzing, designing, and real time testing of analog, digital, IBIS, HDL,
MCU, and mixed electronic circuits and their PCB layouts. It also analyzes SMPS, RF
and communication and optoelectronic circuits; generates and debugs MCU code using
the integrated flowchart tool; and test microcontroller applications in a mixed circuit
environment

15
2.12 Literature Review Summary

Most of these systems discussed above involved manual operation to some extend and those
automated are too expensive to implement. Their main aim is to protect the vehicle from any
unauthorized access, through entering a protected password and intimate the status of the same
vehicle to the authorize person (owner) using Global System for Mobile (GSM) communication
technology. For instance, Anti-Theft Control System Design Using Embedded Systems
requires the use of a key for it to unlock or lock the engine thus unable to cope with mobility
and can only be controlled within the vicinity due to limited range of operation. Also, for the
Anti-theft GSM based vehicle management systems requires Wi-Fi, the main disadvantage is
that a high-end personal computer is required which increases the cost of installation.

Based on the literature review that had been done, I have learnt that in selecting suitable
components like a GSM, both static and dynamic properties must be considered. These
properties play a significant role in the performance of the specified component or the entire
circuit.

16
CHAPTER THREE

3 METHODOLOGY

3.1 Introduction

This chapter contains the basic flow of methodology and approach for the project. The project
is divided into three parts which are design, construction and testing. Furthermore, the project
comprises of software and hardware parts. The software involves writing code and
programming the microcontroller and debugging to correct any errors in the code. The hardware
implementation involves designing the circuit of the project, constructing and then interfacing
the hardware and the software before testing the project. Each part of the project will be
discussed in details in this chapter.

3.2 Design

3.2.1 Introduction
The design can only be done best by first understanding the objectives of the project through
the block diagram.

3.2.2 Understanding circuit component functions and determining performance


specification
An automated energy saving control system is a system whose performance rely on sensors
which measures different environmental condition such as temperature, light intensity and
occupancy. The general flow of how the various components of the system work and their
dependability is as shown below.

3.2.2.1 Circuit functions;


1. Alarming to panic culprits

2. Starting and stopping the engine

3. Sending and receiving SMS

17
Power supply Relay

Controller Engine
(Atmega328p)

GSM(SIM800L) Display (LCD)

User phone
Buzzer

Figure 3.1 block diagram of the embedded automobile engine locking system

MATCHING CIRCUIT FUNCTIONS

3.2.2.2 Alarming to panic culprits


A 5V Buzzer Module or beeper is used as an audio signaling to create a noise to panic the
culprit. The buzzer ON and OFF is controlled by the pair of switching transistors (BC 547).
The buzzer is connected in the Q2 transistor collector terminal.
When high pulse signal is given to base of the Q1 transistors, the transistor is conducting and
close the collector and emitter terminal so zero signals is given to base of the Q2 transistor.
Hence Q2 transistor and buzzer is turned OFF state.

18
When low pulse is given to base of transistor Q1 transistor, the transistor is turned OFF. Now
12v is given to base of Q2 transistor so the transistor is conducting and buzzer is energized
and produces the sound signal.

Figure 3.2 buzzer circuit diagram

3.2.2.3 Starting and stopping the engine


Atmega328P acts as the brain of this project. It receives the signal from the GSM and User
phone and uses this information to decide whether to bias switching transistors to energize
relays to turn ON the vehicle engine being controlled or not. When the relay is excited by
applying the 12V DC the relay gets activated and, in the process, turns ON the device and
when the excited voltage is stopped, the relay gets deactivated and, in the process, turns OFF
the devices.

19
Figure 3.3 interfacing ATmega328P with relay circuit diagram

3.2.2.4 Sending and receiving SMS


GSM (SIM900A) is used as a communication channel to send or receive messages and make
or receive calls just like a mobile phone by using a SIM card of any network provider. The
arduino GSM shield allows an Arduino board to connect to the internet, send and receive sms.

 RING - LOW state while receiving call


 DTR - sleep mode. Default in HIGH state (module in sleep mode, serial
communication disabled). After setting it in LOW the module will wake up.

Figure 3.4 GSM shield

20
3.2.2.5 Components performances and Specifications
3.2.2.5.1 Power Supply
Power Supply section is required to convert AC signal to DC signal and also to reduce the
amplitude of the signal. The available voltage signal from the mains is 230V/50Hz which is
an AC voltage, but the required is DC voltage (no frequency) with the amplitude of +5V and
+12V for various applications. The 230V, 50Hz AC mains is stepped down by transformer X1
to deliver a secondary output of 12V, 500 mA. The transformer output is rectified by a full-
wave rectifier comprising diodes D1 through D4, filtered by capacitor C1 and regulated by
ICs 7812 (IC2) and 7805 (IC3). Capacitor C2 bypasses the ripples present in the regulated
supply. LED1 acts as the power indicator and R1 limits the current through LED1.
A power supply can be broken down into a series of blocks, each of which performs a particular
function.

Figure 3.5 power supply blocks

3.2.2.5.1.1 TRANSFORMER

Figure 3.6 structure of a laminated Transformer core

The laminated core transformer is the one used here. This is because of the low frequency
operation. Since the circuit requires 12 V and 300mA to operate, the transformer selected is 240
V to 12V, 500mA step down transformer. This is because the transformer current rating should

21
be slightly above the circuit rated current in order to comfortably handle the power demand. To
get the input current, the transformer equation can be used.

From here we can get

Vp =240V
Vs= 12V
Is= 0.5A
Therefore,

Ip which is the input current to the transformer can be calculated as follows.

3.2.2.5.1.2 RECTIFIER

Since the aim of using diode is to convert ac to dc, rectifier diode is selected for this purpose.
Each of the four diodes is required to carry the required current of 300mA and withstand a
voltage of at least 12 volts. Therefore, the best diode for this is the one rated just above 300mA
and above 12 volts. Therefore, the ideal diode for this is IN4007. It has a current capacity of 1
ampere and Peak inverse voltage capacity of 1000 volts. Four of them will be used to form a
four-diode bridge rectifier.

22
Figure 3.7 Bridge Rectifier circuit

3.2.2.5.1.3 Filter Capacitor


Smoothing is performed by a large value electrolytic capacitor connected across the DC supply
to act as a reservoir, supplying current to the output when the varying DC voltage from the
rectifier is falling. The diagram shows the unsmoothed varying DC (dotted line) and the
smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC, and
then discharges as it supplies current to the output.

Figure 3.8 Smoothing diagram

A smoothing capacitor was used here to generate a ripple free DC. A smoothing capacitor is
also a filter capacitor and it converts the full wave rectified AC output into a smooth DC. The
power rating of the capacitor must be greater than the off load output voltage supply. The ripple
that appears in the capacitor is directly proportional to the load current and inverse to the
capacitive value. The capacitor selected keeps the peak-to-peak values of the ripple minimum
under full load condition. Therefore, knowledge of Ripple factor was essential while designing
the values of capacitors which is given by:

𝒀 = 𝟏⁄𝟒√(𝟑𝒇𝑹𝑪)…………………………………………………Equation 3.1

23
Where: Y= ripple factor

f= frequency of AC (50 Hz)

R= resistance calculated

R= V/Ic

V= secondary voltage of transformer =6√2=8. 4

R=8.45/500mA=16.9Ω standard 18Ω chosen

C= filtering capacitance

Capacitance for filtering is determined from the following equations:

𝒀 = 𝑽𝒂𝒄 −𝒓𝒎𝒔 /𝑽𝒅𝒄 ……………………………………………......…Equation 3.2

𝑽𝒓
𝑽𝒂𝒄_𝒓𝒎𝒔 =
𝟐
√𝟑…………….……………………………………..Equation 3.3

𝑽𝒅𝒄 = 𝑽𝑴𝒂𝒙 − (𝑽𝒓 /𝟐)…………………………………………….Equation 3.4

𝑽𝒓 = 𝑽𝑴𝒂𝒙 − 𝑽𝑴𝒊𝒏 ………………………………………………...Equation 3.5

Therefore, from the above equations, Vr = 5.2-4.8 =0. 4V, Vac-rms = .3464V, Vdc = 5V and
Y=0 .06928. Hence the capacitor value is found out by substituting the ripple factor in equation
3.1 above. Thus, C= 2314 µF and standard 2200µF is chosen

3.2.2.5.1.4 VOLTAGE REGULATION


The 78XX positive voltage regulator IC is used. This is because our voltage is a positive one
and that it can handle up to 1 A output therefore appropriate for our load which is 300mA. Since
our required output is 5 volts, we use 7805 voltage regulator IC.

Figure 3.9 LM7805 Pinout Diagram

24
3.2.2.5.2 GSM MODULE
GSM (SIM900A) is used as a communication channel to send or receive messages and make
or receive calls just like a mobile phone by using a SIM card of any network provider.

Figure 3.10 GSM module pinout diagram

Specification

 Supply voltage: 3.8V - 4.2V


 Recommended supply voltage: 4V
 Power consumption:
o sleep mode < 2.0mA
o idle mode < 7.0mA
o GSM transmission (avg): 350 mA
o GSM transmission (peek): 2000mA
 Module size: 25 x 23 mm
 Interface: UART (max. 2.8V) and AT commands
 SIM card socket: microSIM (bottom side)
 Supported frequencies: Quad Band (850 / 950 / 1800 /1900 MHz)
 Antenna connector: IPX
 Status signaling: LED
 Working temperature range: -40 do + 85 ° C

3.2.2.5.3 12V Relay


Generally, you will find the different parameter of relay like coil voltage, coil resistance etc. on
relay itself. But sometime coil resistance is not given, in that case we have to measure the
resistance between two terminals of coil.

25
In my case multimeter shows the resistance of 102-ohms (figure 4) but for easy we take 100-
ohms for calculation.

Coil resistance

Coil rated voltage

By using Ohm’s law, we can calculate current required to energized the relay coil

𝑉 =𝐼∗𝑅
𝑉 6
𝐼 = 𝑅 = 100 = 0.06𝐴 = 60𝑚𝐴

As we know that pin of Arduino or any microcontroller cannot handle current more than 40 mA
thus, we have to design a simple switch circuit. The relay switch circuit is shown in figure 6. A
transistor with collector current (IC) bigger than the above calculated value (60mA), is used in
a switching circuit.

Figure 3.11 Relay switching circuit


The transistor I am decide to use is BC548 but you can use any general-purpose transistor like
BC47 or 2N2222 etc. according to the availability.

The hfe of transistor BC 548 is 75 (according to datasheet).

The collector current (IC) = 60mA (Calculated previously)

We know that

26
ℎ𝑓𝑐 = 𝐼𝑐/𝐼𝑏
So, base current (Ib) can be calculated as;

𝐼𝑐 0.06
𝐼𝑏 = = = 0.0008 = 0.8𝑚𝐴
ℎ𝑓𝑒 75

Minimum current of 0.8mA at base of transistor is required to drive the transistor in conducting
stage.

The base of transistor is connected to signal source (digital pin of Arduino) whose output
voltage is about +5V and current is of about 40mA. Current of 40mA is enough to burnout the
transistor thus we have to use a current limiting resistor.

𝑉𝑜𝑢𝑡 = +5𝑉

𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑟𝑒𝑞𝑢𝑖𝑟𝑒𝑑 = 0.5𝑚𝐴

𝑉 5
𝑅 𝑟𝑒𝑞𝑢𝑖𝑟𝑒𝑑 = = = 1000 𝑜ℎ𝑚𝑠
𝐼 0.0005
So, roughly we can use resistor of about 1000-ohms.

When the input voltage at base is earthed (i.e. an input of 0 volts). The transistor is reversed
biased and no current flows. The collector current is zero, i.e. no voltage drops at collector. The
voltage at terminal of coil 1 of relay is same as voltage at coil 2 terminal of relay i.e. there is no
potential difference that relay is de-energized.

If the input voltage is given (+5V from arduino board), then there is positive voltage applied to
the base. If this is sufficiently high (say +5V), the transistor is bottomed and the collector
voltage is effectively zero. Hence, relay become energized.

3.2.2.5.4 Buzzer
A 5V Buzzer Module or beeper is used as an audio signaling to create a noise to panic the
culprit, which may be mechanical, electromechanical, or piezoelectric. Typical uses of buzzers
and beepers include alarm devices, timers and confirmation of user input such as a mouse click
or keystroke. Buzzer is an integrated structure of electronic transducers, DC power supply,

27
widely used in computers, printers, copiers, alarms, electronic toys, automotive electronic
equipment, telephones, timers and other electronic products for sound devices. Active buzzer
5V Rated power can be directly connected to a continuous sound.

Specifications:

• On-board passive buzzer

• On-board 8550 triode drive

• Can control with single-chip microcontroller IO directly

• Working voltage: 5V

• Board size: 22 (mm) x12 (mm)

R1 = 1kohm

28
3.2.3 Overall circuit diagram and circuit operation
3.2.3.1 Circuit diagram

Figure 3.12 Overall project circuit diagram

3.2.5.2 Circuit Operation


The embedded system installed in the engine of the vehicle along with the GSM modem. By
entering a correct password from the user mobile phone (like Abcd) the instrument allows
to activate the 12V relay and then ignition of the engine will start. Hence start the vehicle. If
anyone tries to enter the password randomly, then after three trials, the MCU will block the
entry of further password. Then, the buzzer will be turned on to create a noise to panic the

29
culprit, followed by sending a message “Alert: INTRUDER DETECTED” through GSM
modem to the owner’s mobile for further action for prevention of his vehicle.

3.3 Construction

3.3.1 Introduction
The physical realization of the project is very vital. The design considerations are put to test.
Here the paper work is transformed into a software and finally into a hardware. After carrying
out all the paper design and analysis, the project was then constructed. The construction at 60%
level was done in two different stages as follows:

1. Procurement of components and parts

2. Software simulation stage

3. Breadboard stage

4. Soldering – strip board stage

5. Housing

3.3.2 Procurement of Components and Parts


From the circuit diagram, it evident that the design of the project required the use of locally
available components. These components include: ATMEGA328P microcontroller, relays,
LCD, fan, buzzer and actuator which are essential for the working of the circuit. Other
supporting components are: resistors, LEDs for power indication, jumpers, capacitors,
transistor and diodes. In addition, Arduino UNO board for loading the program to the
microcontroller.

All these components were procured from Nerokas Engineering Solutions whom they offer
high quality component at a cheaper cost. Their delivery cost was also reasonably low as
compared to others and delivery time was less than 24 hours upon placement of the order

3.3.3 Software Simulation Stage


The project was simulated using proteus software. The choice of the software was not only
informed by its flexibility in terms of providing a platform for adding new library files but also
its ability to offer wide range of components. The software has been undergoing updating and
as a result has wide range of recent components available in the market. During simulation
process, the circuit diagram of the system was first drawn in software. Since, this project uses
a microcontroller, it was necessary to have program code uploaded into the microcontroller for
it to function. I therefore used the Arduino IDE (Integrated Development Environment)

30
software. This is an open source and easy-to-use programming tool used for writing code and
uploading to the microcontroller. The programming was based on C and C++ high level
programming languages. An LCD was connected so as to display engine status i.e., when locked
or unlocked.

Figure 3.13 Proteus simulation circuit

Simulation testing was first done by loading a hex code from its library to the microcontroller
to activate its operation. The simulation was then run by clicking the run button at the bottom
left corner of the task bar. The password Inputs were changed severally during simulation and
observations on the system working and behavior made. The key idea was to check whether the
system was working as per the command provided by the program loaded to the
microcontroller. The results obtained in simulation by keying the passwords inputs from the
user virtual terminal were then noted if they conform to the functionality of the system.

31
Figure 3.14 shows simulation of the project, when the correct password was entered from the
user phone through the vehicle GSM.

Figure 3.14 Proteus simulation circuit for satisfied operation conditions

By entering a correct password from the user mobile phone which is send to the vehicle GSM
modem (which is ‘A” in this case), the switching transistor is biased by microcontroller outputs
thus energizing the 12v relays which consequently switched-on the ignition of the engine hence
starts the vehicle. The LCD also displays the status of the engine (Engine unlocked)

32
In contrasts, figure 3.15 show simulation of the project when the wrong password is entered.

Figure 3.15 proteus simulation circuit for unsatisfied operating conditions

If anyone tries to enter the password randomly, then after three trials, the MCU will block
the entry of further password. Then, the buzzer will be turned on to create a noise to panic
the culprit, followed by sending a message “Alert: INTRUDER DETECTED” through
GSM modem to the owner’s mobile for further action for prevention of his vehicle and the
LCD displays the vehicle engine status (i.e., Engine locked)

3.3.4 Breadboard stage


A breadboard is a construction base for prototyping of electronics. The purpose of the
breadboard was to make quick electrical connections between components for testing the circuit
before permanently soldering it together. The breadboard consists of terminal strips and power
rails. Terminal strips consists of metal rows that have clips to stick a wire or a leg of a
component into the exposed holes, which then holds it in place. There are about 5 clips on each
strip in which all components connected are in electrically connected. Each horizontal row is
separated by a ravine which electrically isolates both sides of a given row from one another.
The power rails are identical to the terminal strips except that they run vertically from one end
to the other. They offer easy access to power whenever needed. They are labelled ‘+’ and ‘-’
and have red and blue stripe to indicate positive and negative side. For this project, it was used

33
as preliminary stage for checking whether the software simulation results can be reflected in
the prototype.

Figure 3.16 breadboard circuit connection

3.3.5 Soldering Strip Board Stage


I soldered the components one after the other with the guidance of the circuit diagram. Having
in mind that cleanliness is essential for efficient and effective soldering, I used sand paper to
scrap gently the copper lining surface of the strip board before soldering. This was to ensure
that dirt, grease which may have resulted from touching the surface with oily hands and
oxidized surfaces of the strip board were completely removed. This is because solder will not
adhere to dirty, greasy, or oxidized surfaces. To ensure perfect soldering, I also use high quality
solder wire ensuring that the soldering gun was free from dirt and soot by constantly scrapping
it surface after soldering each component.

During soldering process, I divided the circuit into three modules namely; power supply section,
microcontroller section and relay section. This was not only to ensure that there were no short
circuits between these sections but also to provide ease in troubleshooting the circuit and
improve overall performance of the system. Components of each section were soldered as per
the circuit of each section and possibility of short circuits were examined to prevent unnecessary

34
system failure. The figure below shows the circuit implementation on the strip board.
Component’s alignment and positioning are clearly illustrated.

Figure 3.17 soldering diagram of the circuit

3.3.6 Housing
In designing the case for the system, utmost concern was given to guarding the system from
physical strain and stress during carriage and project presentation. A wooden material was used
for the casing against the glass and metallic material which could easily break and make the
project quite uneconomical, clumsy and heavy respectively. The choice of wooden material was
not only informed by ease of mounting the appliance such as sockets, lamp holder and fan as
well as the sensors and the circuit but also the cost and its availability. Overall circuit size,
sensor sizes as well as appliance to be connected served as guidelines in designing the casing.
The casing was made in a manner that permits easy mounting of the whole circuit board.

After completion of the casing, the system circuit was then mounted keenly in an enclosed
section of the casing ensuring that the surface was free from conducting material which could
lead to short circuiting the components. Sensors and electrical appliances were connected as
peripherals of the circuit using connecting wires. These sensors were ensured to be in a position
of the casing where they can easily detect the room condition without any interference.

35
Figure 3.18 project mounted onto the housing
3.4 Testing

3.4.1 Introduction

Testing is vital process in the development and realization of any design, be it hardware based,
software based or both. Thus in this project testing involves;

1. Determining the test procedures

2. Identifying functional tests to be done

3. Functional test measurements and results obtained

3.4.2 Determining the Test Procedures

The testing procedures adopted were In-Circuit Test (ICT) and Functional Circuit Test (FCT).
ICT involved performance of schematic verification by testing each individual components of
the circuit at a time by comparison against the software model. It was done to detect
construction defects such as solder shorts, missing components, wrong components and open
connections without powering the device under test (DUT). FCT on the other hand are designed
to assure that circuitry functions within specifications. It was carried out in order to detect
functional defects while applying supply power. They reveal issues with digital circuitry like
signal timing (either design or component related) and communication problems and required
thorough understanding of the DUT performance. The components that did not give the
required output specification were isolated and troubleshoot to determine the nature and cause
of the component failure through careful analysis that is examination of the working principles
of the components. Basically most components were tasted using a multimeter.

3.4.3 Identifying functional test to be done

During the testing phase, continuity test was carried out to ensure that there was proper
communication between components as well as the continuity of the power in the circuit. The

36
board was then powered by connecting it to a laptop via its USB connector cable. A short
program written involving the sensor was then loaded to the microcontroller in the board and
thereafter the GSM was then examined.

3.4.4 Functional test measurements and results obtained

After complete coupling of the system, functional circuit test was carried out. The various test
carried out was as follows;

1. Engine locking system test in response to entering of the correct password.

2. Engine locking system test in response to entering of the wrong password.

By entering a correct password from the user mobile phone which is send to the vehicle GSM
modem (which is ‘A” in this case), the switching transistor is biased by microcontroller outputs
thus energizing the 12v relays which consequently switched-on the ignition of the engine hence
starts the vehicle. The LCD also displays the status of the engine (Engine unlocked)

Figure 3.19 project diagram when the correct password was entered

In contrast, If anyone tries to enter the password randomly, then after three trials, the MCU
will block the entry of further password. Then, the buzzer will be turned on to create a noise
to panic the culprit, followed by sending a message “Alert: INTRUDER DETECTED”
through GSM modem to the owner’s mobile for further action for prevention of his vehicle
and the LCD displays the vehicle engine status (i.e., Engine locked)

37
Figure 3.20 signalling message when the wrong password is entered.
3.5 Challenges encountered/lessons learned

Like every research and practical engineering work, diverse kinds of challenges and problems
are often encountered. A number of problems and challenges were encountered during the
course of implementing this project. During the construction phase, I had problems with the
GSM. The communication and response time of the GSM dependent on the network subscriber
stability.

The flow of these applications seems to reflect the trajectory of my career from entry level
developer to a qualified circuit developer. This has enabled me gain a thorough understanding
of the design and the construction of the project.

3.6 Deliverables achieved/not achieved

In this section, the objectives of the project are compared with what has been done in order to
determine whether the objectives were either met or not. The deliverables achieved were as
follows:

1. Literature review was conducted on existing vehicle security systems. Analysis and
limitations of these systems was also done in order to design a system which fits in the
gap created by those limitations.

2. A circuit that controls the operation of the vehicle was designed and simulated using
Proteus software. Calculations were done to select the circuit components

3. An algorithm to enables the microcontroller to control vehicle security in conjunction


with GSM was developed.

4. The system prototype was constructed on the strip board.

5. Testing and analysis of the fully constructed prototype was also done.

38
3.7 Project costing

Table 3.1 Project Costing

No. ITEM QUANTITY COST/ITEM TOTAL

1 Microcontroller 1 350 350

2 Step Down Transformer 1 500 500

3 Bread Board 1 150 150

4 Strip Board 2 50 100

5 Infrared LED 1 200 200

6 Buzzer 1 100 100

7 Voltage Regulator LM2596 1 200 200

8 Diode 1N4007 1 10 10

9 switch 1 150 150

10 Relay 2 50 100

11 Capacitors 3 10 30

12 Resistors 5 10 50

13 Transistors BC547 3 5 15

14 Fan 1 400 400

15 Lamp 1 100 100

16 Socket 1 150 150

17 Multicell battery 1 100 100

18 Jumper wires 40pcs 100 100

19 Soldering wire 4m 30 120

20 Soldering gun 1 200 200

21 Header pin 2 30 60

22 Led 2 10 20

23 28 pin IC socket 1 20 50

39
24 Housing 500

25 Crystal oscillator 16Mhz 1 10 10

26 Printing and binding 1500

27 Miscellaneous expenses 1000

Expected Total cost 6265

3.8 Project Time Management

Time Management is essentially the ability to organize and plan the time spent on activities
in a day. The result of good time management is increased effectiveness and productivity. It
is a key aspect of project management and involves skills such as planning, setting goals and
prioritizing for a better performance.

Table 3.2 Project time management

JULY AUG SEPT OCT NOV

Research and documentation

Design and Data collection

Simulation

60 % presentation

Prototype design

100% presentation

40
3.9 Conclusion

It is evident from this project work that, this is a unique method of designing and assembling
an individual, compact theft control system for an automobile. This instrument is an ultimate
threat to vehicle thieves. By installing this instrument in the automobile engine, it is very
difficult to access by an unknown person, since it is based on GSM Technology. In future,
there is no doubt, that all of the vehicles will be embedded with this unique kit. In addition to
the above features, we can also add extra features like thumb/face recognition to ascertain more
security of the vehicle.

3.10 Recommendations

In this project I used a GSM system to communicate my password between the vehicle and
myself. Therefore, for better optimization to avoid network failures, I recommend the use of
ZIGBEE technology which does not require a subscriber and can only work when the
transmitter is at least 50m away from the vehicle with a broadband network of 2.4GHZ.

41
References

The International Criminal Police Organization. http://www.interpol.int/Crime-


areas/Vehicle-crime/Vehicle-crime

D. Gurunath, Dr. Sreeja Mole S. vehicle theft detection by GSM. International Journal of
Computer Applications (0975 – 8887), Volume 62– No.6, 2018.

S. TAO. Mobile Phone‐based Vehicle Positioning and Tracking and Its Application in Urban
Traffic State Estimation. Licentiate Thesis, KTH Royal Institute of Technology Stockholm,
Sweden. 2012.

Subscriber Identity Module (SIM). http://downloads.acs.com.hk/technology/490-07-


subscriber-identitymodule-sim.pdf

P. Verma, J.S. Bhatia. Design and Development of GPS-GSM based tracking system with
Google Maps Based Monitoring. International Journal of Computer Science, Engineering and
Applications (IJCSEA) Vol.3, No.3, June 2013.

Samir Rana, Ritu Mewari, Lata Nautiyal. Anti-theft GSM based vehicle management
systems. IOSR Journal of Electrical and Electronics Engineering (IOSR-JEEE) e-ISSN:
2278-1676,p-ISSN: 2320-3331, Volume 11, Issue 3 Ver. IV. 2018.

D. Rani, R. K. Reddy. Raspberry Pi Based Vehicle Tracking and Security System For Real
Time Applications. Paper ID: 34386891. 2016.

Vinoth Kumar Sadagopan. Smart Surveillance Monitoring System using Raspberry pi and pir
sensor. International Journal of Innovative Research in Advanced Engineering (IJIRAE)
ISSN: 2349-
2163. Issue 04, Volume 4. 2011.

N. C. Kumar, M. D. Kumar, D. Gokul, S. Sakthivel. Smart Automobile Security System


Using Labview. International Journal of Research in Engineering and Technology eISSN:
2319-1163 | pISSN: 2321-7308. 2014.

M. N. Ramadan, M. A. Al-Khedher, S. A. Al-Kheder. Intelligent AntiTheft and Tracking


System for Automobiles. International Journal of Machine Learning and Computing, Vol. 2,
No. 1. 2012.

R. J. Shah, A. P. Gharge. GSM Based Car Security System. International Journal of


Engineering and Innovative Technology (IJEIT)
Volume 2, Issue 4. 2012.
http://www.ijeit.com/vol%202/Issue%204/IJEIT1412201210_39.pdf

J. Abdullah. The Design of Mobile Control Car Security System. IACSIT International
Journal of Engineering and Technology, Vol.3, No.3. 2011.

42
Wankhade, P.P, Dahad, S.O., 2011. Real time vehicle locking and tracking system using
GSM and GPS technology-an anti-theft system. International Journal of Technology And
Engineering System (IJTES), 2(3), pp.272-275.

Odonkor, E.N. and Ofosu, W.K., 2020. Design and Construction of Vehicle Loading
Monitoring System Using Load Sensor and GSM. International Journal of Applied, 10(1).

43
APPENDICES

APPENDIX A1: Atmega328 block diagram

44
APPENDIX A2: Transistor load line characteristics

APPENDIX A3: Atmega328p pin configuration

45
APPENDIX B1: Atmega328p Datasheet

Technical Features of ATMEGA328P

I/O and Packages  23 Programmable I/O Lines

 28-pin PDIP

Operating Voltage  1.8 - 5.5V

Temperature Range  -40°C to 85°C

Speed Grade • 0 - 20 MHz @ 1.8 - 5.5V

Low Power  Active Mode: 0.2 mA


Consumption at
 Power-down Mode: 0.1 µA
1 MHz, 1.8V, 25°C
 Power-save Mode: 0.75 µA

Data Retention  20 years at 85°C or 100 years at 25°C.

APPENDIX B2: Project Program Code

#include <LiquidCrystal.h>
const int rs = A5, en = A4, d4 = A3, d5 = A2, d6 = A1, d7 = A0;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
#include <SoftwareSerial.h>
SoftwareSerial Serial1(11, 12);
int engine = 13;
int X = 0;
int buz = 2;
int r = 0;
int s = 0;
int q = 0;
int Z =0;
void setup() {

46
// put your setup code here, to run once:
Serial.begin(9600);
Serial1.begin(9600);
lcd.begin(16, 2);
pinMode(engine, OUTPUT);
pinMode(buz, OUTPUT);
digitalWrite(engine, LOW);
}
void loop() {
// put your main code here, to run repeatedly:
lcd.setCursor(0, 0);
lcd.print("ENGINE STATUS:");
if (Serial1.available() > 0) {
char inByte = Serial1.read();
Serial.write(inByte);
}

// read from port 0, send to port 1:


if (Serial.available() > 0) {
char inByte = Serial.read();
Serial.write(inByte);
if(inByte == 'A'){
X=1;
if( X == 1) {
lcd.setCursor(0, 1);
lcd.print("UNLOCKED.");
digitalWrite(engine, HIGH);
delay(100);
X=0;
}
}

if(inByte == 'B'){
r=1;
}

47
if(inByte == 'C'){
s=1;
}
if(inByte == 'D'){
q=1;
}
if( r == 1&s==1&q==1&Z==0) {
lcd.setCursor(0, 1);
lcd.print("LOCKED.");
digitalWrite(buz, HIGH);
Serial.print("INTRUDER DETECTED.");
delay(2000);
Z = 1;
digitalWrite(buz, LOW);
}
}
}

48

You might also like