Tracev 6

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

Motorcycle Anti-theft Alarm and Tracker system with Accident Notifier and

Engine Controller Device using Smartphone

A Thesis

Presented to the Faculty of the

College of Engineering

Tanauan City College

Tanauan City Batangas

In Partial Fulfillment

of the Requirements for the Degree

Bachelor of Science in Computer Engineering

Jomiel L. Enriquez

Jonnel Laig

Mark Julius S. Aala

Paulino H. Rimas

John Jerald A. Paz

May 8, 2020

1
APPROVAL SHEET

This thesis entitled “Motorcycle Anti-theft Alarm and Tracker system


with Accident Notifier and Engine Controller Device using Smartphone”,
prepared and submitted by JOMIEL L. ENRIQUEZ, JONNEL LAIG, MARK
JULIUS S. AALA, PAULINO H. RIMAS and JOHN JERALD A. PAZ in partial
fulfillment of the requirements for the degree of BACHELOR OF SCIENCE IN
COMPUTER ENGINEERING has been examined and recommended for oral
examination.
ENGR. ALVIN V. FAJARITO
Adviser
Approved by the Committee on Oral Examination with a grade of
________.

PANEL EXAMINERS

MARIA THERESA B. PRENDA,MSCPE

Chairman

DR. JOEVELL JOVELLANO DR. WILMA WENG P. CASALME

Member Member

Accepted in partial fulfillment of the requirements for the degree of

Bachelor of Science in Computer Engineering.

Comprehensive Examination: Passed

MARIA THERESA B. PRENDA, MSCPE

Date Dean, BS CpE

1
ACKNOWLEDGEMENT

The proponents would like to thank the following who supported and who

have given the contribution and inspiration accomplishing this study.

To Dr. Joevell Jovellano, Vice President of Academic Affairs, who supports

the proponents to make the study possible.

To Engr. Alvin V. Fajarito, Thesis Adviser, who patiently helps and

supports the proponents to improve the study.

To Engr. Maria Theresa B. Prenda, College Dean, for sharing her

knowledge and guiding the proponents on completing this study.

To Angelica Hernandez Libang and her family, for their support throughout

the development of the study.

To Dr. Wilma Weng Casalme, Vice President of student Affairs, for sharing

her knowledge and supporting the proponents.

To our beloved parents, for their moral and financial support they gave

before and during the development of the study.

And above all, to our almighty God for giving us the strength and courage

to face our responsibilities to complete the study.

2
DEDICATION

We dedicate this research to Tanauan City College who gave us the

opportunity to study free and pursue our dreams to become an Engineers

someday.

Table of Contents
Acknowledgements i
Dedication i
Table of Contents ii
List of Figures iv
List of Tables v

Chapter I The Problem and its background 1


Introduction 1
Objectives of the Study 3
Significance of the Study 3
Scope, Limitation, and Delimitations of the Study 4
Definition of Terms 6
Chapter II Review of Literature 8
Theoretical Background 8
Related Studies 14
Synthesis 17
Conceptual Framework 20
Chapter III Research Methodology 22
Research Design 22
Predesign Stage 22
Design Stage 23

3
Hardware Design and Implementation 25
Software Used in System development 27
Proposed Design 27
Chapter IV Results and Discussion 33
Considerations in Developing the system 33
Hardware Component Selection 34
Hardware Component Assembly 38
Software requirements of the System 38
Testing and Evaluation 42
Chapter V Summary, Conclusions and Recommendations 22
Summary 45
Conclusions 45
Recommendations 46
References 47

4
List of Figures
Figure 2.1 Sensitivity Curve 10
Figure 2.2 Response and Resume 11
Figure 2.3 Graph of MQ-3 Gas Detector 11
Figure 2.4 Test Circuit of Alcohol Sensor 1
Figure 2.5 Conceptual Framework 20
Figure 3.1 Conceptual Diagram 23
Figure 3.2 Schematic Diagram in Motorcycle 5
Figure 3.3 Schematic Diagram in Helmet 6
Figure 3.4 Welcoming Installation of TrACE UI 8
Figure 3.5 Entering PIN UI 8
Figure 3.6 Entering Personal Info UI 9
Figure 3.7 TrACE Main Screen UI 30
Figure 3.8 TrACE Settings UI 31
Figure 3.9 Top View, Front View and Isometric View of the Proposed Design 31
Figure 3.10 Back View and Front View of the Helmet 3
Figure 4.1 Interfacing with the Arduino Mega 37
Figure 4.2 Interfacing with the Arduino Nano 37
Figure 4.3 Entering PIN UI 38
Figure 4.4 Loading Screen UI 39
Figure 4.5 TrACE Main Screen UI 39
Figure 4.6 TrACE Settings UI 40
Figure 4.7 Google Map UI 40
Figure 4.8 Emergency Personnel UI 41
Figure 4.9 Bluetooth Terminal UI 41
Figure 4.10 About UI 42

5
List of Tables
Table 2.1 MQ-3 Specifications 13
Table 3.1 Trace Hardware Requirements 22
Table 4.1 Comparison of Available Arduino Board 35
Table 4.2 Tested Material 43

6
CHAPTER I

THE PROBLEM AND ITS BACKGROUND

Introduction

Motorcycle theft is one of the most prevalent property crimes in the

Philippines. It consistently ranks third next to theft and robbery among all

property crimes in the country, accounting for about 10% of this type of crime.

As of now, motorcycle theft happens regularly and it will be more seriously

expanding. Numerous cases about the loss of motorcycles were being heard

anywhere. It isn't only the cases that have been accounted for, however, there

are additionally different cases that have not been accounted for. In spite of the

fact that the Philippine National Police is trying to trace criminal gangs and

arrests them, the thieves have numerous methods on the best way to take a

motorcycle in a short period of time. They also smuggled it out and sold it to near

cities. At the same time, it is hard to track the criminal and also to track the stolen

motorcycle to send back to the real owner (Reyes, 2017).

The statistic of motorcycle theft ranks on the second rank of general theft.

According to the Highway Patrol Group (HPG), about 150 motorcycles are stolen

every week in Metro Manila alone or an average of 21 per day. It is also reported

that in 2014, a total of 11,870 motorcycles were stolen, while 10,771 were taken

in 2013. The lost trend is still high. What is the way to reduce loss?

1
Therefore, having a motorcycle anti-theft alarm and tracking device should

be a priority among Filipinos. Its evolution began after the first motorcycle was

produced in 1885 by Gottlieb Daimler. In 1924, the mechanical lock or padlock of

motorcycles for security had occurred. Since then, the wireless remote control for

motorcycle security systems was developed. Until now, research and

development of the device have developed to two-way communication between

owner and motorcycle. This decreases the number of stolen motorcycles and

makes it more difficult to steal. However, skilled and determined thieves can still

overcome the electronic immobilizer systems. On the other hand, the evolution of

the anti-theft device does not affect the number of motorcycles lost in the

Philippines (Srichandr, 2015).

The researchers want to introduce a device called Motorcycle Anti-theft

Alarm and Tracker system with Accident Notifier and Engine Controller Device

using Smartphone. It is a device that uses an Arduino, Accelerometer, GSM

Module and GPS Module to prevent motorcycles from being stolen. At the same

time, the device will also notify the user once the motorcycle has been stolen and

will be able to track it using the GPS that is in the device. The GSM module will

send a message once the motorcycle is stolen or someone attempts to steal it to

notify the user. If an accident happens, the device is capable of notifying and

sending the accident location with emergency personnel using the GSM module.

The device will send the location of the accident or the location of the motorcycle

in a form of google map link derived from the latitude and longitude from the GPS

2
module. The device is also connected to the battery of the motorcycle and also

connected to an emergency battery to power the device if the motorcycle’s

battery is discharged.

Thus, the system will help motorcycle riders in preventing their

motorcycles from thieves, and also for tracking their motorcycles if someone

stole it.

Problem Statement

According to The NCRPO, its weekly average crime rate on crimes

against property went down from 301 cases in the 1st semester of 2016 to 209

cases in the 2nd semester – a decrease of 30.56%.

FROM December 2014 to October last year, PNP-HPG reports show there are
more incidents of motornapping (MN) compared to carnapping (CN) on a weekly
average.

The December 2013 to June 2014 period posted the highest record of stolen
vehicles, 81 in the National Capital Region (NCR) alone: 39 CN and 42 MN. The
rates dropped significantly in the months of January to June 2015 as the weekly
rates plunged to 14 CN incidents and 37 MN incidents within a 24-week period.

Gunnacao said the higher MN rates were due to the ability of criminals to pick
keyholes of motorcycles. Likewise, lighter vehicles became easier for criminals to
stow away or take apart.

Corrective measures were also instituted in the reporting system of PNP as the
records obtained from the Directorate for Investigation and Detective

3
Management (DIDM) did not tally with HPG records. The discrepancy was due to
the bypassing of reports that territorial police files to the DIDM without being
validated. Police officials are moving to harmonize the two agencies’ records.

https://businessmirror.com.ph/2016/02/15/motor-vehicle-theft-cases-

bare-crafty-players-tech-reliant-cops-2/ businessmirror

Objectives of the Study

The main objective of this study is to design a device for tracking a stolen

motorcycle.

1. To create an anti-theft alarm and accident notifier for motorcycles.

2. To create a device that will continuously monitor the location of the moving

stolen vehicle

3. To create a device that will report the status of the vehicle.

4. To develop an android application for anti-theft and tracker device for

motorcycles.

5. To test and evaluate the efficiency, accuracy and functionality of the

device.

Significance of the Study

The Philippines is one of the countries in South East Asia with many

motorbike users. In almost every street, every corner, every road—big or small,

for sure, there is a motorcycle rider just speeding his way and avoiding fatal

traffic situations. According to Computer and Enterprise Investigations

4
Conference (CEIC) data, Philippines’s No of Motor Vehicles Registered data was

reported at 12,725,305.000 units in 2019. This records an increase from the

previous number of 11,595,434.000 Unit for 2018. Philippines’s No of Motor

Vehicles: Registered data is updated yearly, averaging 3,700,173.000 Unit from

Dec 1981 to 2019, with 39 observations. The data reached an all-time high of

12,725,305.000 Unit in 2019 and a record low of 1,006,030.000 Unit in 1981.

Because of its abundance and sudden rise in number, motorcycles or motorbikes

have recently been the common target of thieves. The National Capital Region

Police Office’s (NCRPO) Regional Investigation and Detection Management

Division (RIDMD) reported that in 2015, over 3,000 motorcycles have been

stolen from January-March alone.

https://www.ceicdata.com/en/philippines/no-of-registered-motor-vehi

cles/no-of-motor-vehicles-registered CAIC

The Motorcycle Anti-theft Alarm and Tracker system with Accident Notifier

and Engine Controller Device using Smartphones will be a big help to motorcycle

riders in tracking their motorcycles because of the gps module that is installed in

the system. The system is capable of notifying emergency personnel if an

accident happens. The system is designed to protect and track motorcycles. If a

person is lost, they can easily be tracked and brought back to a safe place by

using this system.

5
In this study, the system will inspire other researchers to develop more

effective and efficient GPS-based location tracking systems for motorcycles via

an Android device to make motorcycles more secure and safe in public places.

The technological significance will benefit from this project as well, in this case,

the researchers want the people to make more use of this one of the latest

technologies.

Scope, Limitations and Delimitations of the Study

The main focus of this project is to design an efficient Motorcycle Anti-theft

Alarm and Tracker system with Accident Notifier and Engine Controller Device

using Smartphone. The system will be using an Accelerometer, GSM, GPS, MQ3

and Bluetooth module. With this device, tracking and locating of your motorcycle

will be easy. Using GSM and GPS modules, the device will be able to send

messages and locate the user’s motorcycle. Using Smartphones, the users will

enable on and off the engine of the motorcycle. Using the MQ3 and Bluetooth

module, the user needs to wear the helmet to start the engine of the motorcycle.

This will help motorcycle riders to prevent accidents. Below are the scope,

limitations and delimitations of the device.

The system was designed to detect the alcohol concentration in the breath

of motorcycle riders. If the riders drink wine or anything kind of alcohol and thier

blood alcohol concentration does not match the allowed blood alcohol

concentration for driving, the rider will not be able to start the engine of the

6
motorcycle. It will help the riders to prevent motorcycle accidents. Another

feature of the system is to track the motorcycle if someone stole the vehicle. With

the help of TrACE android application, the location of the motorcycle can be

tracked and it will help the riders to know the exact location of the motorcycle.

When an accident occurs, it will help the emergency personnel to track the

location of the accident. The TrACE android application is secured by entering

PIN Code or Password. TrACE application is also used to control the engine of

the vehicle.

The system was designed to get the exact latitude and longitude of the

system and use that information in checking the location of the motorcycle. To

get that information, the device requires a strong connection to a satellite using a

GPS module. But not all places have a stable connection, this limits the system

in getting the exact location of the motorcycle. Thus the user will not be able to

track the motorcycle if it is stolen.

The helmet has a MQ3 alcohol sensor module to measure the blood

alcohol concentration of the user to trigger the system to turn off the ignition of

the motorcycle when the blood alcohol concentration of the user has not matched

the desired alcohol concentration in driving a motorcycle. The MQ3 alcohol

sensor module needs to be energized for several minutes to function properly.

The system is powered by a 5 volts DC power supply. If the device’s

supply is discharged, tracking and locating the vehicle will be impossible.

7
The device was designed to be mounted only in the compartment of the

motorcycle where the device will be safe and not be deactivated easily by

thieves.

The device uses the motorcycle’s battery as the backup power supply of

the device to all the modules that are connected in the arduino. This can drain

the motorcycle’s battery if the device’s battery charge is low.

The device length is seven inches, with a width of 5.5 inches and a height

of 3.2 inches. With this size, it can’t be installed in other types of motorcycle that

has a smaller compartment.

Definition of Terms

For better understanding of the study, the following terms are defined:

Accelerometer. An electromechanical device used to measure

acceleration forces. Such forces may be static, like the continuous force of

gravity or, as is the case with many mobile devices, dynamic to sense movement

or vibrations.

Alcohol. a colorless volatile flammable liquid that is produced by the

natural fermentation of sugars and is the intoxicating constituent of wine, beer,

spirits, and other drinks.

Android. An open-source operating system used for smartphones and

tablet computers.

8
Anti-theft system. Used to describe equipment that is intended to prevent

something from being stolen. In this study, the researchers create an anti-theft

alarm to prevent motor napping.

Battery. A container consisting of one or more cells, in which chemical

energy is converted into electricity and used as a source of power.

Blood alcohol concentration. Blood Alcohol Concentration (BAC) refers

to the percent of alcohol (ethyl alcohol or ethanol) in a person's bloodstream. A

BAC of .10% means that an individual's blood supply contains one part alcohol

for every 1000 parts blood.

Bluetooth. A wireless technology standard used for exchanging data

between fixed and mobile devices over short distances using short-wavelength.

Buzzer. An electrical device, similar to a bell, that makes a buzzing noise

and is used for signaling.

Cellular. Denoting or relating to a mobile telephone system that uses a

number of short-range radio stations to cover the area that it serves, the signal

being automatically switched from one station to another as the user travels

about.

Engine immobilizer. An electronic security device fitted to a motor vehicle

that prevents the engine from running unless the key is the correct key.

9
GPS. A global navigation satellite system that provides location, velocity

and time synchronization.

GSM (Global System for Mobile Communications). A globally accepted

standard for digital cellular communication that provides mobile, wireless

communication support for voice and data services.

Horn. A device on a vehicle that is used to make a loud sound as a

warning or signal.

Indicator. A thing that indicates the state or level of something.

Infrared Sensor. An electronic device that emits in order to sense some

aspects of the surroundings. An IR sensor can measure the heat of an object as

well as detects the motion.

Li-ion battery. A lithium-ion battery is a type of rechargeable battery.

Lithium-ion batteries are commonly used for portable electronics and electric

vehicles.

MQ3. This alcohol sensor is suitable for detecting alcohol concentration

on your breath, just like your common breathalyzer. It has a high sensitivity and

fast response time.

Password. A string of characters that allows access to a computer system

or service.

10
Relay. Switches that open and close circuits electro mechanically or

electronically. Relay control one electrical circuit by opening and closing contacts

in another circuit.

SD Card. A proprietary non-volatile memory card format developed by the

SD Association for use in portable devices.

Sensor. a device which detects or measures a physical property and

records, indicates, or otherwise responds to it.

https://alcohol.stanford.edu/alcohol-drug-info/buzz-buzz/what-bac

“Stanford”.

TrACE. This is the given name to the android application, which stands for

Tracker ACE.

Tracker. A person who tracks someone or something by following their

trail. In this study, the user tracks their motorcycle using a smartphone.

Two-way communication. A form of transmission in which both parties

involved transmit information. In this study, the GSM module is the device to

receive and send the sms to a user.

Vibration. A very small, fast, and continuous shaking movement.

11
CHAPTER II

REVIEW OF LITERATURE

This chapter covers the theoretical background, related studies, synthesis

and conceptual framework that demonstrates the concepts and ideas used in the

realization of the study.

Theoretical Background

Alongside in Vietnam, the Philippines is likely the following nation in

SouthEast Asia with many motorcycle users. In pretty much every road, each

corner, each street, huge or little, without a doubt, there is a cruiser rider simply

speeding his direction and keeping away from Manila's 'deadly' traffic

circumstance.

In light of its plenitude and unexpected ascent in number, motorcycles

have recently been the common target of thieves. In fact, during the previous four

years, the most noteworthy number of motor napping in the nation has reliably

been recorded.

The National Capital Region Police Office's (NCRPO) Regional

Investigation and Detection Management Division (RIDMD) detailed that in 2015,

more than 3,000 motorcycles have been stolen from January-March alone. The

figures demonstrate a monstrous 11.89% hop from the insights during a similar

period the earlier year with just a little more than 2,500 units taken.

12
Everyone riders think that there are safe places to park their motorcycle,

but there is not. Even good restaurants with an armed guard is not actually a safe

place. So, what will you do if your motorcycle is stolen without knowing who took

it? Using a cellphone, anti-theft and tracker device will help to prevent your

motorcycle from thieves and to recover your stolen motorcycle (Man, 2015).

An anti-theft device makes it more difficult for thieves to drive someone’s

motorcycle. This anti-theft device will immediately notify the motorcycle’s user if

someone tries to start or move his motorcycle. And it will be easy to recover his

motorcycle using a tracker device that will send the location of the motorcycle.

Using a phone, it will be easy to turn off the ignition of the bike in just one tap on

the rider’s phone (Roepel, 2019).

The Motorcycle Security System using GSM and RFID is meant to make a

model of a motorbike safety system using frequency Identification (RFID) and

Global System of Communication (GSM) for controllable and improved safety on

motorcycles. This technique provides the most effective level of safety for

motorcycle users from hackers or thieves. it's the sound of the alarm whenever

the system is compromised or the occurrence of robbery. Noise is going to be

generated automatically once the user motorcycles are notified via text message

alert messages (SMS) when the events that occurred during the invasion or

burglary. This research uses Passive RFID as a second key to show on the

motorcycle and also using a microcontroller as a medium to regulate the function

of the entire system. As a prototype, push also needed during this sort of security

13
to point out that if any movement interrupted happened to the motorcycle (W.W.I.

Wan Jusoh, K.A. Mohd Annuar , S.H. Johari, I.M. Saadon, M.H. Harun, 2015).

The concepts presented in topical form focus on trace, sensor used in

detecting alcohol and helmet detection, module used in transmitting and

receiving information, and module used in getting the location of the device.

Sensor for Detecting Alcohol. If the job of the device is to detect the

presence of alcohol in breath, then gas sensors are to be selected. There are

several kinds of sensor technologies that can detect the presence or absence of

a various gases, such as Carbon dioxide sensor, Breathalyzer, Carbon monoxide

detector, Catalytic bead sensor, Hydrogen sensor, Air pollution sensor, Nitrogen

oxide sensor, Oxygen sensor, Ozone monitor, Electrochemical gas sensor, Gas

detector, Hygrometer (Finoit, 2018). The researcher selected the MQ-3 alcohol

gas sensor to detect alcohol concentration in breath. It is a low-cost

semiconductor sensor which can detect the presence of alcohol gases at

concentrations from 0.05 mg/L to 10 mg/L. The sensitive material used for this

sensor is SnO2, whose conductivity is lower in clean air. Its conductivity

increases as the concentration of alcohol gases increases. It has high sensitivity

14
to alcohol and has a good resistance to disturbances due to smoke, vapor and

gasoline. This module provides both digital and analog outputs. MQ-3 alcohol

sensor module can be easily interfaced with Microcontrollers, Arduino Boards

and Raspberry Pi (Sunrom, 2018).

Figure 2.1 Sensitivity Curve

As shown in Figure 2.1, shows the VRL in alcohol with different

concentrations. The resistance load RL is 4.7 KΩ and the test is finished in

standard test conditions.

Figure 2.2 Response and Resume

Figure 2.2 shows the changing of VRL in the process of putting the sensor

into target gas and removing it out.

15
Figure 2.3 Graph of MQ-3 Gas Detector

Shown in figure 2.3, the different curves for each gas the MQ-3 can detect.

The ordinate is the resistance ratio of the sensor (Rs/R0), the abscissa is

concentration of gases. Rs means resistance in target gas with different

concentration, R0 means resistance of sensor in clean air. All tests are finished

under standard test conditions. Rs means resistance of the sensor in 125ppm

alcohol (C2H5OH) under different temperatures. and humidity. Rso means

resistance of the sensor in 125% alcohol(C2H5OJ) under 20℃/55%RH

(Zhengzhou Winsen Electronics Technology Co., 2015).

Figure 2.4 Test Circuit of Alcohol Sensor

Shown in Figure 2.4 is the basic test circuit of the sensor. The sensor

needs to be put 2 voltage, heater voltage(VH)and test voltage(VC). VH used

to supply certified working temperature to the sensor, while VC used to detect

voltage (VRL) on load resistance (RL)which is in series with the sensor. The

sensor has light polarity, VC needs DC power. VC and VH could use the same

power circuit with precondition to assure performance of the sensor. In order to

make the sensor with better performance, suitable RL value is needed: Power of

16
Sensitivity body (Ps): Ps=Vc2×Rs/(Rs+RL)2 and Resistance of sensor (Rs):

Rs=(Vc/VRL-1)×RL (Zhengzhou Winsen Electronics Technology Co., 2015).

Table 2.1 MQ-3 Specifications

Sensor for helmet detection. IR detectors are little microchips with a

photocell that are tuned to listen to infrared light. This sensor is almost always

used for remote control detection - every TV and DVD player has one of these in

the front to listen for the IR signal from the clicker. Inside the remote control is a

matching IR LED, which emits IR pulses to tell the TV to turn on, off or change

17
channels. IR light is not visible to the human eye, which means it takes a little

more work to test a setup.

https://learn.adafruit.com/ir-sensor Adafruit

Figure 2.5 IR Datasheet Graph

Figure 2.5 shows IR datasheet graph, the peak frequency detection is at

38 KHz and the peak LED color is 940 nm. The datasheet graph shows from

about 35 KHz to 41 KHz but the sensitivity will drop off so that it wont detect as

well from afar. Likewise, this indicates that an 850 to 1100 nm LEDs can be used

in helmet detection but they won't work as well as 900 to 1000nm.

18
Module used for transmitting and receiving. HC-05 is a Bluetooth

module which is designed for wireless communication. This module can be used

in a master or slave configuration.

Figure 2.6 HC-05 Pin Description

The HC-05 has two operating modes, one is the Data mode in which it can

send and receive data from other Bluetooth devices and the other is the AT

Command mode where the default device settings can be changed. The device

can be operated in either of these two modes by using the key pin as shown in

Figure 2.6.

https://components101.com/wireless/hc-05-bluetooth-module Adafruit

GSM module. listening to a house that’s miles away or activate the

sprinkler system in a garden just with a silent call, SIM800L GSM/GPRS module

serves as a solid launching point in getting started with IoT. SIM800L

19
GSM/GPRS module is a miniature GSM modem, which can be integrated into a

great number of IoT projects.

Figure 2.7 SIM800L GSM/GPRS module

At the heart of the module is a SIM800L GSM cellular chip from SimCom.

The operating voltage of the chip is from 3.4V to 4.4V, which makes it an ideal

candidate for direct LiPo battery supply. This makes it a good choice for

embedding into projects without a lot of space.

All the necessary data pins of SIM800L GSM chip are broken out to a 0.1″

pitch headers. The module includes pins required for communication with a

microcontroller over UART. The module supports baud rate from 1200bps to

115200bps with Auto-Baud detection.

The module needs an external antenna to connect to a network. The

module usually comes with a Helical Antenna and solders directly to NET pin on

PCB. The board also has a U.FL connector facility in for keeping the antenna

away from the board.

20
Figure 2.8 SIM800L GSM/GPRS module Sim Socket

Figure 2.8 shows SIM800LT has a SIM socket on the back. Any activated,

2G micro SIM card would work perfectly. Correct direction for inserting SIM card

is normally engraved on the surface of the SIM socket.

The SIM800L module measures only 1 inch² but packs a surprising

amount of features into its little frame. Some of them are listed below:

● Supports Quad-band: GSM850, EGSM900, DCS1800 and PCS1900


● Connect onto any global GSM network with any 2G SIM
● Make and receive voice calls using an external 8Ω speaker & electret
microphone
● Send and receive SMS messages
● Send and receive GPRS data (TCP/IP, HTTP, etc.)
● Scan and receive FM radio broadcasts
● Transmit Power:
○ Class 4 (2W) for GSM850
○ Class 1 (1W) for DCS1800

21
● Serial-based AT Command Set
● FL connectors for cell antennae
● Accepts Micro SIM Card

https://lastminuteengineers.com/sim800l-gsm-module-arduino-tutori
al/ Last Minute Engineer

GPS module. The NEO-6MV2 is a GPS (Global Positioning System)

module and is used for navigation. The module simply checks its location on

earth and provides output data which is longitude and latitude of its position.It is

from a family of stand-alone GPS receivers featuring the high performance u-blox

6 positioning engine. These flexible and cost effective receivers offer numerous

connectivity options in a miniature (16 x 12.2 x 2.4 mm) package. The compact

architecture, power and memory options make NEO-6 modules ideal for battery

operated mobile devices.

Table 2.2 NEO-6MV2 GPS Module Pin Configuration

22
Figure 2.2 shows the pin configuration of NEO-6MV2 GPS Module. The

module has four output pins. The VCC and GND pin is the positive power pin and

ground pin of the module; these pins will be connected to 5 volts and ground of

the supply. The remaining two pins is the RX and TX pin, these pins is used for

communicating to the module from the microprocessor and vice versa. The

NEO-6MV2 module has different feature wich are listed below.

● Standalone GPS receiver

● Anti-jamming technology

● UART Interface at the output pins (Can use SPI ,I2C and USB by

soldering pins to the chip core)

● Under 1 second time-to-first-fix for hot and aided starts

● Receiver type: 50 Channels - GPS L1 frequency - SBAS (WAAS,

EGNOS, MSAS, GAGAN)

● Time-To-First-fix: For Cold Start 32s, For Warm Start 23s, For Hot Start

<1s

● Maximum navigation update rate: 5Hz

● Default baud rate: 9600bps

● EEPROM with battery backup

● Sensitivity: -160dBm

● Supply voltage: 3.6V

● Maximum DC current at any output: 10mA

● Operation limits: Gravity-4g, Altitude-50000m, Velocity-500m/s

23
● Operating temperature range: -40ºC TO 85°C

Microcontroller. An Arduino is actually a microcontroller based kit which

can be either used directly by purchasing from the vendor or can be made at

home using the components, owing to its open source hardware feature. It is

basically used in communications and in controlling or operating many devices.

Figure 2.5 Arduino Architecture

Shown in Figure 2.5, It consists of two memories, Program memory and

the data memory. The code is stored in the flash program memory, whereas the

data is stored in the data memory. The Atmega328 has 32 KB of flash memory

24
for storing code (of which 0.5 KB is used for the bootloader), 2 KB of SRAM and

1 KB of EEPROM and operates with a clock speed of 16MHz.

https://www.elprocus.com/arduino-basics-and-design/ El Pro Cus

Figure 2.6 Arduino Pin Diagram

As shown in Figure 2.6, Arduino Atmega consists of 14 digital input/output

pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal

oscillator, a USB connection, a power jack, an ICSP header, and a reset button.

Related Studies

There are different kinds of anti-theft devices in the market and many

types of research about it. In Motorcycle anti-theft system (mats) research, the

25
device uses a vibrator sensor that uses piezoelectric effect to detect vibrations in

the motorcycle when the engine is off to detect if someone is trying to steal a

motorcycle. The vibration sensor will trigger the system to notify the motorcycle

owner (Abu, 2010).

In Motorcycle Location Tracker for Android research, the device requires

using GPS to get the exact location of the motorcycle by getting the derived

latitude and longitude. The device also requires a strong internet connection to

accurately track motorcycles using GPS module and a wifi module to connect in

a wifi that is in the range of the device, that way it will be easy to track a stolen

motorcycle (Yusof, 2014).

Another related project is Motorcycle GPS Tracker. It is waterproof, has an

anti-tamper feature that alerts you if someone tries to disable or remove the GPS

Tracker and has an engine immobilizer so you can turn off the engine with a text

from your cell phone – perfect for theft prevention. It also has a built-in

shock/motion alarm that will alert you if someone tries to move or roll your

motorcycle (tracker, 2015).

In a project entitled Microcontroller-based Vehicle Security System with

Tracking Capability using GSM and GPS Technologies, the project is geared to

help vehicle owners to become more comfortable and secured with their vehicle

using. GSM and GPS technologies. With the sensor, the owner no longer needs

to constantly check if the vehicle is still in the parking area as when the sensor is

26
triggered, the security alarm is activated and the device will send messages that

can alert the owner. There is likewise no need to place chains because the

device can control the functions of the vehicle. It can automatically turn the

engine off/on and the main switch of the vehicle. With the help of this anti-theft

device, vehicle owners will no longer need to worry when they leave their vehicle

in a public or private place because the GSM module enables communication

between the vehicle and the owner. When the vehicle gets stolen, the GPS

receiver module will give the reliable location of the vehicle through coordinates

which will help locate the stolen vehicle (Kodavati, 2015).

In a project entitled Application of GSM for Monitoring System, this project

has several GSM Applications in various fields such as the medical field for

detecting body temperature and heartbeat rate. This project uses GPS to get the

exact location of the device, GSM for send and receive SMS message, Solar

Panel to charge the battery and get energy from the sum, vibration sensor to

detect vibrations and impact by using piezoelectric field, RFID to secure the

vehicle by allowing a specific ID to access all the features of the device, and

AMR its function in a wireless ECG using Bluetooth. This project was built on a

mobile phone (Anjali Rathore, Akriti Panwar, Deepika Kumari, Upedra Kumar,

2015).

The entitled project GSM based home security using a hybrid sensor array

is a project to prevent this type of crime. This project works in a hybrid sensor

27
array and GSM to provide security of residential areas at the time of absence of

people from home (Nafize Ishtiaque Hossain, Sakib Reza, 2015).

In the Implementation of accelerometer sensor and GPS module for the

smart bike, the researcher uses different modules such as accelerometer sensor

acts as a sensor to detect the movement of the bicycle which be programmed in

the microcontroller and then the buzzer will sound, Microcontroller will also send

a message to the GSM modem then GSM modem will send the message

automatically to the smartphone in the form of an automatic message or short

message. On the Android smartphone, the message will be displayed on the app

(Faisal Alfaeru, Aries Boedi Setiawan, Nachrowi, Rachmat Hidayat S, 2017).

In a project of Motorcycle Security System using GSM and RFID, this

project is designed to create a model of a motorcycle safety system using Radio

Frequency Identification (RFID) and Global System of Communication (GSM) for

controllable and improved safety on motorcycles. This system provides the best

possible level of safety for motorcycle users from hackers or thieves. It has the

sound of the alarm system each time the system is compromised or the

occurrence of robbery. Noise will be generated automatically once the user

motorcycles will be notified via text message alert messages (SMS) when the

events that occurred during the invasion or burglary. This research uses Passive

RFID as a second key to turn on the motorcycle and also using a microcontroller

as a medium to control the function of the whole system. As a prototype,

push-button also needed this type of security to show that if any movement

28
interrupted happened to the motorcycle (W.W.I. Wan Jusoh, K.A. Mohd Annuar ,

S.H. Johari, I.M. Saadon, M.H. Harun, 2015).

In the Development of Multi-Home Alarm System based on GSM

Technology, this study aimed to integrate intrusion and smoke alarm systems and

to develop a cost-effective prototype of a multi-home alarm system that can send

a notification to users using GSM technology. The module that uses are GSM

technology, smoke detector, intrusion alarm, microcontroller project, ultrasonic

sensor, ionization sensor (Crystalynne D. Cortez, Jennifer L. Santos, Ken M.

Alberto, Patrick O. Kua, Reynan C. Muncada, and Kevin R. Pontiveros, 2016).

Synthesis

Just like the Motorcycle GPS Tracker ( manila gps trackers ), Motorcycle

Anti-theft Alarm and Tracker system with Accident Notifier and Engine Controller

Device using Smartphone also has engine immobilizer that can turn on and off

the motorcycle’s engine with an SMS message but the device has an android

application that is used in sending SMS to turn ON and OFF the engine. The

user does not have to write the message and contact number of the device in

sending a message. Using the application, by just tapping the engine immobilizer

button, it will send the message. This way, it will not consume too much time and

the user will be able to control their motorcycle in an efficient way.

29
In Baburao Kodavati’s study entitled Microcontroller-based Vehicle

Security System with Tracking Capability using GSM and GPS Technologies, the

device uses only GSM and GPS module. The vehicle owner will be more

comfortable and secured with their vehicle because the device uses GSM and

GPS module. The owner will no longer need to go and check the parking lot if

their motorcycle is still there. The owner will just send a message to check if their

vehicle is still parked in the parking area. There is no longer a need to place

chains because the vehicle is already secured. Motorcycle Anti-theft Alarm and

Tracker system with Accident Notifier and Engine Controller Device using

Smartphone is just like this study. Using the application, the user will be able to

check the location of the motorcycle by tapping the location check in the

application to send a message to the motorcycle asking its current location. The

device is programmed to respond to its current location immediately. This way,

the vehicle is highly secured and completely equipped with a device to secure it.

In the study of Application of GSM for Monitoring System (Zhou Guoxiang,

Zhou Jun, Miao Yubin, Liu Chengliang), this study has a mobile application and

use a device like GSM and GPS, this study can play a role in a medical field for

detecting body temperature and heartbeat rate. In Motorcycle Anti-theft Alarm

and Tracker system with Accident Notifier and Engine Controller Device using

Smartphone will be playing a role in the field of a motorcycle for alcohol detector

and the location of a motorcycle.

30
In a project of GSM based home security using a hybrid sensor array, the

researcher used a hybrid sensor to prevent the type of crime in houses. While

Motorcycle Anti-theft Alarm and Tracker system with Accident Notifier and Engine

Controller Device using Smartphone is to prevent motor napping and motorcycle

accidents.

Just like in a project of Implementation of an accelerometer sensor and

GPS module for the smart bike (Faisal Alfaeru, Aries Boedi Setiawan, Nachrowi

Nachrowi, Rachmat Hidayat S Hidayat S), there are more similarities in using a

different module and consists of an Android application, accelerometer, and GPS

to be processed in the microcontroller Arduino. The project will be able to provide

information such as SMS when the bicycle is displaced and also sends the

coordinates of the location on google maps to be displayed to the smartphone

applications created using MIT App Inventor 2. The only difference in the

Motorcycle Anti-theft Alarm and Tracker system with Accident Notifier and Engine

Controller Device using Smartphone is designed into a motorcycle, not bike, and

have an Engine Controller and alcohol detector.

In a project in Motorcycle Security System using GSM and RFID, this

project is all about a security system for motorcycles using RFID and GSM. In a

Motorcycle Anti-theft Alarm and Tracker system with Accident Notifier and Engine

Controller Device using Smartphone, this project uses different modules. Both

projects are all about in a security system.

31
In a project entitled Development of Multi-Home Alarm System based on

GSM Technology, this project uses GSM to notify the owner of the device detects

smoke and has a function like a smoke detector that detects smoke or fire to

inform that the owner of the house is in danger. In a Motorcycle Anti-theft Alarm

and Tracker system with Accident Notifier and Engine Controller Device using

Smartphone use GSM to notify the owner of the motorcycle is safe and have a

function like alcohol detector and inform the owner of the motorcycle if alcohol

concentration is present. The project is the same for safety purposes.

Conceptual Framework

Figure 2.5 Conceptual Framework

Figure 2.5 shows the Conceptual Framework of the Motorcycle Anti-theft

Alarm and Tracker system with Accident Notifier and Engine Controller Device

using Smartphone. Users need to register in the TrACE application to be able to

32
login in the application. The device will accept it as an input and will analyze it if

the user is asking for a location check, properly wearing a helmet, check alcohol

concentration in breath, identify the speed or the user wants to turn on and off

the engine of the motorcycle. After analyzing the input, the device will control

based on the message from the user’s phone.

The researcher aims to develop a Motorcycle Anti-theft Alarm and Tracker

system with Accident Notifier and Engine Controller Device using Smartphone

using different electronic devices. First, the Arduino will process every

information coming from every module connected to it to give a good output

through the Arduino relay and buzzer. Second, the GSM Module, this is used to

send an SMS message to notify the user about the motorcycle location and to

give an emergency alert. Third, the GPS module, this is used to identify the

latitude and longitude of the motorcycle. Fourth, the MQ3 module is used to

detect the alcohol concentration in breath. Last, the accelerometer is used to

measure the angle and speed of the motorcycle. These five electronic devices

were the main electronic component needed in creating the project.

33
CHAPTER III

RESEARCH METHODOLOGY

This chapter covers the research design, which includes conceptual

diagram and discussion of major hardware components, the software used in

system development and the prototype development.

Research Design

For research development, the agile methodology, which is a practice that

promotes continuous iteration of development and testing throughout the

software and hardware development lifecycle of the project or the process of

development and testing is done continuously at the same time. Agile

methodology was used to ensure the functionality of the system meets the

desired output.

In developing the breathalyzer, engine controller and tracking device, each

feature is developed separately from the other feature. The prototype, android

software and testing is done simultaneously.

https://www.guru99.com/agile-scrum-extreme-testing.html guru99

Predesign Stage

Many factors were considered during the predesign stage, such as the

size of the box of the device, as well as the use of software to develop an android

34
application. Table 3.1 presents the list of hardware components required in the

development of the prototype.

Table 3.1 Motorcycle Anti-theft Alarm and Tracker system with


Accident Notifier and Engine Controller Device using Smartphone
Hardware Requirements

HARDWARE DESCRIPTION
The brain of the device, it will process every
Arduino Microcontroller information coming from every connected
module.
GSM Module Responsible for receiving and sending sms
requests by user.
GPS Module Responsible for identifying the latitude and
longitude of motorcycle vehicles.
Accelerometer Module Responsible for reading the lean angle and
speed of motorcycle vehicles.
Relay Module 4-Channel Responsible for on and off the engine ignition of
motorcycle vehicles.
MicroSD Card Module Serves as the storage of information of the user
and device.
Piezo Buzzer Responsible to alarm and notify the user.

Bluetooth Module Detect the connection of helmet and motorcycle.

MQ3 Module Responsible for collecting the alcohol


concentration in breath.
Battery level indicator Serves as to know the level of battery.

Design Stage

35
Figure 3.1 Conceptual Diagram

Figure 3.1 shows the Conceptual Diagram. This will be the setup of the

system and the flow of connection and sending of information from the Arduino to

the modules to the user’s phone. The Micro SD Card Reader module will store

every information of the user and the motorcycle. The information about the

motorcycle will be sent through SMS message from the device to the user’s

phone Using the GPS module, the device will be able to identify its current

location and send it to the owner through SMS message using the GSM module.

The device will be able to send a message to the user and also receive a

message from the user. The Arduino will process that message, if the user

message is to check the current location of the vehicle, the device will send the

36
current location of the vehicle, or if the user wants to turn OFF the engine of the

vehicle, the Arduino will send a request to the Arduino relay to turn OFF the

vehicle Engine. If someone attempts to steal the motorcycle, the accelerometer

will sense it and send a request to the Arduino to notify the user by sending a

message using the GSM module. The buzzer will be energized if an attempt

occurs. If the device is moved away from its parking area, the device will send a

message to the user and automatically turn off the engine of the motorcycle. The

helmet has an MQ3 module, Bluetooth module, and Battery level indicator. The

battery level indicator serves to know the state of the battery level. The MQ3, it

senses the alcohol concentration in breath and is connected to Arduino Nano.

The Bluetooth module is connected to Arduino Mega to serve as the key to the

motorcycle. If the user has an alcohol breath, it will detect in MQ3 and the

Bluetooth module will not process the engine of the motorcycle. The user needs

to properly wear the helmet and not have an alcohol breath to start the engine of

the motorcycle. It will help the motorcycle riders to drive safely and prevent the

motorcycle accident.

Hardware Design and Implementation

The schematic diagram of the device is shown in figure 3.2. Arduino will

be the brain of the system. The GPS module is connected to the Arduino. It will

define the location of the motorcycle derived from the latitude and longitude. The

accelerometer will monitor the angle and the movement speed of the motorcycle.

This information will be sent to the user using the GSM module. Using the User’s

37
phone, the ignition of the motorcycle can be stopped using an application in its

Android phone. The information will be sent from the phone to the device and the

Arduino will process that information and send it to the Arduino relay to turn off

the ignition.

Figure 3.2 Schematic Diagram in Motorcycle

38
Figure 3.3 Schematic Diagram in Helmet

The schematic diagram of the helmet is shown in figure 3.3, Arduino Nano

is the brain of the device. MQ3 is connected to Arduino Nano, it will detect the

alcohol concentration in breath. The battery level indicator, it will define the state

of charge in the battery. The device has a charging module to charge the battery.

Software Used in System development

In developing the system, various software was used such as the

following: Arduino IDE for microcontroller coding and embedding, MIT App

Inventor for making Android application, Proteus ISIS for schematic, Sketchup for

prototype modeling and Adobe Photoshop for user interface designing. Each part

of the system is undergone in the testing phase to verify its functionality,

efficiency, and reliability.

39
MIT App Inventor is an intuitive, visual programming environment that

allows everyone – even children – to build fully functional apps for smartphones

and tablets. Those new to MIT App Inventor can have a simple first app up and

running in less than 30 minutes. And what's more, our blocks-based tool

facilitates the creation of complex, high-impact apps in significantly less time than

traditional programming environments. The MIT App Inventor project seeks to

democratize software development by empowering all people, especially young

people, to move from technology consumption to technology creation.

https://appinventor.mit.edu/about-us MIT APP INVENTOR

Arduino is an open-source electronics platform based on easy-to-use

hardware and software. Arduino boards are able to read inputs - light on a

sensor, a finger on a button, or a Twitter message - and turn it into an output -

activating a motor, turning on an LED, publishing something online. You can tell

your board what to do by sending a set of instructions to the microcontroller on

the board. To do so you use the Arduino programming language (based on

Wiring), and the Arduino Software (IDE), based on Processing.

https://www.arduino.cc/en/guide/introduction

Proposed Design

The android application will be developed using the MIT App Inventor, the

development of the application will be fast and tested immediately. The design of

the User Interface is shown below.

40
Figure. Installation Welcome Screen Notification

Figure shown as Installation Welcome Screen, The TrACE app will notify

the user if the accident occurs. As soon as the motorcycle has been in a crush,

the user receives an instant notification.

41
Figure. Installation Welcome Screen Immobilizer

Figure shown as Installation Welcome Screen, The TrACE app can be

used as a switch to turn on/off the engine of the vehicle. There are two methods

to turn on/off the engine using TrACE app. First, using SMS, the user sends the

message into the device to send a request to turn on/off the engine. Lastly, Using

Bluetooth.

Figure. Installation Welcome Screen Password

Figure shown as Installation Welcome Screen, TrACE app has a

password. It provides the first line of defense against unauthorized access to the

user device.

42
Figure. Installation Welcome Screen Tracker

Figure shown as Installation Welcome Screen, TrACE app can track the

motorcycle and locate the accident.

43
Figure. Installation Welcome Screen Reports

Figure shown as Installation Welcome Screen, TrACE app can receive the

alerts straight through the users smartphone.

Figure 3.6 Entering PIN UI

Figure 3.6 shows the entering PIN UI design, After the installation of the

application, the user needs to input the initial pin. After the user input the pin, the

confirmation will pop up. If the user input no, they need to reinput the pin. If yes,

the pin will be saved into a micro SD card. Every time the user closes and

44
reopens the apps, the user needs to input the pin code. It will help to protect the

device.

Figure 3.7 Entering Personal Info UI

Figure 3.7 shows the entering Personal Info UI design, After the user input

the initial pin in the installation of an application. This UI design will prompt to

input the user contact number and the device contact number. After the user

input the contact number, the confirmation will pop up. If the user input no, it will

back to input the contact number. If yes, the contact and device number will be

saved into a micro SD card.

45
Figure 3.8 TrACE Main Screen UI

As shown in Figure 3.8, the TrACE Main Screen labeled as 1 is the screen

to display the status of the user’s motorcycle vehicle. Labeled 2 is the google

map button, this button is designed to locate the exact location of motorcycle

vehicle converted from latitude and longitude from an accelerometer. Labeled 3

is the Park button, this button is designed to change in park mode. Labeled 4 is

the check location button, it is different in the google map button if the user has

no internet connection, this button is the alternative to know the location of the

motorcycle. The user received an sms message. Labeled 5 is the Bluetooth

terminal, this button is designed to test the device and application. Labeled 6, this

button is the Engine Controller, If the user wants to turn on and off the engine of

a motorcycle vehicle. Labeled 7 is the Bluetooth button, this button is to on and

off the Bluetooth of your android phone If the color is red, meaning it is off and it

46
will change to color blue if the Bluetooth is on. Lastly, labeled 8 is the settings

button.

Figure 3.9 TrACE Settings UI

Figure 3.9 shows the TrACE settings UI, it consists of seven buttons. Scan

button is to scan the user android device to on the Bluetooth. Change pin button,

is to change the pin of the application. Set the Emergency Personnel button, is to

add the contact number. If the user has an accident using a motorcycle, the

TrACE will notify the Emergency Personnel. The About button is to display the

history of Team Pogi. The Back button is back on the main screen. The Reset

button is back in the default mode of application. Save changes button is to save

the information the users made in the application.

47
Figure 3.10 Front View, Top View and Isometric View of the Proposed Design

As shown in Figure 3.10, this is the proposed design of the box, it will

ensure the safety of the device when it is installed on the compartment of the

motorcycle. It is properly screwed to the case of the box.

Figure 3.11 Back View and Front View of the helmet

48
As shown in Figure 3.11, this is the proposed design of the helmet. It will

help motorcycle riders to prevent drunk driving. It consists of three Li-On

batteries to have a power supply and it is placed into the battery holder. Battery

level indicator to know the state of the battery. Arduino Nano is the brain of the

device, it is a microcontroller connected into MQ3 and Bluetooth modules. MQ3

is an alcohol sensor to detect the alcohol concentration in-breath and the

Bluetooth module is responsible to connect the helmet and motorcycle vehicle.

CHAPTER IV

RESULTS AND DISCUSSION

This chapter covers the considerations in developing the system,

hardware component selection, hardware components assembly, software

requirements of the system and testing and evaluation of the study.

Considerations in Developing the system

Various considerations need to take into account before designing and

developing the prototype. Since the circuit of Motorcycle Anti-theft Alarm and

Tracker system with Accident Notifier and Engine Controller Device using

49
Smartphone would be inserted inside the toolbox of the motorcycle, one of its

considerations is the size it will occupy. As for its function in the helmet, the size

and type of the helmet need to be precise. It needs to have a lot of space to

where the microprocessor, battery and modules will be placed. More importantly,

the study considered the following factors in the design of the Motorcycle

Anti-theft Alarm and Tracker system with Accident Notifier and Engine Controller

Device using a Smartphone.

Motorcycle law. Accordance with R.A. 10054 or an act mandating all

motorcycle riders to wear standard protective motorcycle helmets while driving

and providing penalties therefore, driver and back riders mandated to wear a

standard helmet in riding a motorcycle to prevent life-threatening crashes.

Aside from mandating the use of standard helmets, the LTO takes charge

also in several administrative orders that are still in action today. Included is the

Republic Act 10586 or An Act Penalizing Persons Driving under the Influence of

Alcohol, Dangerous Drugs, And Similar Substances, And for Other Purposes.

Towards this end, the state shall penalize the acts of driving under the

influence of alcohol. Alcohol refers to alcoholic beverages classified into beer,

wine, and distilled spirits the consumption of which produces intoxication. Breath

analyzer refers to the equipment which can determine the blood alcohol

concentration level of a person through testing his breath. Driving under the

influence of alcohol refers to the act of operating a motor vehicle while the

50
driver's blood alcohol concentration level has, after being subjected to a

breathalyzer test reached the level of intoxication.

Hardware Component Selection

The number of Arduino boards have increased over the years;

some have been discontinued while others are still available. The choice of which

board to use depends on several factors: price, features, availability and ease of

use. Arduino itself is not a specific board type or microcontroller. Rather, Arduino

refers to a whole family of boards that have different advantages and

disadvantages. Choosing the right one for this system is no small feat and some

thought should be given to the one that researcher uses. Although the Arduino

UNO is the most popular board, all boards have excellent support. This means

the researchers are unlikely to fall into device-specific traps that could prevent a

piece of code from working because of hardware configurations or inherent bugs.

The deciding factor each project will use comes down to two basic things:

hardware and cost. When it comes to physical dimensions the Arduino Nano is

the smallest and is a very portable device. The Arduino Mega is a large Arduino

with plenty of GPIO, its CPU speed is still the same as that found on the UNO

and Nano. All the Arduino boards are presented in Table 4.1.

Table 4.1 Comparison of Available Arduino Board


Arduino
Microcontroller Pros Cons
Often the starting board for those new to Limited features;
the Arduino platform as it has all the no IoT
bare essentials for microcontroller-based capabilities;

51
Arduino Uno projects. It’s cheap but you can go limited number of
cheaper as it’s the most cloned Arduino pinouts.
board. It is also fairly easy to use and set
up.
This is the Arduino board to choose if No IoT
you want more pins. Besides the 54 capabilities. A bit
Arduino Mega digital pins and 16 analog pins, it also pricey
has 4 UART terminals. It is also the most
used board for robotics because of its 16
PWM outputs
Technically the same as the Arduino Limited features;
Arduino Nano UNO but smaller and can be mounted no IoT
on a standard breadboard. capabilities;
limited pinouts;
no DC power
jack.
About the same size as the Arduino Limited features;
UNO but has more digital and analog no IoT
Arduino pins. This board comes with a micro capabilities.
Leonardo USB port instead of a USB Type C port.
It also uses only one ATMega
microcontroller which makes it a bit
cheaper than the UNO.
An Intel-powered version of the UNO Limited number
Arduino 101 with added Bluetooth connectivity and of pinouts.
built-in accelerometer and gyroscope.
The smallest Arduino board and Limited features;
technically the same as the Arduino no IoT
Leonardo. Just like the Arduino Nano, capabilities; no
Arduino Micro this board fits on a breadboard. Also DC power jack.
since it uses the same microcontroller as
the Leonardo, it has more digital and
analog pins than the Pro Mini.
This is powered by a 32-bit ARM All pins use 3.3V
microcontroller which makes it almost six which limits the
times as fast and twice the program compatible
Arduino Due memory space as the similarly designed modules and
Arduino Mega. Surprisingly, it’s a bit shields; no IoT
cheaper than the Mega. capabilities.
If the Due is the 32-bit ARM version of All pins use 3.3V
the Mega, then this board is the 32-bit which limits the
Arduino Zero ARM version of the UNO. compatible
modules and
shields; no IoT
capabilities.
52
Containing both a microprocessor and a Limited number
microcontroller, this board can run a of ports; Some
Arduino Yun Linux distro named Linino. But the most reported WiFi
distinctive feature of the Yun is its connectivity
Ethernet and WiFi connectivity. issues. Pricey.
This board is an improved version of the Pricey.
Arduino Tian Yun. The added Bluetooth connectivity
allows for more IoT-based projects.
This board is designed for wearable Can be tricky to
Arduino Lilypad projects. Technically the same as an use as it requires
Arduino UNO some
accessories to
work.

Mechanical Assembly. The ignition system creates the spark that ignites

fuel and air in a petrol engine. The ignition coil increases 12 volts supplied by the

battery to around 20,000 volts. Although older vehicles used a single ignition coil

and a mechanical distributor to send the high voltage to each spark plug, most

vehicles now have a smaller ignition coil for each cylinder of the engine

(GSMechanical, 2020). In this system, the engine will control using TrACE

android application.

Circuitry. Presented in this section are the components used in the

system’s circuitry, and how they are connected with each other. Shown in Figure

4.1 and Figure 4.2 is the manner by which all components such as the GSM,

GPS, Accelerometer, Relay Module, Micro SD Card, Piezo Buzzer, Bluetooth and

MQ3, are all interfaced with the microcontroller Arduino Mega and Arduino Nano.

53
Figure 4.1 Interfacing with the Arduino Mega

Figure 4.1 Shows the interfacing with the Arduino. The Bluetooth

Module that is set in master mode and the GSM module which is

responsible for sending and receiving command from the user,

accelerometer that will monitor the lean angle of the motorcycle, GPS

module that will get the location of the device, and the relay module that

will control the ignition of the motorcycle will be connected to the arduino

mega

54
Figure 4.2 Interfacing with the Arduino Nano

Figure 4.2 shows the interfacing with the arduino nano. The bluetooth

module that is set to slave mode is responsible for receiving and sending

command to and from the device, IR sensor that will detect if the helmet is

properly worn, MQ3 for measuring blood alcohol concentration, battery level

indicator that will display the status of the battery will be connected to the arduino

nano.

Hardware Component Assembly

The main controller, particularly Arduino Mega, works with the different

modules for the control and operations of the entire system. The main controller

works with the sensors. This hardware holds the android application to control

the engine and detect the motor napping and accidents.

Software requirements of the System

For the operation of the system, along with the presented hardware

components, the following software was used: Arduino IDE for microcontroller

coding and embedding and MIT App Inventor for android application user

interface.

User Interface. The following images show the actual android application

user interface from Entering Pin UI Screen to About UI Screen.

55
Figure 4.3 Entering PIN UI

As shown in Figure 4.3, The user needs to input the pin to enter into the

main screen.

Figure 4.4 Loading Screen UI

As shown in Figure 4.4, After the user enters the correct pin, the TrACE

loading screen will load.

56
Figure 4.5 TrACE Main Screen UI

As shown in Figure 4.5, when the user inputs the correct pin. The main

screen will show up.

Figure 4.6 TrACE Settings UI

As shown in Figure 4.6, when the user wants to change the Personal Info

and Pin. This UI helps the user to change the credential of the user’s device.

57
Figure 4.7 Google Map UI

As shown in Figure 4.7, when the user wants to locate the exact location,

this UI will help the user to know the location of the device.

Figure 4.8 Emergency Personnel UI

As shown in Figure 4.8, if the user wants to add/edit the emergency

personnel. The user can add up to Five emergency personnel.

58
Figure 4.9 Bluetooth Terminal UI

As shown in Figure 4.9, if the user wants to test the device and

application.

Figure 4.10 About UI

As shown in Figure 4.10, the history of Team POGI and creator of the

application will display in the About button.

Testing and Evaluation

After developing the prototype, various tests of the system in regards to its

functionality should be conducted. This is to ensure that every function produces

a correct and accurate outcome according to the design specification of the

system.

59
Initial Testing. Shown in table 4.2 is the sensitivity of the MQ-3 alcohol

sensor that is being used in the system. Its high sensitivity to alcohol makes it

more accurate in detecting the presence of alcohol in the breath.

Materials were tested on the system, such as alcohol samples being

sipped then tested and rated using the alcohol sensor. The level of concentration

dictates the effects of alcohol on a person and its level of intoxication.

Table 4.2 MQ3 Sensitivity Graph

No. Of Wine Gin Beer Gin Beer Gin Wine Wine Beer
Shots
0 24 23 23 25 22 25
1 210 230 250 300 230 216
2 265 209 246 278 230 248
3 271 242 268 292 271 269
4 160 295 240 246 250 260

The researchers tested the accuracy of the MQ-3 Alcohol sensor that

detects 25 to 500 ppm of alcohol (ethane) by using different kinds of alcohol

being sipped then simulating its response to alcohol concentration level. To verify

the functionality of the system, the researcher employed the circuit of the sensor

being used. The alcohol level is readable via the AOUT pin. Since it’s a varying

voltage, this pin should be connected to any of the Arduino’s or PIC’s analog pin.

The DOUT pin becomes high when the alcohol level exceeds a threshold

value. Based on the schematic, the threshold value depends on the value of Rp

60
which is the trimmer on the breakout board. It will need to test the device as to

which BAC will trigger DOUT.

Having the value of RS in clean air, knowing the relationship between

RS/R0 ratio and BAC in mg/L is needed. Given the equation of the line log-log
𝐹
1
𝑙𝑜𝑔⁡( 𝐹 )
0

( )
𝑥
1
𝑙𝑜𝑔⁡( 𝑥 )
𝑥
plot as 𝑓(𝑥) = 𝐹0 𝑥0
0
, where F1, x1 and F0, x0 are two points from the line

on the plot. If the researchers only consider the alcohol line on the plot above,

they can approximate the location of two points: F0 = 1, x0 = 0.4 and F1 = 0.2, x1

= 4. Substituting the points in the equation above, they can now have the

𝑅𝑠 −0.699
relationship of RS/R0 and mg/L, 𝑅0
= 2. 5𝑚𝑔𝐿 .

Using the formula to calculate the BAC in mg/L that is

𝑅𝑠 −1.431
𝑚𝑔𝐿 = (0. 4 𝑅0
) , they need to convert the mg/L in g/dl since it is the most

common unit of measurement in BAC. Simply 𝑔𝑑𝐿 = 0. 0001×𝑚𝑔𝐿.

Now, the researchers can detect the accurate level of intoxication of a

person based on the level of concentration of alcohol.

Table 4.3 Feature Testing

61
Shown in table 4.3 is the feature testing table. The developers test the

different modules of the system’s functionality, efficiency, and usability. First, the

developers test the Engine Immobilizer using the bluetooth module, after five

trials, the test will be successful. But, In the Engine Immobilizer using the GSM

module, on the first trial, the test will fail because the developers forgot to register

promo load in the sim. After the registration of the promo, the test will be

successful. Second, testing of Check location. In the first and second trials, the

test failed. The developers spent a lot of time waiting to function well with the

GPS Module. That's why, on tracking using an application, the first and second

trials are failed. But, after several hours of waiting, the GPS module functions

62
well, and to check the location is successful. Third, testing of two Bluetooth

modules, the connection of motorcycle device and helmet. The first trial is failed

but the second to fifth trial is successful. Lastly, the accelerometer is functioning

well and the first to fifth trial is successful.

User’s Evaluation. The system was evaluated by the target users

through a survey, according to the functionality of every feature such as its ability

to detect the alcohol level of the rider. The ability of the user in tracking stolen

motorcycles and notifies the user if the user’s motorcycle is stolen or someone is

trying to steal it, its ability to turn on and off the motorcycle’s engine with an SMS

message using an engine immobilizer button, and its anti-theft services that can

be activated and deactivated only through a mobile network.

CHAPTER V

SUMMARY, CONCLUSIONS, AND RECOMMENDATIONS

63
This chapter covers the summary of findings, conclusions, and

recommendations of the study.

Summary

The Motorcycle Anti-theft Alarm and Tracker system with Accident Notifier

and Engine Controller Device using Smartphone is a device that prevents

motorcycle-theft and drunk driving. The user can also control the ignition, check

and track the location of the vehicle using an application that can be installed in

any android smartphone.

The application will only be accessible to the motorcycle owner because

upon installing the application, it will ask for the user’s information such as user’s

phone number, device number that is inserted in the device, pin to make it only

accessible to the user, and emergency personnel’ number where the system will

send the accident location if an accident occurs. The application will send this

information to the device and will store it in its memory card. Through the

application, the user can check the location and control the ignition of the vehicle.

These commands will be processed by the application and sent to the device

using the bluetooth module and GSM module. If the user is near the vehicle, the

commands will be sent using the bluetooth module else it will be sent using the

GSM module.

The device’s bluetooth module that will be set to slave mode after

receiving the user’s information will only connect to the bluetooth of the user’s

64
phone and will only accept commands from it. The device will also accept

commands that are sent through the GSM module if the sender matched the

cellphone number that the user has provided in the user’s information. Every

command that the user will send will be a random combination of letters and

numbers that only the device can understand.

After the device receives the message using GSM module or bluetooth

module, the arduino mega will process and execute it. Using the relay module,

the system can control the ignition of the vehicle. The relay module will be

connected to the ignition of the motorcycle, this allows the device to turn on and

off the vehicle’s ignition.

The accelerometer will monitor the lean angle and vibration of the

motorcycle when it is parked to check if it is safe or not. Once the system detects

a change, it will immediately notify the owner through a SMS message. The user

can monitor the location and the speed of the motorcycle using the GPS module.

Thus the vehicle will be safe and will immediately recover once someone stole it.

Another feature TRACE has is the helmet detection and breathalyzer. the

system will always monitor if the user wore the helmet properly and will always

check the blood alcohol concentration of the driver to prevent driving without

helmet and drunk driving.

Conclusions

65
Through interview, research, and many trials and testing, the proponents

conclude the following:

1. Accelerometer, GPS module, and GSM module were effective in

monitoring the lean angle and the location of the motorcycle and notifying

the vehicle owner if there was an attempt to steal the vehicle.

2. A device that will monitor the location of a stolen vehicle will be a big help

in recovering it. Using the tracking feature of TRACE, there will be a huge

chance of recovering the vehicle.

3. Based on the trials and testing, a location and lean angle monitoring

device is effective in reducing the number of motorcycle theft.

4. According to the evaluation, users finds the android application for trace

easy to use.

5. Based on the trials and testing,TRACE achieves the objectives of creating

a device that prevents motorcycle stealing and preventing drunk driving.

Additionally the system is helpful for motorcycle owner because it system

has a helmet with alcohol sensor and an IR sensor to detect if the helmet

is properly worn and the wearer is under the influence of alcohol, a GPS

technology to know the location of the motorcycle and s GSM technology

for the response of the system to the owner. Using such technology will

prevent accidents due to drunk driving and motorcycles are safe from any

stealing.

66
Recommendations

Based on the findings and conclusions, the researchers highly

recommend the following:

1. A more advanced and accurate GPS module that can monitor the device

in any place.

2. A smaller version of the system that will consume small amount energy

and can last a month without even charging regularly to make in more

convenient and efficient

3. An anti-tamper device that will detect if someone is deactivating the

system.

4. A 3D printed case of the device to make it more durable and to protect the

electronic components in it.

67
BIBLIOGRAPHY

A. Books

Zhengzhou Winsen Electronics Technology Co., L. (2015). Alcohol Gas Sensor

(Model:MQ-3) Manual. Zhengzhou Winsen Electronics Technology

Co., Ltd.

B. Publications

Abu, M. A. (2010). Motorcycle Anti-Theft System (MATS). Motorcycle Anti-Theft

System (MATS).

Anjali Rathore, Akriti Panwar, Deepika Kumari, Upedra Kumar. (2015). GSM for

Monitoring System. GSM for Monitoring System. Retrieved from

recentscientific.

Kodavati, B. (2015). Microcontroller-based Vehicle Security System with Tracking

Capability using GSM and GPS Technologies. Microcontroller-based

68
Vehicle Security System with Tracking Capability using GSM and GPS

Technologies.

Sachdeva, S. (2016). Agile Methodologies. International Journal of Computer

Science and Information Technologies.

Srichandr, S. P. (2015). Development of Motorcycle Anti-Theft Alarm. Thailand:

International Conference on Circuits, System and Simulation.

Yusof, M. H. (2014). Motorcycle Location Tracker for android. Motorcycle

Location Tracker for android.

C. Electronic References

Crystalynne D. Cortez, Jennifer L. Santos, Ken M. Alberto, Patrick O. Kua,

Reynan C. Muncada, and Kevin R. Pontiveros. (2016, May 12).

Development of Multi-Home Alarm System based on GSM Technology.

Retrieved from ijeee:

https://www.google.com/url?sa=t&source=web&rct=j&url=http://www.ijeee.

net/uploadfile/2016/0831/20160831074553244.pdf&ved=2ahUKEwjfmJzO

85PpAhVSFqYKHZ0BDlAQFjANegQIAhAB&usg=AOvVaw0Jy_IwSPn7op

_0IurOQKWM

Faisal Alfaeru, Aries Boedi Setiawan, Nachrowi, Rachmat Hidayat S. (2017,

October 4). Implementation of accelerometer sensor and GPS module for

smart bike. Retrieved from index:

https://www.google.com/url?sa=t&source=web&rct=j&url=http://jurnal.unm

69
er.ac.id/index.php/sdgs/article/download/1823/1174&ved=2ahUKEwjL8uG

zg5TpAhW1yosBHdmMDYoQFjABegQIBRAB&usg=AOvVaw21jGAQjjiPE

ELbuMHwEyKe

Fenner, S. (2019, May 1). What Is Two-Way Communication? Retrieved from

study.com:

https://study.com/academy/lesson/what-is-two-way-communication-definiti

on-systems-examples.html

Finoit. (2018). Top 15 Sensor Types Being Used Most By IoT Application

Development Companies. Retrieved from Finoit:

https://www.finoit.com/blog/top-15-sensor-types-used-iot/

GSMechanical. (2020). GSMechanical Blog. Retrieved from

https://gsmechanical.com.au/vehicle-ignition-system/

Man, A. S. (2015, September 2). A Simple Man. Retrieved from

livingincebuforums:

https://www.livingincebuforums.com/topic/83519-motorcycle-stolen/

Nafize Ishtiaque Hossain, Sakib Reza. (2015, December 5). GSM based home

security using hybrid sensor array. Retrieved from researchgate:

https://www.researchgate.net/publication/288725626_DESIGN_AND_PER

FORMANCE_EVALUATION_OF_GSM_BASED_HOME_SECURITY_USI

NG_HYBRID_SENSOR_ARRAY

70
Reyes, E. (2017, August 12). Cases of Motornapping / Bikenapping in the

Philippines. Retrieved from iChoose:

https://ichoose.ph/blogs/cases-motornapping-bikenapping-philippines/

Roepel, S. (2019, November 22). thedrive. Retrieved from thedrive:

https://www.thedrive.com/reviews/27431/best-car-anti-theft-devices

Sunrom. (2018). Alcohol Sensor Module - MQ3. Retrieved from sunrom:

https://www.sunrom.com/p/alcohol-sensor-module-mq3

Toyota. (2020, April 30). Toyota. Retrieved from toyota:

http://toyota.custhelp.com/app/answers/detail/a_id/7732/~/what-is-an-engi

ne-immobilizer%3F

tracker, M. G. (2015, August 25). Top GPS Tracker. Retrieved from

manilagpstrackers.ph:

https://manilagpstrackers.ph/fleet-tracking/?gclid=CjwKCAjw36DpBRAYEi

wAmVVDMGbLdtIFBvLEx686pQDSPaLBC8lFQ5y-vX262NS80Xz91nJwd

hYlLxoCLV0QAvD_BwE

W.W.I. Wan Jusoh, K.A. Mohd Annuar , S.H. Johari, I.M. Saadon, M.H. Harun.

(2015, December 3). Motorcycle Security System using GSM and RFID.

Retrieved from researchgate.net:

https://www.researchgate.net/publication/287922799_Motorcycle_Security

_System_using_GSM_and_RFID

71
Wikipedia. (2019, January 12). App Inventor for Android. Retrieved from

Wikipedia: https://en.wikipedia.org/wiki/App_Inventor_for_Android

Wikipedia. (2019, August 11). Arduino IDE. Retrieved from Wikipedia:

https://en.wikipedia.org/wiki/Arduino_IDE

Wikipedia. (2019, May 1). wikipedia. Retrieved from wikipedia:

https://en.wikipedia.org/wiki/Anti-theft_system

72
APPENDICES

APPENDIX A: Materials Used in Motorcycle Anti-theft Alarm and Tracker


system with Accident Notifier and Engine Controller Device
using Smartphone
APPENDIX B: Motorcycle Anti-theft Alarm and Tracker system with
Accident Notifier and Engine Controller Device using
Smartphone Estimated Cost
APPENDIX C: Program Source Code
APPENDIX D: Thesis Topic Abstract Form
APPENDIX E: Letters
APPENDIX F: Certificate of Grammarian
APPENDIX G: User’s Evaluation for the Functionality of Motorcycle
Anti-theft Alarm and Tracker system with Accident Notifier
and Engine Controller Device using Smartphone
APPENDIX H: User’s Evaluation for the Efficiency of Motorcycle Anti-theft
Alarm and Tracker system with Accident Notifier and Engine
Controller Device using Smartphone
APPENDIX I: User’s Evaluation for the Usability of Motorcycle Anti-theft
Alarm and Tracker system with Accident Notifier and Engine
Controller Device using Smartphone
APPENDIX J: Demonstration With Users
APPENDIX K: Sample Questionnaire
APPENDIX L: Curriculum Vitae

73
APPENDIX A
Materials Used inMotorcycle Anti-theft Alarm and Tracker system with
Accident Notifier and Engine Controller Device using Smartphone

Acrylic Plastic

2x8 Screw

Spray Paint

74
APPENDIX B
Motorcycle Anti-theft Alarm and Tracker system with
Accident Notifier and Engine Controller Device using Smartphone
Estimated Cost

Hardware Price

Arduino Atmega 500.00

Arduino Nano 300.00

Micro SD card module 99.00

GY-NEO6MV2 GPS 388.00

ADXL 335 Accelerometer 348.00

12v Relay Module 336.00

MQ3 Alcohol sensor 288.00

US-015 Ultrasonic 188.00

Sim800l GSM 500.00

HC-05 Bluetooth 1050.00

Universal Board 120.00

Solid Wire 60.00

Connector 100.00

Switch 3P 12.00

Switch 2P 10.00

Header Female 40.00

Header Male 30.00

Other Materials

Obstacle Avoider 240.00

Metal Connector 20.00

Plastic Connector 20.00

75
2x8 Screw 20.00

Acrylic Plastic 260.00

Spray Paint 149.00

TOTAL 5078.00

76
APPENDIX C
Program Source Code

Helmet Source Code

#include<SoftwareSerial.h> once:
#define TxD 10 bluetoothSerial.begin(9600);
#define RxD 11 pinMode(A1,INPUT);
float voltage=0; pinMode(IR,INPUT);
int red=7;
int yellow=6; pinMode(red,OUTPUT);
int green1=5; pinMode(yellow,OUTPUT);
int green2=4; pinMode(green1,OUTPUT);
int blue=3; pinMode(green2,OUTPUT);
int IR=9; pinMode(blue,OUTPUT);
float ppmval=0; pinMode(DOUTpin, INPUT);//sets
unsigned char readir; the pin as an input to the arduino
//=========================== Serial.begin(9600);
==========MQ3 start declaration
const int AOUTpin=0;//the AOUT pin }
of the alcohol sensor goes into
analog pin A0 of the arduino void loop() {
const int DOUTpin=8;//the DOUT pin sensorValue =
of the alcohol sensor goes into digital analogRead(sensorPin); // read the
pin D8 of the arduino value from the sensor
int limit; Serial.print("LDR: ");
int value; Serial.println(sensorValue); //prints
int sensorPin = A2; // select the input the values coming from the sensor
pin for LDR on the screen
int sensorValue = 0; // variable to
store the value coming from the MQ3func();
sensor get_voltage();
//=========================== readir=digitalRead(IR);
===========MQ3 end
SoftwareSerial bluetoothSerial(TxD, Serial.print("IR:");
RxD); Serial.print(readir);
Serial.print("\n");
void setup() {
// put your setup code here, to run //if(readir==1){ // ito inedit ko

77
if(sensorValue>70 || ppmval>0.03){ digitalWrite(yellow,HIGH);
digitalWrite(green1,HIGH);
batterylvl(); digitalWrite(green2,HIGH);
bluetoothSerial.print('a'); digitalWrite(blue,HIGH);
} }
else{ else if(voltage<=4.2 && voltage>4){
bluetoothSerial.print('b'); digitalWrite(red,HIGH);
digitalWrite(red,LOW); digitalWrite(yellow,HIGH);
digitalWrite(yellow,LOW); digitalWrite(green1,HIGH);
digitalWrite(green1,LOW); digitalWrite(green2,HIGH);
digitalWrite(green2,LOW); digitalWrite(blue,LOW);
digitalWrite(blue,LOW); }
delay(500); else if(voltage<=4 && voltage>3.8){
} digitalWrite(red,HIGH);
//delay(100); //Original digitalWrite(yellow,HIGH);
delay(1000); //testing digitalWrite(green1,HIGH);
digitalWrite(green2,LOW);
//3:24 digitalWrite(blue,LOW);
//356 = 36 }
//428 = 26 else if(voltage<=3.8 &&
} voltage>3.6){
digitalWrite(red,HIGH);
void get_voltage(){ digitalWrite(yellow,HIGH);
voltage=analogRead(A1); digitalWrite(green1,LOW);
Serial.print("out: "); digitalWrite(green2,LOW);
Serial.print(voltage); digitalWrite(blue,LOW);
Serial.print("\n"); }
else if(voltage<=3.6 &&
voltage=(voltage*6)/1024; voltage>3.4){
Serial.print("voltage out: "); digitalWrite(red,HIGH);
Serial.print(voltage); digitalWrite(yellow,LOW);
Serial.print("\n\n"); digitalWrite(green1,LOW);
digitalWrite(green2,LOW);
//delay(1000); digitalWrite(blue,LOW);
} }
else{
void batterylvl(){ digitalWrite(red,HIGH);
if(voltage>4.2){ digitalWrite(yellow,LOW);
digitalWrite(red,HIGH); digitalWrite(green1,LOW);

78
digitalWrite(green2,LOW); Serial.print("Limit: ");
digitalWrite(blue,LOW); Serial.println(limit);//prints the limit
delay(500); reached as either LOW or HIGH
digitalWrite(red,LOW); (above or underneath)
digitalWrite(yellow,LOW); Serial.print("R0: ");
digitalWrite(green1,LOW); float RS_gas = 0, R0 = 0, sensorV
digitalWrite(green2,LOW); = 0, R2 = 2000, ratio = 0, BAC;;
digitalWrite(blue,LOW); double x;
delay(500); sensorV = (float)value/1024*5.0;
RS_gas = ((5.0 * R2)/sensorV) +
} R2;
} R0 = RS_gas / 60;
Serial.println(R0);
void MQ3func(){
value= R0 = 16000;
analogRead(AOUTpin);//reads the ratio = RS_gas/R0;
analaog value from the alcohol x = 0.4 * ratio;
sensor's AOUT pin BAC = pow(x,-1.431);
limit= digitalRead(DOUTpin);//reads Serial.print("BAC: ");
the digital value from the alcohol Serial.print(BAC*0.001);
sensor's DOUT pin ppmval=BAC*0.001;
Serial.print("Alcohol value: "); Serial.print(" g/DL\n");
Serial.println(value);//prints the delay(1000);
alcohol value }

Device Source Code

// motorcycle anti theft and tracker RxD);


system with engine immobilizer and
accident notifier using android char c;

#include <SPI.h> TinyGPSPlus gps;


#include <SD.h>
#include "TinyGPS++.h" //Declaration of
#include "SoftwareSerial.h" Variables------------------------------
#define TxD 10 String
#define RxD 11 ownercp="",ep1="",ep2="",ep3="",ep
4="",ep5="",sender="",key="TEAMP
SoftwareSerial bluetoothSerial(TxD, OGI";

79
String comkey=""; Serial3.print(kuwet);
int Serial3.print(gps.location.lng(),6);
relay1=7,relay2=22,relay3=6,engine Serial3.println(Speedcheck+bilis);
S=0,setUP=0,setUP2=0; }
String Grsp; else{
char a,back=92,quote=34; Serial3.println("GPS unavailable");
int index=0; }
File myFile; updateSerial();
int enter; Serial3.write(26);
int numFlag=0,pinFlag=0; }
float lati=0.000000, longi=0.000000;
float bilis=0,GPSstatus=0; void SendSMS2(String
String sendernum,String message){
loclink="http://www.google.com/map Serial3.println("AT");
s/place/",kuwet=",",Speedcheck=" updateSerial();
Speed: "; Serial3.println("AT+CMGF=1");
int GPSnoti=1; updateSerial();
void SendSMS(){ String command="AT+CMGS=";
Serial3.println("AT");
updateSerial();
Serial3.println("AT+CMGF=1"); Serial3.println(command+quote+sen
updateSerial(); dernum+quote);
String command="AT+CMGS=";
//Serial3.println("AT+CMGS=\"+6399
53637231\""); //format
Serial3.println(command+quote+own updateSerial();
ercp+quote);
if(GPSnoti==2){
//Serial3.println("AT+CMGS=\"+6399 Serial3.println("GPS is Ready");
53637231\""); //format GPSnoti=3;
updateSerial(); }
else if(GPSstatus==1){
if(GPSnoti==2){ Serial3.print(loclink);
Serial3.println("GPS is Ready"); Serial3.print(gps.location.lat(),6);
GPSnoti=3; Serial3.print(kuwet);
} Serial3.print(gps.location.lng(),6);
else if(GPSstatus==1){ Serial3.println(Speedcheck+bilis);
Serial3.print(loclink); }
Serial3.print(gps.location.lat(),6); else{

80
Serial3.println(message); myFile.print(a);
}
updateSerial(); // close the file:
Serial3.write(26); myFile.close();
} //Serial.println("done.");
} else {
void updateSerial(){ // if the file didn't open, print an
delay(500); error:
while (Serial.available()){ Serial.println("error opening
Serial3.write(Serial.read()); pin.txt");
} }
while (Serial3.available()){ }
Serial.write(Serial3.read());
} void OpenSDep1(){
} myFile = SD.open("epone.txt",
void OpenSDnum(){ FILE_WRITE);
myFile = SD.open("number.txt", if (myFile) {
FILE_WRITE); //Serial.print("Writing to test.txt...");
if (myFile) { //myFile.println("Jomiel pogi");
//Serial.print("Writing to test.txt..."); myFile.print(a);
//myFile.println("Jomiel pogi");
myFile.print(a); // close the file:
myFile.close();
// close the file: //Serial.println("done.");
myFile.close(); } else {
//Serial.println("done."); // if the file didn't open, print an
} else { error:
// if the file didn't open, print an Serial.println("error opening
error: ep1.txt");
Serial.println("error opening }
number.txt"); }
}
} void OpenSDep2(){
void OpenSDpin(){ myFile = SD.open("eptwo.txt",
myFile = SD.open("pin.txt", FILE_WRITE);
FILE_WRITE); if (myFile) {
if (myFile) { //Serial.print("Writing to test.txt...");
//Serial.print("Writing to test.txt..."); //myFile.println("Jomiel pogi");
//myFile.println("Jomiel pogi"); myFile.print(a);

81
myFile.close();
// close the file: //Serial.println("done.");
myFile.close(); } else {
//Serial.println("done."); // if the file didn't open, print an
} else { error:
// if the file didn't open, print an Serial.println("error opening
error: ep4.txt");
Serial.println("error opening }
ep2.txt"); }
}
} void OpenSDep5(){
myFile = SD.open("epfive.txt",
void OpenSDep3(){ FILE_WRITE);
myFile = SD.open("epthree.txt", if (myFile) {
FILE_WRITE); //Serial.print("Writing to test.txt...");
if (myFile) { //myFile.println("Jomiel pogi");
//Serial.print("Writing to test.txt..."); myFile.print(a);
//myFile.println("Jomiel pogi");
myFile.print(a); // close the file:
myFile.close();
// close the file: //Serial.println("done.");
myFile.close(); } else {
//Serial.println("done."); // if the file didn't open, print an
} else { error:
// if the file didn't open, print an Serial.println("error opening
error: ep5.txt");
Serial.println("error opening }
ep3.txt"); }
}
} void setnumber(){
void OpenSDep4(){
myFile = SD.open("epfour.txt", int point=0;
FILE_WRITE); myFile = SD.open("number.txt");
if (myFile) { if (myFile) {
//Serial.print("Writing to test.txt..."); //Serial.print("number.txt:");
//myFile.println("Jomiel pogi");
myFile.print(a); // read from the file until there's
nothing else in it:
// close the file: while (myFile.available()) {

82
//Serial3.write(myFile.read()); }
ownercp+=(char)myFile.read(); myFile.close();
} } else {
// close the file: Serial.println("error opening ep3");
myFile.close(); }
} else { delay(50);
// if the file didn't open, print an
error: myFile = SD.open("epfour.txt");
Serial.println("error opening if (myFile) {
number.txt"); while (myFile.available()) {
} ep4+=(char)myFile.read();
delay(50); }
myFile = SD.open("epone.txt"); myFile.close();
if (myFile) { } else {
while (myFile.available()) { Serial.println("error opening ep4");
}
ep1+=(char)myFile.read(); delay(50);
}
myFile.close(); myFile = SD.open("epfive.txt");
} else { if (myFile) {
Serial.println("error opening ep1"); while (myFile.available()) {
} ep5+=(char)myFile.read();
delay(50); }
myFile.close();
myFile = SD.open("eptwo.txt"); } else {
if (myFile) { Serial.println("error opening ep5");
while (myFile.available()) { }
ep2+=(char)myFile.read(); }
}
myFile.close();
} else { void ReadSD(){
Serial.println("error opening ep2"); myFile = SD.open("number.txt");
} if (myFile) {
delay(50); Serial.print("number.txt:");

myFile = SD.open("epthree.txt"); // read from the file until there's


if (myFile) { nothing else in it:
while (myFile.available()) { while (myFile.available()) {
ep3+=(char)myFile.read(); Serial.write(myFile.read());

83
}
// close the file: //Serial.print(" Latitude: ");
myFile.close(); //Serial.println(gps.location.lat(),6);
} else { //Serial.print(" Longitude: ");
// if the file didn't open, print an
error: //Serial.println(gps.location.lng(),6);
Serial.println("error opening //Serial.print(" Speed MPH: ");
number.txt"); //Serial.println(gps.speed.mph());
} bilis=(gps.speed.mph());

myFile = SD.open("pin.txt"); //Serial.print(" Altitude Feet: ");


if (myFile) { //Serial.print(gps.altitude.feet());
Serial.print("pin.txt:");
GPSstatus=1;
// read from the file until there's if(GPSnoti==1){
nothing else in it: GPSnoti=2;
while (myFile.available()) { SendSMS();
Serial.write(myFile.read()); }
} }
// close the file: else{
myFile.close(); GPSstatus=0;
} else { }
// if the file didn't open, print an
error: }
Serial.println("error opening
pin.txt"); void displaynumbers(){
} ownercp="";
} ep1="";
ep2="";
ep3="";
ep4="";
void checkGPS(){ ep5="";
while(Serial1.available()){ setnumber();
gps.encode(Serial1.read()); delay(1000);
}
if(gps.location.isUpdated()){ Serial.println("OwnerNumber:"+owne
//Serial.print("\nSatellite Count: "); rcp);
Serial.println("EP1:"+ep1);
//Serial.print(gps.satellites.value()); Serial.println("EP2:"+ep2);

84
Serial.println("EP3:"+ep3);
Serial.println("EP4:"+ep4); //===========================
Serial.println("EP5:"+ep5); ======================DELET
} E
SD.remove("GAWA.txt");
void starten(){ if(SD.exists("GAWA.txt")){
digitalWrite(relay2,LOW); Serial.print("Present");
delay(500); }
digitalWrite(relay1,HIGH); else{
digitalWrite(relay3,HIGH); Serial.print("Absent");
delay(500); }
digitalWrite(relay3,LOW); }
}
void deleteEP(){
void stopen(){ Serial.println("Removing
digitalWrite(relay2,HIGH); epone.txt");
digitalWrite(relay1,LOW); SD.remove("epone.txt");
digitalWrite(relay3,LOW); Serial.println("Done Removing
epone.txt\n");
}
Serial.println("Removing
void createFile(){ eptwo.txt");
SD.remove("eptwo.txt");
/////========================= Serial.println("Done Removing
====================CREATE eptwo.txt\n");
Serial.print("Creating file");
Serial.println("Removing
myFile=SD.open("GAWA.txt",FILE_ epthree.txt");
WRITE); SD.remove("epthree.txt");
myFile.close(); Serial.println("Done Removing
epthree.txt\n");
//===========================
======================CHECK Serial.println("Removing
if(SD.exists("GAWA.txt")){ epfour.txt");
Serial.print("Present"); SD.remove("epfour.txt");
} Serial.println("Done Removing
else{ epfour.txt\n");
Serial.print("Absent");
} Serial.println("Removing

85
epfive.txt"); else{
SD.remove("epfive.txt"); Serial.println("epfive not existing");
Serial.println("Done Removing }
epfive.txt\n");
} }

void checkEP(){
if(SD.exists("epone.txt")){ void setup() {
Serial.println("epone exist"); Serial.begin(9600);
} Serial3.begin(9600);
else{
Serial.println("epone not existing"); // initialize SD
} Card----------------------------------------
Serial.println("Initializing SD
if(SD.exists("eptwo.txt")){ card...");
Serial.println("eptwo exist"); bluetoothSerial.print("Initializing SD
} card...");
else{ bluetoothSerial.begin(9600);
Serial.println("eptwo not existing"); if (!SD.begin(53)) {
} Serial.println("initialization failed!");
bluetoothSerial.print("initialization
if(SD.exists("epthree.txt")){ failed!");
Serial.println("epthree exist"); while (1);
} }
else{ Serial.println("initialization done.");
Serial.println("epthree not bluetoothSerial.println("initialization
existing"); done.");
}
// SD Card Initialization
if(SD.exists("epfour.txt")){ End-------------------------------
Serial.println("epfour exist");
} //Initialize
else{ GSM------------------------------------------
Serial.println("epfour not existing"); --
} Serial.println("Initializing GSM
Module..");
if(SD.exists("epfive.txt")){ bluetoothSerial.println("Initializing
Serial.println("efive exist"); GSM Module..");
}

86
============================
Serial3.println("AT"); =
updateSerial();
Serial3.println("AT+CMGF=1"); //createFile();
updateSerial();
}
Serial3.println("AT+CNMI=1,2,0,0,0")
; void loop() {
updateSerial(); pinFlag=0;
delay(500); numFlag=0;
Serial.println("Initialization Done."); int
bluetoothSerial.println("Initialization epflag=0,a1=0,a2=0,a3=0,a4=0,a5=
Done."); 0,getnum=0,numberC=0,go=0,Dcou
nt=0,kumpara=0;
//GSM end sender="";
initialize-------------------------------------- while(Serial3.available()>0){
--- delay(10);
a=Serial3.read();
//GPS
Initialized------------------------------------- Serial.print(a);
-------
Serial1.begin(9600); bluetoothSerial.print(a);
Serial.println("GPS Start"); if(go==0){
bluetoothSerial.println("GPS Start"); if(a=='+'){
getnum++;
//GPS initialize }
ebd-------------------------------------------- }
----- if(getnum==2){
if(numberC!=13){
pinMode(relay1,OUTPUT); sender+=a;
pinMode(relay2,OUTPUT); numberC++;
pinMode(relay3,OUTPUT); }
digitalWrite(relay2,HIGH); else if(numberC==13){
digitalWrite(relay1,LOW); Serial.println("done getting
digitalWrite(relay3,LOW); number");
displaynumbers(); Serial.println("comparing
number");
if(sender==ownercp){
///test======================== Serial.println("sender: user");

87
go=1; a2=0;
} else
else{ a2=1;
Serial.println("sender }
unknwon"); if(a=='c'){
} if(a3==1)
numberC++; a3=0;
getnum++; else
} a3=1;
} }
if(a=='d'){
if(go==1){ if(a4==1)
if(a=='i'){ a4=0;
displaynumbers(); else
} a4=1;
if(a=='h'){ }
deleteEP(); if(a=='e'){
checkEP(); if(a5==1)
} a5=0;
else
if(a=='g'){ //////// to a5=1;
start and stop engine }
if(engineS==0){
starten();
engineS=1; if(a!='a'&&a!='b'&&a!='c'&&a!='d'&&a!
} ='e'){
else if(engineS==1){ if(a1==1){
stopen(); OpenSDep1();
engineS=0; }
} if(a2==1){
} OpenSDep2();
if(a=='a'){ }
if(a1==1) if(a3==1){
a1=0; OpenSDep3();
else }
a1=1; if(a4==1){
} OpenSDep4();
if(a=='b'){ }
if(a2==1) if(a5==1){

88
OpenSDep5(); Serial.println("\nKey matched");
} Serial.println("deleting old
} number and pin");

if(a=='$'){ SD.remove("number.txt");
numFlag=0; SD.remove("pin.txt");
}
if(a=='@'){ Serial.println("Old number and
ReadSD(); pin deleted");
SendSMS(); SendSMS2(sender,"Deleted");
} setUP=1;
} }
}

if(Dcount==2){ if(setUP==1)
if(a!='.'){ {
Serial.println("Reading Key");
comkey+=a; if(pinFlag==1){
} OpenSDpin();
else{ Serial.print(a);
Dcount++; }
kumpara=1;
} if(numFlag==1){
} if (a!=';'){
if(a=='.'&&Dcount!=1){ OpenSDnum();
Dcount++; Serial.print(a);
} setUP2=1;
if(Dcount==1){ }
Serial.println("Reading Key"); }
Dcount++; if(a==';'){
} pinFlag=1;
numFlag=0;
if(kumpara==1){ Serial.print("\n");
kumpara=0; }
Serial.println("\nComparing if(a=='-'){
Key"); numFlag=1;
Serial.println("key: "+comkey); }
}
if(comkey==key){ }

89
if(setUP2==1){ setUP2=0;
SendSMS2(sender,"Number }
saved. Restart the system"); checkGPS();
setUP=0; }

Application Source Code

90
91
92
93
94
95
96
97
98
APPENDIX D
Thesis Topic Abstract Form

99
APPENDIX E
Letters

APPENDIX F
Certificate of Grammarian

APPENDIX G
User’s Evaluation for the Functionality of Motorcycle
Anti-theft Alarm and Tracker system with Accident Notifier and Engine
Controller Device using Smartphone

APPENDIX H
User’s Evaluation for the Efficiency of Motorcycle
Anti-theft Alarm and Tracker system with Accident Notifier and Engine
Controller Device using Smartphone

APPENDIX I
User’s Evaluation for the Usability of Motorcycle
Anti-theft Alarm and Tracker system with Accident Notifier and Engine
Controller Device using Smartphone

APPENDIX J
Demonstration With Users

APPENDIX K
Sample Questionnaire

APPENDIX L
Curriculum Vitae

100
101

You might also like