SlideShare a Scribd company logo
1 of 61
Download to read offline
VISVESVARAYA TECHNOLOGICAL UNIVERSITY
Jnana Sangama, Belgaum – 590014
A Project Report
On
“Smart Self Defense Device”
Submitted in partial fulfillment of the requirement for the award of
BACHELOR OF ENGINEERING
In
INFORMATION SCIENCE & ENGINEERING
By
ANUJNA H.M 1AP12IS006
CHAITHRA P 1AP12IS013
JEEVITHA P 1AP12IS022
NAGARATHNA T.S 1AP12IS033
Under the guidance of:
Internal Guide:
Mr. NANDEESHWAR S.B
Assoc. Prof & HOD, Dept. of ISE.
2015-16
DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING
A.P.S.COLLEGE OF ENGINEERING
Anantha Gnana Gangothri,
NH-209, Kanakapura Road, Bangalore-560082
A.P.S.COLLEGE OF ENGINEERING
(Affiliated to Visvesvaraya Technological University)
Anantha Gnana Gangothri,
NH-209, Kanakapura Road, Bangalore-560082.
DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING
CERTIFICATE
Certified that the Project Work entitled “Smart Self Defense Device” has been carried out at
APS College of Engineering, Bangalore, by Anujna H M (1AP12IS006),
Chaithra P(1AP12IS013), Jeevitha P (1AP1212IS022), Nagarathna T S(1AP12IS033),
bonafide student/s of Eighth Semester, B.E. in partial fulfillment for the award of degree in
Bachelor of Engineering in Information Science & Engineering affiliated to Visvesvaraya
Technological University, Belgaum during academic year 2015-2016. It is certified that all
corrections/suggestions indicated for Internal Assessment have been incorporated in the
report deposited in departmental library. The project report has been approved as it satisfies
the academic requirements in respect of project work for the said degree.
Mr. Nandeeshwar S. B, Dr. G Ravindranath,
Asst. Prof. & HOD Principal
External Viva
Name of the Examiners
1.
2.
Signature with date
DECLARATION
We hereby declare that the entire project work entitled SMART SELF DEFENCE DEVICE
done at APS COLLEGE OF ENGINEERING, Bangalore, submitted to Visvesvaraya
Technological University, in partial fulfillment of requirements for the degree of Bachelor
of Engineering in Information Science & Engineering is a record of original work done by
us and no part of it has been submitted for any degree or diploma of any institution
previously.
Place:
Date:
ANUJNA H.M 1AP12IS006
CHAITHRA P 1AP12IS013
JEEVITHA P 1AP12IS022
NAGARATHNA T.S 1AP12IS033
I
Acknowledgement
The completion of project brings with and sense of satisfaction, but it is never completed without
thanking the persons who are all responsible for its successful completion. We wish to express
our profound feelings of gratitude to this great institution of ours A.P.S College of Engineering
for providing us the excellent facilities.
Firstly we would like to thank Dr. G.Ravindranath, Principal, for having permitted us
to carry out the project on “Self Defence Device” successfully.
We express our deep gratitude to Prof. Nandeeswar S B , Assoc, Prof & HOD for
providing us an opportunity for fulfilling our goal.
We express our warm regards to the seminar co-ordinators Prof. Nandeeswar S B,Assoc
Prof HOD, Prof.Abhijit Das, Asst.Prof, for their skillful guidance, constant supervision, timely
suggestion and constructive criticism in successful completion our project on time.
We deeply grateful to our parents and friends who have been supportive with their
tolerance and genuine inspiration, in equal parts. We thank all the teaching and non-teaching
staff, Dept of ISE.
Anujna.H.M (1AP12IS006)
Chaithra.P (1AP12IS013)
Jeevitha.P (1AP12IS022)
Nagarthna.T.S (1AP12IS033)
II
ABSTRACT
Today in the current global scenario, the prime question in every Woman’s mind, taking
into account the ever rising increase of issues on women harassment in recent past, is only
about her safety and security. The only thought haunting every Woman’s is when they will
be able to move freely on the streets even in odd hours without worrying about their
security. This paper suggests a new perspective to use technology to protect women. The
system resembles a normal belt which when activated, tracks the location of the victim
using GPS and sends emergency messages using GSM ,to three emergency contacts and
the police control room. The system also incorporates a screaming alarm that uses real-time
clock, to call out for help and also generates an electric shock to injure the attacker for self-
defense.
Table of Contents
Acknowledgement I
Abstract II
Contents III
List of Figures VI
List of Tables VII
CHAPTER1
Preamble 1-5
1.1 Introduction 1
1.2 Objective of the study 1
1.3 Existing system 2
1.4 Proposed solution 3
1.5 Scope of the study 3
1.6 Limitations of the study 4
1.7 Organization of the report 4
CHAPTER 2
Literature
survey
6-12
2.1 General components 6
CHAPTER 3
System
13
requirements
3.1 Hardware requirements 13
3.2 Software requirements 13
CHAPTER 4
Tools 14-15
CHAPTER 5
Design and
analysis
16-24
5.1 Introduction 16
5.2 Design and analysis 16
5.3 Interfaces 17
5.4 Interfaces description 18
CHAPTER 6
Implementation 25-32
6.1 GPS module 25
6.2 GSM module 29
6.3 LCD module 32
CHAPTER 7
Testing 32-34
7.1 Unit testing 33
CHAPTER 8
Results and
snapshots 35-40
CHAPTER 9
Conclusion and
future scope 41
9.1 Conclusion 41
9.2 Future scope 41
REFERENCES 42
APPENDIX A Acronyms and
Abbreviations 43
APPENDIX B Microcontroller arm7 44-48
lpc2148
APPENDIX C LPC2148 arm7 board 49-50
List of Figures
Figure No. Figure Name Page Number
2.1 Fixed resistor 7
2.2 Variable resistor 7
2.3 Bead thermistor 8
2.4 Disc Capacitors 9
2.5 Electrolytic Capacitor 9
2.6 Diode 10
2.7 Relays 10
2.8 Integrated Circuit 11
2.9 ARM LPC2148 11
2.10 Vibration Motor 12
5.1 Architecture 17
5.2 pin configuration of LCD 18
5.3 Interfacing LPC2148 with LCD. 19
5.4 UART Interfacing 21
5.5 GPS Interfacing 22
5.6 UART Interfacing 23
5.7 GSM Interfacing 24
8.1 Blow count Indicator 35
8.2 Post and Pre amplifier circuit 36
8.3 Buffer and Driver Circuit with the 37
vibration motor
8.4 GPS 65 Module 38
8.5 GSM MGSM900 Modem 38
8.6 Indicator Module 39
8.7 LCD Display 40
B.1 Pin diagram of ARM & LPC 2148 44
C.1 ARM 7 Board 49
List of Tables
Table Table Name Page Number
Number
5.1 Pin Assignment of UART 21
5.7 Pin Assignment of UART 24
B.1 I/O Ports Pins 46
B.2 IOSEL0 bit values 47
Smart Self Defense Device
CHAPTER 1
PREAMBLE
1.1 INTRODUCTION
According to the national crime records bureau. The rate of rape cases are increased more.
By observing such a bad condition of women in the world, we have introduced a device by
name “Smart Self-Defence device”. This has the potential to help citizens by the technologies
that are embedded in it.
The primary reasons behind such vibration statistics is the society which is prejudiced
against the girl child, lack of proper policing, ineffective laws etc. While the long term
solution should aim to correct the above factors.
The device is specially designed for giving protection to people. The hardware
component mainly calculates the pulse rate and the temperature variation of the human. This
device mainly contains GPS, GSM and vibration sensors along with hardware tools like
buffers, drivers and a timer which indicates the alarm to control room or respective contacts
which is fed in GSM SIM card.
1.2 OBJECTIVE OF THE STUDY
This project aims to develop a “Smart Self Defence Device” which helps us to track
the location (latitude, longitude) through GPS, GSM, so that we can track the victim place. If
the person is in danger then the concerned people of the device holder will be intimated by
message.
The objective of this device is to give safety to women. If the woman is danger then
Police will come to know by using this device. It makes women they don‟t have to worry
much. They will feel secure. The device need not to be used by women but also by aged
people, child. This device will be useful to all generation people. There are few apps which
do works like this. But most of them work on androids and need internet to work. But this
device don‟t want internet. This device can be implemented in watches. If it is improvised
then it can even use in military to pass emergency alert message to head quarters.
Dept. of ISE, APSCE 2015-2016 1
Smart Self Defense Device
Safety and security are the important perspective to lead a happy life. But now a day
it seems difficult to lead such a happy life. So we thought we should build something which
is helpful to our society and come up with self-defences device.
1.3 EXISTING SYSTEMS
a) Stun Gun:
It has an electric shock giving state of art mechanism which can make the attacker
confused and paralyzed for nearly half an hour. All one need to do is to press a button
and touch its charged terminal against the attacker. As soon as the latest Taser gun is
activated the attacker falls to the ground in shock and is unable to move.
Disadvantages:

Victim will have to close enough to the attacker in order to touch them with their
weapon.



When an attacker has larger gun or weapon the Stun gun could be rendered
useless.


b) VithU:
The VithU Android application lets a potential victim skip through the number-
punching, and lets them push a power button twice to instantly send an SOS alert to
contacts. Alert messages are sent out every two minutes to listed contacts, who will
receive a message along with your physical location.
Disadvantages:

Platform dependency.



Loss of flexibility.



Mandatory internet connection.

Dept. of ISE, APSCE 2015-2016 2
Smart Self Defense Device
1.4 PROPOSED SOLUTION
This System focuses on a security system that is designed solely to serve the purpose of
providing security to citizens so that they never feel helpless while facing social challenges.
The system consists of various modules such as GSM shield (SIM 900A), ARM7 board,
GPS, screaming alarm, a set of pressure sensors for activation and power supply unit.
By integrating a culturally-relevant educational curriculum (service) with a product
(good) that is affordable and accessible, this innovation is helpful in saving women from
harassment. In India lots of crimes happens against women every day. This device can
readily solve this issue. These devices can be installed at small scale and we will try for
further progress in the same. Lastly, our main aim to spread this project in the whole world
that is large scale production.
Advantages:

Women can go anywhere being more secure.



Avoids the women rape.



Culprits can be easily found and can be punished



Consumes less power.



Provides very accurate data via GPS system.



Allows the remote location of asset from anywhere there is cellular Service.



1.5 SCOPE OF THE STUDY
The project can be further implemented to “Zapper” which is also known as “Beam
Gun” in Japan. It is an electronic light gun which can also be used in defence purpose. Since
there is always advancement in technology, with the invention of components used in our
device like ARM controller into small size, the device can also be implemented in wrist
watches and also other wearable. Additional features like voice recorder, Video and image
capturing; conference call facilities can also be added in future.
Dept. of ISE, APSCE 2015-2016 3
Smart Self Defense Device
1.6 LIMITATION OF THE STUDY

The SIM card or base station may fail which stops the working of device.

Battery should be replaced periodically.

Sometimes attackers may damage the device before location is sent.

The designed device is only the prototype so it is bulky.
1.7 Organization of the Report
This project report has been broadly divided into 9 chapters
CHAPTER 1: Introduction
This chapter gives introduction of the project, statement of the problem, objective of
the project , scope of the project and also the limitations of the project.
CHAPTER 2: Literature Survey
This chapter gives an introduction to the work carried out previous to the
development of the project and the explanation about general components used in the project.
CHAPTER 3: Requirement Specification
This chapter describes the hardware and software requirements.
CHAPTER 4: Tools
This chapter shows the tools used in the project.
CHAPTER 5: Design and Analysis
This chapter describes the architecture of the device. It also deals with the analysis of
device.
CHAPTER 6: Implementation
This chapter the coding of the project in detail.
Dept. of ISE, APSCE 2015-2016 4
Smart Self Defense Device
CHAPTER 7: Testing
This chapter focuses on the testing of components.
CHAPTER 8: Results and snapshots
This chapter gives the results in the form of snapshots.
CHAPTER 9: Conclusion
This chapter gives the conclusion & future enhancement of the project.
Appendix A:
The abbreviations of acronyms used in the device are described here.
Appendix B:
This section contains detailed explanation about pin diagram of ARM7 LPC2148.
Appendix C:
This section contains detailed explanation about board details of ARM7 LPC2148.
SUMMARY
This chapter is summarized by saying that a prototype of a device has been
designed for safety of people with feature like intimating the location.
Dept. of ISE, APSCE 2015-2016 5
Smart Self Defense Device
CHAPTER 2
LITERATURE SURVEY
According to the National Crime records Bureau, the total number of rape cases in India was
a staggering 228,650 and Delhi, the national capital accounted for 5234 of those and in 2011
according to Ministry of Home Affairs, a total of 24193 cases were reported. This is just the
tip of the iceberg. Rape is a notoriously under-reported crime, thanks to its social stigma. A
woman is raped every 21 minutes in India and every 18 hrs in Delhi. It is shameful for the
whole world.
1.5 million Heart attacks occur in the United States each year with 500,000 deaths. A
heart attack occurs about every 20 seconds with a heart attack death about every minute.
About 50% of deaths occur within one hour of the heart attack –outside a hospital. There is a
only a 6% to 9% early mortality rate from a heart attack for those who survive long enough
to reach the hospital. Getting to the hospital quickly is the goal. Deaths from cardiovascular
diseases in women exceed the total number of deaths caused by the next 16 causes.
Nearly 75% of all deaths in the United States are deaths of elderly people. For many
decades, heart disease, cancer, and stroke have been the leading causes of death among the
elderly, accounting for 70% of all deaths in this age group.
Senior citizens age 70 and over have the greatest risk of fire death. The fire death risk among
seniors is more than double the average population.
2.1 GENERAL COMPONENTS
This topic deals with the study of components and general development environment
related to derive all the activity intended towards our project.
1. RESISTORS :
The components which offer value of resistance are known as resistors.
There are two types of resistors available. They are:
Dept. of ISE, APSCE 2015-2016 6
Smart Self Defense Device
 Linear resistors :-
A resistor, in which current value is directly proportional to the applied voltage
is known as linear resistors.
There are two categories of linear resistors:

Fixed Resistors: Fixed resistor is a resistor which has a specific value and
that value cannot be changed. A fixed resistor can be thin filmed, thick filmed,
wire wound or carbon composition resistors.
Figure 2.1: Fixed resistor

Variable Resistors: Variable resistors are the resistors whose values can be
changed through a dial, knob, and screw or manually by a proper method.
Figure 2.2: Variable resistor
 Non-linear resistors :-
Nonlinear resistors are those resistors, where the current flowing through it does
not change according to Ohm‟s Law but, changes with change in temperature or
applied voltage.
Dept. of ISE, APSCE 2015-2016 7
Smart Self Defense Device
The widely used type of non-linear resistor is thermistor which is a two
terminal device that notices the change in temperature. Example of a thermistor is bead
thermistor.[5]
Figure 2.3: Bead thermistor
2. CAPACITORS:
Devices which can store electronic charge are called capacitors.
Capacitance can be understood as the ability of a dielectric to store electric charges. Its
unit is Farad, named after the Michael Faraday. The capacitors are named according to
the dielectric used. Most common ones are air, paper, and mica, ceramic and
electrolytic capacitors. [5]
Capacitors provide us with a means of storing electrical energy in the
form of an electric field. Capacitors have numerous applications including storage
capacitors in power supplies, coupling of A.C. signals between the stages of an
amplifier, and decoupling power supply rails so that, As far as A.C. signal components
are concerned, the supply rails are indistinguishable from zero volts.
Capacitors are of 2 types: -
 Disk Capacitors

 Electrolytic Capacitors.
Dept. of ISE, APSCE 2015-2016 8
Smart Self Defense Device
 DISC CAPACITORS :
Figure 2.4: Disc Capacitors
In the disk form, silver is fired on to both sides of the ceramic to form the
conductor plates. The sheets are then baked and cut to the appropriate shape and size &
attached by pressure contact and soldering. These have high capacitance per unit
volume and are very economical.
 ELECTROLYTIC CAPACITORS :
Figure 2.5: Electrolytic Capacitor
These capacitors derive the name from electrolyte which is used as a medium to
produce high dielectric constants. These capacitors have low value for large
capacitances at low working voltages [5].
Dept. of ISE, APSCE 2015-2016 9
Smart Self Defense Device
3. DIODES:
Figure 2.6: Diode
In the field of electronics too we have a valve called semiconductor diode (a
counterpart of thermionic valve) for controlling the flow of electric current in one
direction. But we use these diodes in circuits for limited purposes like converting AC
to DC, by passing EMF etc.,[5]
4. RELAY:
Figure 2.7: Relays
A relay is an electrically operated switch. Many relays use an
electromagnet to operate a switching mechanism mechanically, but other operating
principles are also used. Relays are used where it is necessary to control a circuit by a
low-power signal (with complete electrical isolation between control and controlled
circuits), or where several circuits must be controlled by one signal. A type of relay that
can handle the high power required to directly drive an electric motor is called a
contactor. Solid-state relays control power circuits with no moving parts, instead using
a semiconductor device to perform switching. [6]
Dept. of ISE, APSCE 2015-2016 10
Smart Self Defense Device
5. INTEGRATED CIRCUITS
Figure 2.8: Integrated Circuit
All modern digital systems rely on the use of integrated circuits in which
hundreds of thousands of components are fabricated on a single chip of silicon. A
relative measure of the number of individual semiconductor devices within the chip is
given by referring to its „scale of integration‟.[5]
6. ARM CONTROLLER
ARM is computer processor based RISC architecture. A RISC-based computer
design approach means it requires significantly fewer transistors than typical processors
in average computers. This approach reduces costs, heat and power use.[4]
ARM processor features include:

Load/store architecture.



An orthogonal instruction set.



Mostly single-cycle execution.



A 16x32-bit register.

Figure 2.9: ARM LPC2148
Dept. of ISE, APSCE 2015-2016 11
Smart Self Defense Device
7. VIBRATION MOTOR
Vibration motor is a compact size coreless DC motor used to inform the users
of receiving the signal by vibrating without no sound.
Figure 2.10: Vibration Motor
SUMMARY
This chapter includes the motive of the project and some of the general components
used in the project.
Dept. of ISE, APSCE 2015-2016 12
Smart Self Defense Device
CHAPTER 3
SYSTEM REQUIREMENTS
Requirement specification for a system is the description of services provided by the system
and its operational constraints. Requirement will deal with the aspects that acts to be a very
important phase in any project, using which project functionality will be decided upon. This
chapter will deals with the topics related to the requirements of the project mainly like:
 Hardware Requirements

 Software Requirements

3.1 HARDWARE REQUIREMENTS:

Power supply unit: 12V 1.3 Ah battery.



Measurement of Respiration: Bead thermistor.



GPS module: GPS 250.



GSM Modem: MGSM900.



ARM processor: LPC2148.


3.2 SOFTWARE REQUIREMENTS:

Compiler: Keil C compiler uVision 3.



Language: Embedded C or Assembly.



Burning Software: Flash Magic (version 9.75).

SUMMARY
This chapter included various requirements of the project – hardware and software
requirements.
Dept. of ISE, APSCE 2015-2016 13
Smart Self Defense Device
CHAPTER 4
TOOLS
Just as there are a lot different types of embedded systems, their development tools, both
hardware and software, also exists in similar quantity. We will discuss here tools for larger
scale embedded systems that require an embedded operating system to function. The base of
development is the source code for the operating system kernel and the actual application. In
the case of open source software, kernel source and the majority of the development tools are
provided free for development, as is the case with Embedded Linux. In proprietary software
case like Microsoft Windows CE, kernel source and development tools are bought and
licensed for limited use. There are some exceptions like Microsoft‟s DreamSpark and
BizSpark projects which offer some of the Microsoft‟s proprietary development tools and
software free of cost to students and start-up businesses, respectively.
For embedded Linux development, the same kernel source as for the desktop
computers is used. Linux kernel is downloaded from the official website, www.kernel.org,
and then patched or configured for the target application and hardware. Such type of
embedded development also requires a compatible host environment, usually the computer
and the operating system running on that computer. Development can also be performed
directly on the target hardware, if it is capable enough. While doing embedded development
on desktop computer, developer can use an emulator, like QEMU (for Linux), to run the code
on emulated target hardware.
The second most important thing for embedded development is the compiler package
or toolchain. GNU Toolchain is one of the most used and popular toolchain for embedded
development. It is a collection of compilers (GNU Compiler Collection (GCC), formerly
GNU C Compiler) and tools like “make”,”binutils”, debugger (“gdb”) and “build”. Not only
the GNU Toolchain is used for open source software development, but also for proprietary
software (i.e. closed source). GNU Toolchain needs itself to be compiled or “build” for the
target hardware platform but pre-built ones are also available, like the Mentor Graphics‟
Sourcery G++ Lite (for Linux based development on ARM core hardware platform). An
open source text and code editor, GNU Emacs is widely used for Linux based development.
Dept. of ISE, APSCE 2015-2016 14
Smart Self Defense Device
In the case of Windows CE, development is done using the Windows CE Compiler.
Microsoft offers an integrated development environment (IDE), known as Platform Builder,
for development. All the necessary development tools also come with Platform Builder.
Platform Builder is used for building the Windows CE kernel and the target hardware
specific code package known as Board Support Package (BSP). Microsoft Visual Studio is
also widely used for this purpose.
There comes an important stage in embedded development which is creating the boot
loader for the completed firmware to make it run on the target hardware. Boot loaders load
important hardware specific configurations at system start-up and hand-over the control to
the operating system. Developer can create boot loaders themselves from scratch but pre-
developed alternatives are also present. “Das U-Boot” (Universal Boot loader), or simply
called “Uboot”, is such a widely used open source boot loader.
Hardware tools for embedded development include development or evaluation boards
for specific processors and embedded architectures. Some famous ones are FriendlyARM‟s
Mini2440, Pandaboard, Beagleboard and Craneboard. Development boards are of various
types and are usually categorized as Computer on Module (CoM) and System-on-Chip
(SoC). CoM is a complete embedded computer system with the core microprocessor,
memory and all the peripherals present on a single board. On the other hand, SoC are small
boards with just the microprocessor and memory (RAM and ROM). All the extra circuitry,
peripherals, and power supply are present on another board, called Carrier board, on which
the SoC board is mounted.
SUMMARY
This chapter gives a detailed explanation on the tools used in the project.
Dept. of ISE, APSCE 2015-2016 15
Smart Self Defense Device
CHAPTER 5
DESIGN AND ANALYSIS
5.1 INTRODUCTION
Analysis and design chapter consists of detailed design of the project both low level
and high level. Main objective of this chapter is to analyse the requirements mentioned in the
previous chapter and design the system which satisfies all the required specifications for
implementation.
5.2 DESIGN AND ANALYSIS
This hardware component mainly contains amplification process, rectification, GSM
module and GPS module. Here the GPS and GSM section are important sections, which will
send the longitude and latitude of the victim place. The LCD display used here will display
the longitude and latitude on the receiver side. The vibrator sensor is an output of the two
inputs sections that is respiration vibration and the sensitive vibration sectors. These are used
during accident zones.
It also consists of small tools like buffer, rectifiers, timer, registers and storage
device capacitors. The GPS used in this has the capabilities such as maps, including streets
maps which are displayed in human readable format via test or in a graphical format. It also
tracks the nearby information and sends to the receiver end through the SIM.
Dept. of ISE, APSCE 2015-2016 16
Smart Self Defense Device
Counter Buffer and
Respirator Monostable Driver
Multivibrator
Vibration Motor
Microcontroller
Figure 5.1 Architecture
This section deals with explanation of interfaces done in the device in terms of modules.
 Interfaces

 Interfaces Description


5.3 INTERFACES
All the interfaces present in the present project has been discussed here:
 Interfacing LCD with Microcontroller

 Interfacing GPS with Microcontroller

 Interfacing GSM with Microcontroller

 Interfacing Buffer with Microcontroller
Dept. of ISE, APSCE 2015-2016 17
Smart Self Defense Device
5.4 INTERFACES DESCRIPTION
 INTERFACING LCD WITH MICROCONTROLLER
The pin configuration of LCD is as shown in figure
Figure 5.2 : pin configuration of LCD

16x2 means 16 columns and 2 rows of alphanumeric ASCII blocks on the LCD. This
LCD has 2 lines and can write maximum 16 letter word per line.It has three control
signals and one databus.


R/W: When R/W =1 then it reads data from the LCD RAM.

When R/W =0 then it writes data on LCD
RAM.

EN: Latch signal.
It is first set to 1 and then to '0' signal with a particular delay to latch the data.

RS: Register Select Control signal. When this signal is '1' = It accepts data to be
displayed. When this signal is '0' = It accepts instructions for the LCD like
setting font, cursor position etc.

Dept. of ISE, APSCE 2015-2016 18
Smart Self Defense Device

D0 to D7: It is the 8-bit Databus. It is used to send both data as well as Instructions to the
LCD based upon control signals.


Backlight + and Backlight GND: Turns on Backlight of that LCD for visibility of
Words to be displayed in the LCD.


VEE: is the contrast voltage. Using a trim pot, the contrast of the LCD can be
adjusted. More the voltage more the contrast and vice versa(voltage should never
exceed VCC = +5 volts).


The figure shows the interfacing of LCD Module with Microcontroller

Figure 5.3: Interfacing LPC2148 with LCD.

The LCD which is used in our project is a 8 segment display. LCD technology is
constatly evolving, LCD todays employ several variation of liquid crystal technology,
including super twisted nemactics and dual scan twisted nemactics. LCD can be
interfaced with microcontroller in 4 bits or 8 bits mode these differ in how data is sent
to the data line D0-D7 and data stobe given through E of the LCD. LCD commands
which are also 8bits are written to LCD in similar way.

Dept. of ISE, APSCE 2015-2016 19
Smart Self Defense Device

But, 4 bit user only has 4 data lines D4-D7 in these modes 8 bit characters ASCII data and
command data are dived into two parts and send sequentially through data lines. The idea of
4bit communication is used to save pins in microcontoller. 4 bit communication is bit slower
than 8 bit.



LCD cannot form multiple resolution images, the contract ratio for LCD images is lesser
than CRT nad plasma display, so here in our project we made use of lcd as plasma display
has a longer response time LCD show goast images and missing when images change.


The steps to display characters


 E = 1

 RS = 1

 R/W = 0


The command to send to LCD

1. E = 1
2.RS = 0
3.R/W = 1
 INTERFACING GPS WITH MICROCONTROLLER
The latitude and longitude data is received from satellite to LPC2148 by using GPS module
through UART0 port of Microcontroller.
To communicate over UART, it must be interfaced. This interfacing is done using
three basic signals which are namely, RXD (receive), TXD (transmit), GND (common
ground).
The figure shows the UART interfacing with Microcontroller
Dept. of ISE, APSCE 2015-2016 20
Smart Self Defense Device
Figure 5.4: UART Interfacing
The GPS satellites transmits signals to GPS receiver these receivers passively receives
satellites‟ signals they do not transmit each GPS satellites transmits data that indicates its
location and the current time. The time log is easily converted into distance to each satellite.
The slight difference between signals from each satellite is then used to calculate receiver‟s
positions.
The serial data is taken from the GPS module through MAX232 into the SBUF
register of LPC2148 microcontroller. The data from the GPS receiver is taken by using the
serial interrupt of the controller. The first six bytes of the data received are compared with
the pre stored string and if matched then only data is further accounted.
The pin assignment of UART in microcontroller is as shown in below table
UART DB-9 LPC2148
Connector Processor Lines
TXD-0 P0.0
UART0(P1) ISP
RXD- 0 P0.1PGM
Table 5.1: Pin Assignment of UART
After interfacing the UART Port the GPS module is interfaced to UART Port. The figure
shows the interfacing of GPS module to UART0 port.
Dept. of ISE, APSCE 2015-2016 21
Smart Self Defense Device
Figure 5.5: GPS Interfacing
GPS will track her victim location and stores in a buffer connected in the module. Here the
GSM will mainly send the collected information like latitude and longitude from the GPS
and sends the information to the receiver and through SIM by sending it to base station. Then
we are connected the GPS module to the pin number of the micro controller 16, then with the
help of the flash magic burner the coed which is loaded by using embedded C will be burnt
and are given to the microcontroller. GPS can also trace her number, longitude and latitude
of the victim by using the network base stations.
 INTERFACING GSM MODULE
The GSM module to communicate the microcontroller with mobile phones through
UART. To communicate over UART or USART, we just need three basic signals which are
namely, RXD (receive), TXD (transmit), GND (common ground).
Text message may be sent through the modem by interfacing only three signals of the
serial interface of modem with microcontroller i.e., TxD, RxD and GND. In this scheme RTS
and CTS signals of serial port interface of GSM Modem are connected with each other.
Dept. of ISE, APSCE 2015-2016 22
Smart Self Defense Device
The transmit signal of serial port of microcontroller is connected with transmit signal (TxD)
of the serial interface of GSM Modem while receive signal of microcontroller serial port is
connected with receive signal (RxD) of serial interface of GSM Modem.
The SMS message in text mode can contain only 140 characters at the most. It depends upon
the amount of information collected from GPS Engine that you need at the base station for
tracking vehicle or person.
Figure 5.6: UART Interfacing
Display a text in mobile from LPC2148 kit by using GSM module through UART. All
LPC2148 kit contains two serial interfaces that are UART0 & UART1. Here we are using
UART0. We can use UART0 for programming kit also and interfacing GSM module also.
Dept. of ISE, APSCE 2015-2016 23
Smart Self Defense Device
The pin assignment of UART in microcontroller is as shown in below table
UART DB-9 LPC2148
Connector Processor Lines
UART1 (P2) TXD-1 P0.8
RXD-1 P0.9
Table 5.7: Pin Assignment of UART
After interfacing the UART Port the GPS module is interfaced to UART Port.The figure
shows the interfacing of GPS module to UART0 port.
Figure 5.7: GSM Interfacing
GSM is a digital mobile telephony system. GSM digitizes and compresses data,then sends it
down a channel with two other streams of user data, each in its own time slot. It operates at
either the 900MHz.Here we have shown hoe to interface the GSM with microcontroller.
SUMMARY
This chapter includes the interfacing of the hardware components in detail.
Dept. of ISE, APSCE 2015-2016 24
Smart Self Defense Device
CHAPTER 6
IMPLEMENTATION
This chapter deals with the implementation details of the project and it also provides the
important modules code and snippets related to the modules.
6.1 GPS MODULE
To get_lat_and_lon
Input: if the device is active and get the respiratory reading
Output: display the current langitude and latitude
1. initialize unsigned char get_lat_and_lon function(char *buf, char *lat, char *lon)
2. initialize unsigned char retval to 0
3. initialize unsigned short i to 0
for(i = 0; i < strlen(buf); i++)
{
if(buf[i] ==
'$') true
if(!strncmp("$GPGGA", &buf[i],strlen("$GPGGA")))
true
strncpy(lat, &buf[i+LAT_INDEX], 9) // Read Latitude
strncpy(lon, &buf[i+LON_INDEX], 10) // Read Latitude
Dept. of ISE, APSCE 2015-2016 25
Smart Self Defense Device
retval is
1 break
}return retval;
Here before starting the program we shoud first insert and initialize the lcd pins and
a microcontroller
void command() // CONTROL BITS FOR LCD
{
rs = 0;
// register select is 0 to make data
initialize rw = 0;
// read and write will be make to 0 for insrting
data e = 1;
// enabling data to 1 needs the data to accept
e = 0;
}
void datawrt() // CONTROL BITS FOR LCD
{
rs = 1;
// registers select will be made 1 for accepting data
rw = 0;
// read and write section will be enabled
Dept. of ISE, APSCE 2015-2016 26
Smart Self Defense Device
e = 1;
//enabling data to 1 for
accepting e = 0;
}
void delay()
{
unsigned int i;
for ( i = 0; i < 6000 ; i++ )
}
void main()
{
unsigned char temp,
temp1; displayset();
while(1)
{
temp = port2;
temp1 = port0;
if ( temp == 0xfe )
// temp will be given to connection as to 15 pins
display1();
Dept. of ISE, APSCE 2015-2016 27
Smart Self Defense Device
else if ( temp == 0xfd )
// if the temp is given to last pins no output given
display2();
else if ( temp == 0xfb )
// temp is next initialized to pin
14 display3();
}
}
now the program for displaying the sets by connecting it to microcontroller
{
port3 = 0x00;
// initializing the ports of lccd
port1 = 0x00;
// initializing the pins to 00
port1 = 0x38;
// clearing the data
command();
delay();
port1 = 0x0e;
//initializing the pins to lcd pins
command();
Dept. of ISE, APSCE 2015-2016 28
Smart Self Defense Device
delay(); port1
= 0x01;
// clearing the screen
command();
delay();
port1 = 0x80;
// clearing the lcd display data
command();
delay(); port1
= 0x06;
//storing output of
lcd command();
delay();
// delay time given to the lcd display
}
6.2 GSM Module
To send_gps_coordinates
Input: get the langitude and latitude value from the GPS
Output: the current langitude and latitude,message sending and message sent
void send_gps_coordinates(void)
Dept. of ISE, APSCE 2015-2016 29
Smart Self Defense Device
{
clear the lcd
display LINE1,"GPS READING... " in lcd
flush_buffer(UART1)
while(!get_lat_and_lon((char*)UART1Buffer,&lat_buf[4], &lon_buf[4]))
UARTSend(UART0,lat_buf, 13)
UARTSend(UART0,lon_buf, 14)
print lat_buf , lon_buf
clear the lcd
lcd_putstring(LINE1,lat_buf)
// function used to insert the string
lcd_putstring(LINE2,lon_buf)
// function used to add string with buffer ang ongitude
set the delay to 2000000
clear the lcd
lcd_putstring(LINE1," message…")
// function for displaying messages
lcd_putstring(LINE2," sending…")
// function used to send the messages
send_msg to PH_NUM
// send the message to the number given
Dept. of ISE, APSCE 2015-2016 30
Smart Self Defense Device
set the delay to
2000000 // delaying function sets
send_msg to PH_NUM1
// sending message to phone numbers
set the delay to
2000000. //delays the time to display
clear the lcd
// clears the lcd display data
lcd_putstring(LINE1," Message ") //
putstring the data to the message
lcd_putstring(LINE2," Delevered. ") //
add the strings to the delevered data
s_memset(msg_out, 0,
sizeof(msg_out)) // setting the strings to message out
default_msg_on_lcd()
// messages to lcd
}
6.3 LCD Module
To display msg in LCD is
input: get the longitude and latitude value from the GPS
Dept. of ISE, APSCE 2015-2016 31
Smart Self Defense Device
output: the current longitude and latitude, message sending and message sent will be
displayed
void main()
{
P0=0xff;
P1=0xff;
P3=0xff;
delay_50ms(4);
initial_lcd();
write_lcd(0x80,0);
string_to_lcd(” msg is sending to sim “);
write_lcd(0xc0,0);
string_to_lcd(“msg is sending to sim1”);
}
SUMMARY
This chapter includes a detailed explanation of the implementation of our project.
Dept. of ISE, APSCE 2015-2016 32
Smart Self Defense Device
CHAPTER 7
TESTING
System testing is the stage of implementation, which aimed at ensuring that the system works
accurately and effectively before the live operation commences. Testing is the process of
executing a program with the intent of finding an error.
A good test case is one that has a high probability of finding the undiscovered error.
Testing is vital to the success of the system. System Testing makes a good logical
assumption that if all parts of the system are correct, the goal will be successfully achieved.
Any engineered product can be tested in one of the following ways. Knowing the specified
function that a product has been designed from and the test can be conducted to demonstrate
each function is fully operational. Knowing the internal working of a product, tests can be
conducted to ensure that all gears mesh,that is the internal components have been adequately
exercised.
The spiral model is the software evolutionary model is an iterative processing,
controlling and prototyping aspects of the modules present in the system.
7.1 UNIT TESTING
Unit testing is a software development process in which the smallest testable parts of
an application, called units, are individually and independently scrutinized for proper
operation.
a) Testing GSM/GPRS Modem Using Hyper terminal in PC:
 GSM/GPRS RS232 MODEM-SIM900 modem is connected directly to the PC
through serial port, without any need of any interfacing modules.

 If serial port is not there in the PC, USB To Adapter can be used for this purpose.

 Once the connection is done, appropriate COM port that got assigned to the
Communication Port in the computer system is checked by looking into the
device manager.
Dept. of ISE, APSCE 2015-2016 33
Smart Self Defense Device
b) Testing To Check Whether 16x2 LCD Working or Not:
 Connect the pin VCC pin to 5v

 Connect pin VEE and GND pin to ground

 Connect LED+ to 5v

 Connect LED- pin to ground

 If LCD is not working well, then both the lines will be bright .If its working
properly then only the lower line will be brighten.



c) Testing the GPS with LPC2148:
 Give +3.3V power supply to LPC2148 Primer Board, connect +5V adapter with GPS
module is connected with the LPC2148 Primer Board. Open the Hyper Terminal
screen, select which port are using and set the default settings. Now the screen should
show some text messages.

 If no reading any data from UART0, then just check the jumper connections & just
check the serial cable is working. Otherwise, just check the code with debugging
mode in Keil.
SUMMARY
This chapter gives a detailed explanation on unit testing performed.
Dept. of ISE, APSCE 2015-2016 34
Smart Self Defense Device
CHAPTER 8
RESULTS AND SNAPSHOTS
Figure 8.1: Blow count Indicator
In this snapshot we have shown an led which will act as an input to the device, here we will
correct and analyses the input given .Till the vibrators stops its activity the led will not
display anything.
The bead thermistor is also connected to the indicator that indicates the blow count.As soon
as the vibration stops, the input to the LED is given by the respiration sensor giver directly as
an input to the device. Here we have to blow 6 times, as the time limit is given as 1500s, as
soon as the blow reaches 6, the led will stop blinking and displays its output by showing the
red light at the end.
Dept. of ISE, APSCE 2015-2016 35
Smart Self Defense Device
Figure 8.2: Post and Pre amplifier circuit
It will get the input from the respiratory mike. If that is not strong enough then
amplifier circuit is needed. If the input is strong without this circuit also device do work. In
this circuit strenthing of weak input takes place. This module consists of 2 phases: One is an
input phase and another phase is the amplification phase which can be preamplification or
post amplification.
The user provides the input (blown air) through the bead thermistor. The respiratory
rate is determined by variation in temperature of each blow count. The input is then subjected
to amplification depending on the strength of the input. If the intensity of the air is high, then
it is directly sent to the post amplifier, else it is strengthened by using the Preamplifier circuit
and the strengthened input is sent to the post amplifier circuit for further processing.
Dept. of ISE, APSCE 2015-2016 36
Smart Self Defense Device
Figure 8.3: Buffer and Driver Circuit with the vibration motor
Here in our project we made use of buffer to store all the information from GPS and GSM ,
this buffer id directly connected to the microcontroller using the pins of the data sheet which
are 14 and 12. this buffer acts similarly to capacitor that which stores the energy and gives
back when it is necessary. This buffer will stores and sends the information stored back when
ever it s necessary to the microcontroller and device. We also make use a vibrator motor
which will vibrates when the input is directly given from the respiration sensor. This
vibration motor will starts when the threshold level cross and it will stop when the button
given is pressed off. The buffer circuit provides interfacing with the Microcontroller and the
controlling circuitry and is also used to regularise the logic present at an interface. Driver
relay circuit is used to control AC loads or high voltage loads. These circuits provide
isolation between microcontrollers circuits and high voltage operating loads.
The buffer used in this project is CD4050B and the IC used for constructing relay
driver circuit is UL2003 since it provides high voltage and high current using Darlington
array. The driver circuit drives the vibration motor which runs till 10000 ms to ensure
whether the device holder is in danger or not.
Dept. of ISE, APSCE 2015-2016 37
Smart Self Defense Device
Figure 8.4: GPS 65 Module
The data from the GPS receiver is taken by using the serial interrupt of the controller. The
first six bytes of the data received are compared with the pre stored string and if matched
then only data is further accounted. Here the GPS satellites transmits signals to GPS receiver
these receivers passively receives satellites signals they do not transmit each GPS satellites
transmits data that indicates its location and the current time.
Figure 8.5: GSM MGSM900 Modem
Here the GSM module in integrated with the micro controller by using the language
embeddded c. Once the coordinates are tracked, a sms consisting of the latitude and longitude
is sent to the intended contacts that are stored in the device prior use.
Dept. of ISE, APSCE 2015-2016 38
Smart Self Defense Device
Figure 8.6: Indicator Module
The indicator circuit provides visual indication of which module is being working at
that point of time.It consists of : Input indicator which glows for the input blow count greater
than 6. Vibration indicator whose LED glows while the vibration motor runs. Reset indicator
which glows when the memory of microcontroller is being cleared.GPS indicator which
glows when the GPS system is turned on.
This above indicator module will tells us weather the input given is proper or not . If the
input given is proper then the circuit which contain a green LED bulb will blink, if the input
is not proper then the circuit with red led light will blink. If the input is proper then the data
are sent to the other modules to execute.
Dept. of ISE, APSCE 2015-2016 39
Smart Self Defense Device
Figure 8.7: LCD Display
Here at the sending side we can see that latitude and longitude ca be displayed and the same
information can be displayed at the receiving end. The LCD is also interfaced to the micro
controller to display the longitude of the victim.
Dept. of ISE, APSCE 2015-2016 40
Smart Self Defense Device
CHAPTER 9
CONCLUSION AND FUTURE SCOPE
9.1 CONCLUSION
The proposed design will deal with critical issues faced by women in the near
past and will help to solve them with technologically sound equipment and ideas. This
system can overcome the fear that scares every woman in the country about her safety
and security. When our project is implemented it will have high impact on our society
from small kid who travels to school alone these days to aged people whose health
condition drops un expectedly. Keeping this in mind safety of citizen at present and in
future, this is mainly developed for individual who travel long distance all alone.
This device after implemented with features that was done with our efforts can
be extended to have a conference call, a voice recorder stores frequently visited
location by the user in it etc. using the arm controllers that contains extendible ports.
Since there is always advancement in technology, the device can also be embedded into
wrist watches and also other wearable with the invention of components used in our
device like ARM controller in considerable size after which the watch can serve for
multiple purposes.
9.2 FUTURE SCOPE
 This project can be further implement zapper (The Zapper, also known as The
Gun or Beam Gun in Japan, is an electronic light gun. This can be used for the
defense purpose.

 Since there is always advancement in technology, the device can also be
embedded into wrist watches and also other wearable with the invention of
components used in our device like ARM controller in considerable size after
which the watch can serve for multiple purposes.

 This can be even used in home for the security purpose. If person lives alone in
a house then they can use this device.
Dept. of ISE, APSCE 2015-2016 41
Smart Self Defense Device
REFERENCES
[1] "ARM7DI Data Sheet"; Document Number ARM DDI 0027D; Issued: Dec 1994.
[2] "ARM co-founder John Biggs". Engadget. Retrieved December 23, 2011. ",."
[3] "D-Link DSL-604+ Wireless ADSL Router - Supportforum - eXpansys Sverige".
090506 expansys.se
[4] Electronic Communication Systems – ARM Architecture Reference Manual,George
Kennedy
[5] “Electronics in Industry” - George M.Chute
[6] http://www.instructables.com/id/All-You-Need-to-Know-About-Relays/
[7]http://electronics.stackexchange.com/questions/109858/how-does-a-pre-amplifier-work-
and-why-is-it-needed
[8] http://microcontrollerslab.com/relay-driver-circuit-using-uln2003/
[9] http://www.microcontroller-project.com/16x2-lcd-working.html
[10] http://embeddedlifehelp.blogspot.in/2012/03/16x2-lcd-programming-for-
beginners-made.html?m=1
[11] https://www.pantechsolutions.net/project-kits/interfacing-uart-with-arm7-friendly
[12]https://www.pantechsolutions.net/microcontroller-boards/uart-interfacing-with-lpc2148-
arm7-primer
[13] "On MicroSD Problems". Bunnie Studios. Andrew (bunnie) Huang.
[14] “Principles of Electronics” - V.K.Mehta
[15] “SID: Ship Intrusion Detection with Wireless Sensor Networks” International
Conference on Distributed Computing Systems.
[16] “Telecommunication Switching, Traffic and Networks” – J.E.Flood Hanjiang Luo,
Kaishun Wu, Zhongwen Guo, Lin Gu, Zhong Yang and Lionel M.
Dept. of ISE, APSCE 2015-2016 42
Smart Self Defense Device
APPENDIX A
A.1 ACRONYM AND ABBREVATIONS
Acronym Abbreviation
GPS Global Positioning System
GSM Global System for Mobile
LCD Liquid Crystal Display
ARM Advanced RISC Machine
LPC Linear Programming Control
RISC Reduce Instruction Set Computer
UART
Universal asynchronous
Receiver/Transmitter
LED Light Emitting Diode
Dept. of ISE, APSCE 2015-2016 43
Smart Self Defense Device
APPENDIX B
B.1 MICROCONTROLLER ARM7 LPC2148
The pin diagram of the LPC2148 microcontroller is show in the Figure A.1.
Figure B.1: Pin diagram of ARM & LPC 2148
Dept. of ISE, APSCE 2015-2016 44
Smart Self Defense Device
The LPC2148 microcontroller has 2 ports and each port comprises of 32 pins. So in total the
microcontroller has 64 pins.
B.1.1 MEMORY :
LPC2148 has 32kB on chip SRAM and 512 kB on chip FLASH memory. It has inbuilt
support up to 2kB end point USB RAM also. This huge amount of memory is well suited for
almost all the applications.
The basic functions of above memory.
 On chip FLASH memory system:
The LPC2148 incorporates a 512 kB Flash memory system. This memory may be used for
both code and data storage. The FLASH memory can be programmed by means of
1. Serialbuilt-in JTAG interface
2. Using In System Programming (ISP) and UART0or
3. By means of InApplication Programming (IAP) capabilities.
The application program, using the IAP functions, may also erase and/or program the Flash
while the application is running, allowing a great degree of flexibility for data storage field
firmware upgrades, etc. When the LPC2148 on-chip boot loader is used, 500 kB of Flash
memory is available for user code.
The LPC2148 Flash memory provides minimum of 100,000 erase/write cycles and 20 years
of data-retention.
 On chip SRAM:
The LPC2148 provides 32 kB of static RAM which may be used for code and/or data
storage. It may be accessed as 8-bits, 16-bits, and 32-bits.
B.1.2 I/O PORTS:
 LPC 2148 has two I/O Ports each of 32 bit wide giving us total 64 I/O Pins. Ports are
named as P0 and P1.
Dept. of ISE, APSCE 2015-2016 45
Smart Self Defense Device
 Pins of each port are labelled as PX.Y where X stands for port number, 0 or 1 where else Y
stands for pin number 0 to 31.

 Each pin can perform alternate functions also. For eg. P0.8 serves as GPIO as well as
transmitter pin of UART1, PWM4 and AD1.1.

 On RESET, each pin is configured as GPIO. For any of the other use, programmer must
configure it properly.
PORT TYPE DESCRIPTION
PINS
P0.0-P0.31 Input/output General purpose input/output. The number of GPIOs
P1.16-P1.31 actually available depends on the use of alternate functions.
Table B.1: I/O Ports Pins
 PORT 0 is a 32-bit I/O port with individual direction controls for each bit. Total of 28 pins
of the Port 0 can be used as a general purpose bi-directional digital I/Os while P0.31 provides
digital output functions only. The operation of port 0 pins depends upon the pin function
selected via the pin connect block. Pins P0.24, P0.26 and P0.27 are not available.

 PORT 1 is a 32-bit bi-directional I/O port with individual direction controls for each bit.
The operation of port 1 pins depends upon the pin function selected via the pin connect
block. Pins 0 through 15 of port 1 are not available.

 PORT0 and PORT1 are controlled via two groups of registers explained below.

 IOPIN:
This is GPIO Port Pin value register. The Current State of the GPIO configured port pins
can always be read from this register, regardless of pin direction.
 IODIR:
This is GPIO Port Direction control register. This register individually Controls the
direction of each Port Pin.
Dept. of ISE, APSCE 2015-2016 46
Smart Self Defense Device
 IOCLR:
This is GPIO Port Output Clear registers. This register controls the state of output
pins. Writing ones produces lows at the corresponding port pins and clears the corresponding
bits in the IOSET register. Writing zeroes has no effect.
 IOSET:
This is GPIO Port Output Set registers. This register controls the state of output pins in
conjunction with the IOCLR register. Writing ones produces highs at the corresponding port
pins. Writing zeroes has no effect. These are the set of register used to configure I/O Pins. Now
let‟s move to individual registers in deep.
 IOSEL0:
Port 0 has 32 pins (P0.0 to P0.31). Each pin can have multiple functions. On RESET,
all pins are configured as GPIO pins. However we can re-configure using the registers
IOSEL0 and IOSEL1.
IOSEL0 is used to select function of P0.0 to P0.15. Each pin has up to 4 functions so 2
bits/pin in IOSEL0 is provided for selecting function.
00 Function 0 (Default Function= GPIO)
01 Function 1
10 Function 2
11 Function 3
Table B.2 : IOSEL0 bit values
Dept. of ISE, APSCE 2015-2016 47
Smart Self Defense Device
 IOSEL1:
IOSEL1 is used to select function of Pins P0.16 to P0.31
 IOSEL2:
IOSEL2 is used to select function of Pins P1.16 to P1.31
 IO0DIR:
IO0DIR is used to configure pins of Port 0-P0 as input or output pins.
1=Output Pin
0= Input Pin
 IO1DIR:
IO1DIR is used to configure pins of Port 1-P1 as input or output pins.
1=Output Pin
0= Input Pin
 IO0SET:
It is used to set pins of Port0-P0 to logic 1.
 IO0CLR :
It is used to set pins of Port0-P0 to logic 0.
 IO1SET :
It is used to set pins of Port1-P1 to logic 1.
 IO1CLR :
It is used to set pins of Port1-P1 to logic 0.
Dept. of ISE, APSCE 2015-2016 48
Smart Self Defense Device
APPENDIX C
C.1 LPC2148 ARM7 BOARD
Features
2148 DEV Board-LPC214X is a evaluation board for LPC2148 ARM7 based
microcontroller. The LPC2148 microcontroller has 512KB of internal flash and
32+8K RAM.
Figure C.1: ARM 7 Board
Following are the salient features of the board.
 Dimensions: 160 X 160mm2layer PCB (FR-4 material)

 Power supply: DC 9-12V with power LED

 linear regulators generate +3.3V/500mA and +5v/500mA from power supply

 USB connector ( as alternate power source).

 8 Led Array

 INT keys

 Extension headers for all microcontroller pins.connectors (2).
Dept. of ISE, APSCE 2015-2016 49
Smart Self Defense Device
 RS232 connectors (2).

 JTAG connector.

 SD/MMC connector.

 USB B-type connector with Link-LED.

 All peripheral configurable via jumpers.

 I2C based EEPROM.

 Line X 16 character LCD with back light control.

 RDY to Interface 128X64 GRAPHICAL DISPLAY - Optional
Dept. of ISE, APSCE 2015-2016 50

More Related Content

What's hot

IRJET - Women’s Safety using IoT
IRJET - Women’s Safety using IoTIRJET - Women’s Safety using IoT
IRJET - Women’s Safety using IoTIRJET Journal
 
IRJET- Women Safety Device with GPS, GSM and Health Monitoring System
IRJET- Women Safety Device with GPS, GSM and Health Monitoring SystemIRJET- Women Safety Device with GPS, GSM and Health Monitoring System
IRJET- Women Safety Device with GPS, GSM and Health Monitoring SystemIRJET Journal
 
Mobile safety systems for automobiles
Mobile safety systems for automobilesMobile safety systems for automobiles
Mobile safety systems for automobilesIAEME Publication
 
Mobile safety systems for automobiles
Mobile safety systems for automobilesMobile safety systems for automobiles
Mobile safety systems for automobilesiaemedu
 
IRJET- IoT based Smart Foot Device for Women Safety
IRJET- IoT based Smart Foot Device for Women SafetyIRJET- IoT based Smart Foot Device for Women Safety
IRJET- IoT based Smart Foot Device for Women SafetyIRJET Journal
 
IRJET - Ensuring Women Safety by Offline Tracking
IRJET -  	  Ensuring Women Safety by Offline TrackingIRJET -  	  Ensuring Women Safety by Offline Tracking
IRJET - Ensuring Women Safety by Offline TrackingIRJET Journal
 
Finger print based door access system
Finger print based door access systemFinger print based door access system
Finger print based door access systemAkshay Govekar
 
Vehicle Security System
Vehicle Security SystemVehicle Security System
Vehicle Security SystemVISHAL DONGA
 
Tracking And Security System for Women’s using GPS & GSM
Tracking And Security System for Women’s using GPS & GSMTracking And Security System for Women’s using GPS & GSM
Tracking And Security System for Women’s using GPS & GSMIRJET Journal
 
Emergency Tracking System for Women using Body Sensors Via Wrist Watches usin...
Emergency Tracking System for Women using Body Sensors Via Wrist Watches usin...Emergency Tracking System for Women using Body Sensors Via Wrist Watches usin...
Emergency Tracking System for Women using Body Sensors Via Wrist Watches usin...IRJET Journal
 
IRJET- Life Saving Device: A Smart Helmet
IRJET-  	  Life Saving Device: A Smart HelmetIRJET-  	  Life Saving Device: A Smart Helmet
IRJET- Life Saving Device: A Smart HelmetIRJET Journal
 
ADVANCED BIKE SECURITY SYSTEM USING GSM AND GPS
ADVANCED BIKE SECURITY SYSTEM USING GSM AND GPSADVANCED BIKE SECURITY SYSTEM USING GSM AND GPS
ADVANCED BIKE SECURITY SYSTEM USING GSM AND GPSEG TECHNOLOGIES
 
Advanced car security system
Advanced car security systemAdvanced car security system
Advanced car security systemAmi Goswami
 
Fingerprint base security system
Fingerprint base security systemFingerprint base security system
Fingerprint base security systempraful borad
 
IoT and Fingerprint Based Door Looking System
IoT and Fingerprint Based Door Looking SystemIoT and Fingerprint Based Door Looking System
IoT and Fingerprint Based Door Looking Systemrahulmonikasharma
 
Fingerprint Based Security System
Fingerprint Based Security SystemFingerprint Based Security System
Fingerprint Based Security SystemTrijendra Singh
 
Smart Helmet using GSM and GPS
Smart Helmet using GSM and GPSSmart Helmet using GSM and GPS
Smart Helmet using GSM and GPSIRJET Journal
 
Finger print authentication for bikes
Finger print authentication for bikes Finger print authentication for bikes
Finger print authentication for bikes Saiprasad
 

What's hot (20)

IRJET - Women’s Safety using IoT
IRJET - Women’s Safety using IoTIRJET - Women’s Safety using IoT
IRJET - Women’s Safety using IoT
 
IRJET- Women Safety Device with GPS, GSM and Health Monitoring System
IRJET- Women Safety Device with GPS, GSM and Health Monitoring SystemIRJET- Women Safety Device with GPS, GSM and Health Monitoring System
IRJET- Women Safety Device with GPS, GSM and Health Monitoring System
 
Mobile safety systems for automobiles
Mobile safety systems for automobilesMobile safety systems for automobiles
Mobile safety systems for automobiles
 
Mobile safety systems for automobiles
Mobile safety systems for automobilesMobile safety systems for automobiles
Mobile safety systems for automobiles
 
IRJET- IoT based Smart Foot Device for Women Safety
IRJET- IoT based Smart Foot Device for Women SafetyIRJET- IoT based Smart Foot Device for Women Safety
IRJET- IoT based Smart Foot Device for Women Safety
 
IRJET - Ensuring Women Safety by Offline Tracking
IRJET -  	  Ensuring Women Safety by Offline TrackingIRJET -  	  Ensuring Women Safety by Offline Tracking
IRJET - Ensuring Women Safety by Offline Tracking
 
Finger print based door access system
Finger print based door access systemFinger print based door access system
Finger print based door access system
 
Vehicle Security System
Vehicle Security SystemVehicle Security System
Vehicle Security System
 
Tracking And Security System for Women’s using GPS & GSM
Tracking And Security System for Women’s using GPS & GSMTracking And Security System for Women’s using GPS & GSM
Tracking And Security System for Women’s using GPS & GSM
 
Emergency Tracking System for Women using Body Sensors Via Wrist Watches usin...
Emergency Tracking System for Women using Body Sensors Via Wrist Watches usin...Emergency Tracking System for Women using Body Sensors Via Wrist Watches usin...
Emergency Tracking System for Women using Body Sensors Via Wrist Watches usin...
 
IRJET- Life Saving Device: A Smart Helmet
IRJET-  	  Life Saving Device: A Smart HelmetIRJET-  	  Life Saving Device: A Smart Helmet
IRJET- Life Saving Device: A Smart Helmet
 
ADVANCED BIKE SECURITY SYSTEM USING GSM AND GPS
ADVANCED BIKE SECURITY SYSTEM USING GSM AND GPSADVANCED BIKE SECURITY SYSTEM USING GSM AND GPS
ADVANCED BIKE SECURITY SYSTEM USING GSM AND GPS
 
Advanced car security system
Advanced car security systemAdvanced car security system
Advanced car security system
 
PPT on ANDROID APPLICATION SOS
PPT on ANDROID APPLICATION SOSPPT on ANDROID APPLICATION SOS
PPT on ANDROID APPLICATION SOS
 
Fingerprint base security system
Fingerprint base security systemFingerprint base security system
Fingerprint base security system
 
Vehicle security system final report
Vehicle security system final reportVehicle security system final report
Vehicle security system final report
 
IoT and Fingerprint Based Door Looking System
IoT and Fingerprint Based Door Looking SystemIoT and Fingerprint Based Door Looking System
IoT and Fingerprint Based Door Looking System
 
Fingerprint Based Security System
Fingerprint Based Security SystemFingerprint Based Security System
Fingerprint Based Security System
 
Smart Helmet using GSM and GPS
Smart Helmet using GSM and GPSSmart Helmet using GSM and GPS
Smart Helmet using GSM and GPS
 
Finger print authentication for bikes
Finger print authentication for bikes Finger print authentication for bikes
Finger print authentication for bikes
 

Viewers also liked

こがねむし新機能
こがねむし新機能こがねむし新機能
こがねむし新機能Manabu Kondo
 
Tema 5 exploracion geoelectrica de aguas subterraneas
Tema 5 exploracion geoelectrica de aguas subterraneasTema 5 exploracion geoelectrica de aguas subterraneas
Tema 5 exploracion geoelectrica de aguas subterraneasmargot condori quispe
 
超資金繰り予定表あんみんマニュアル
超資金繰り予定表あんみんマニュアル超資金繰り予定表あんみんマニュアル
超資金繰り予定表あんみんマニュアルManabu Kondo
 
Sex determination (p.a.c 2015)
Sex determination (p.a.c 2015)Sex determination (p.a.c 2015)
Sex determination (p.a.c 2015)Siddhanth Singh
 
Rpp Khutbah dan Ceramah
Rpp Khutbah dan CeramahRpp Khutbah dan Ceramah
Rpp Khutbah dan CeramahAmalia Sofitri
 
Iran academic climate 2016 dr isaac karimi
Iran academic climate 2016 dr isaac karimiIran academic climate 2016 dr isaac karimi
Iran academic climate 2016 dr isaac karimiISAAC KARIMI
 
Builder Man
Builder ManBuilder Man
Builder ManKevZep
 
Pesquisa sobre a visão do público jovem-adulto sobre as relações amorosas.
Pesquisa sobre a visão do público jovem-adulto sobre as relações amorosas.Pesquisa sobre a visão do público jovem-adulto sobre as relações amorosas.
Pesquisa sobre a visão do público jovem-adulto sobre as relações amorosas.natalhadias
 
قــنــاة بــانـورمـا-درامـا
قــنــاة بــانـورمـا-درامـاقــنــاة بــانـورمـا-درامـا
قــنــاة بــانـورمـا-درامـاZohor Hassan
 
Análisis de una imagen
Análisis de una imagen Análisis de una imagen
Análisis de una imagen 12348756
 
Componentes de una banda sonora
Componentes de una banda sonoraComponentes de una banda sonora
Componentes de una banda sonoraJosé Abel Lemos
 
Enhancing human service programs through study abroad
Enhancing human service programs through study abroadEnhancing human service programs through study abroad
Enhancing human service programs through study abroadDr. Narketta Sparkman-Key
 
TESTA SEDA Keynote Spring 2016
TESTA SEDA Keynote Spring 2016TESTA SEDA Keynote Spring 2016
TESTA SEDA Keynote Spring 2016Tansy Jessop
 
Arm7 Interfacing examples
Arm7   Interfacing examples Arm7   Interfacing examples
Arm7 Interfacing examples Dr.YNM
 
Nathalie Nasser_Curriculum Vitae
Nathalie Nasser_Curriculum VitaeNathalie Nasser_Curriculum Vitae
Nathalie Nasser_Curriculum VitaeNathalie Nasser
 
Shopping list food version 001
Shopping list food version 001Shopping list food version 001
Shopping list food version 001Unifi Us
 
Using Animation in Education
Using Animation in EducationUsing Animation in Education
Using Animation in EducationAmro Elfeki
 
Ferdi Kaza Sigortası Genel Şartları Nelerdir?
Ferdi Kaza Sigortası Genel Şartları Nelerdir?Ferdi Kaza Sigortası Genel Şartları Nelerdir?
Ferdi Kaza Sigortası Genel Şartları Nelerdir?Sigorta Bilgileri
 

Viewers also liked (20)

こがねむし新機能
こがねむし新機能こがねむし新機能
こがねむし新機能
 
Tema 5 exploracion geoelectrica de aguas subterraneas
Tema 5 exploracion geoelectrica de aguas subterraneasTema 5 exploracion geoelectrica de aguas subterraneas
Tema 5 exploracion geoelectrica de aguas subterraneas
 
超資金繰り予定表あんみんマニュアル
超資金繰り予定表あんみんマニュアル超資金繰り予定表あんみんマニュアル
超資金繰り予定表あんみんマニュアル
 
Sex determination (p.a.c 2015)
Sex determination (p.a.c 2015)Sex determination (p.a.c 2015)
Sex determination (p.a.c 2015)
 
Rpp Khutbah dan Ceramah
Rpp Khutbah dan CeramahRpp Khutbah dan Ceramah
Rpp Khutbah dan Ceramah
 
Iran academic climate 2016 dr isaac karimi
Iran academic climate 2016 dr isaac karimiIran academic climate 2016 dr isaac karimi
Iran academic climate 2016 dr isaac karimi
 
Builder Man
Builder ManBuilder Man
Builder Man
 
Pesquisa sobre a visão do público jovem-adulto sobre as relações amorosas.
Pesquisa sobre a visão do público jovem-adulto sobre as relações amorosas.Pesquisa sobre a visão do público jovem-adulto sobre as relações amorosas.
Pesquisa sobre a visão do público jovem-adulto sobre as relações amorosas.
 
Romania
RomaniaRomania
Romania
 
قــنــاة بــانـورمـا-درامـا
قــنــاة بــانـورمـا-درامـاقــنــاة بــانـورمـا-درامـا
قــنــاة بــانـورمـا-درامـا
 
Análisis de una imagen
Análisis de una imagen Análisis de una imagen
Análisis de una imagen
 
Componentes de una banda sonora
Componentes de una banda sonoraComponentes de una banda sonora
Componentes de una banda sonora
 
Enhancing human service programs through study abroad
Enhancing human service programs through study abroadEnhancing human service programs through study abroad
Enhancing human service programs through study abroad
 
TESTA SEDA Keynote Spring 2016
TESTA SEDA Keynote Spring 2016TESTA SEDA Keynote Spring 2016
TESTA SEDA Keynote Spring 2016
 
Arm7 Interfacing examples
Arm7   Interfacing examples Arm7   Interfacing examples
Arm7 Interfacing examples
 
Nathalie Nasser_Curriculum Vitae
Nathalie Nasser_Curriculum VitaeNathalie Nasser_Curriculum Vitae
Nathalie Nasser_Curriculum Vitae
 
Shopping list food version 001
Shopping list food version 001Shopping list food version 001
Shopping list food version 001
 
Using Animation in Education
Using Animation in EducationUsing Animation in Education
Using Animation in Education
 
Saira Parveen
Saira ParveenSaira Parveen
Saira Parveen
 
Ferdi Kaza Sigortası Genel Şartları Nelerdir?
Ferdi Kaza Sigortası Genel Şartları Nelerdir?Ferdi Kaza Sigortası Genel Şartları Nelerdir?
Ferdi Kaza Sigortası Genel Şartları Nelerdir?
 

Similar to smart_self_defence_device.PDF

IRJET - Women’s Safety System using IoT
IRJET -  	  Women’s Safety System using IoTIRJET -  	  Women’s Safety System using IoT
IRJET - Women’s Safety System using IoTIRJET Journal
 
Batch-6.pptx
Batch-6.pptxBatch-6.pptx
Batch-6.pptxpavanJoy
 
IRJET- Smart and Ubiquitous Defense Monitoring System based on IoT
IRJET- Smart and Ubiquitous Defense Monitoring System based on IoTIRJET- Smart and Ubiquitous Defense Monitoring System based on IoT
IRJET- Smart and Ubiquitous Defense Monitoring System based on IoTIRJET Journal
 
Automated women safety device
Automated women safety deviceAutomated women safety device
Automated women safety deviceIRJET Journal
 
IRJET- Smart Shield for Women Safety
IRJET-  	  Smart Shield for Women SafetyIRJET-  	  Smart Shield for Women Safety
IRJET- Smart Shield for Women SafetyIRJET Journal
 
IRJET- Women Safety using IoT
IRJET- Women Safety using IoTIRJET- Women Safety using IoT
IRJET- Women Safety using IoTIRJET Journal
 
IRJET- Intelligent Security System for Women by using Arduino
IRJET- Intelligent Security System for Women by using ArduinoIRJET- Intelligent Security System for Women by using Arduino
IRJET- Intelligent Security System for Women by using ArduinoIRJET Journal
 
IRJET-Protection for Women using IoT Smart Device with Location and Parameters
IRJET-Protection for Women using IoT Smart Device with Location and ParametersIRJET-Protection for Women using IoT Smart Device with Location and Parameters
IRJET-Protection for Women using IoT Smart Device with Location and ParametersIRJET Journal
 
IOT BASED BLACK BOX DEVICE FOR VEHICLE DETECTION
IOT BASED BLACK BOX DEVICE FOR VEHICLE DETECTIONIOT BASED BLACK BOX DEVICE FOR VEHICLE DETECTION
IOT BASED BLACK BOX DEVICE FOR VEHICLE DETECTIONK S RANJITH KUMAR
 
ALPHA-ACCIDENT LOCATION PATIENT HEALTH ASSISTENCE
ALPHA-ACCIDENT LOCATION PATIENT HEALTH ASSISTENCEALPHA-ACCIDENT LOCATION PATIENT HEALTH ASSISTENCE
ALPHA-ACCIDENT LOCATION PATIENT HEALTH ASSISTENCEIRJET Journal
 
IRJET - Android App for Women Security
IRJET -  	  Android App for Women SecurityIRJET -  	  Android App for Women Security
IRJET - Android App for Women SecurityIRJET Journal
 
Women Security Assistance system with GPS tracking and messaging system
Women Security Assistance system with GPS tracking and messaging system Women Security Assistance system with GPS tracking and messaging system
Women Security Assistance system with GPS tracking and messaging system Uttej Kumar Palavai
 
IRJET - Fabricating Intelligent Ankle Boot for Dementia Patient
IRJET - Fabricating Intelligent Ankle Boot for Dementia PatientIRJET - Fabricating Intelligent Ankle Boot for Dementia Patient
IRJET - Fabricating Intelligent Ankle Boot for Dementia PatientIRJET Journal
 
Swarma – A Women Safety Device
Swarma – A Women Safety DeviceSwarma – A Women Safety Device
Swarma – A Women Safety DeviceIRJET Journal
 
IRJET- An Implementation and Efficient Way to Improve Women Safety Empowe...
IRJET-  	  An Implementation and Efficient Way to Improve Women Safety Empowe...IRJET-  	  An Implementation and Efficient Way to Improve Women Safety Empowe...
IRJET- An Implementation and Efficient Way to Improve Women Safety Empowe...IRJET Journal
 
Smart ID for Blind People’s
Smart ID for Blind People’sSmart ID for Blind People’s
Smart ID for Blind People’sIRJET Journal
 
Design and Development of Advanced Device for Women Safety
Design and Development of Advanced Device for Women SafetyDesign and Development of Advanced Device for Women Safety
Design and Development of Advanced Device for Women SafetyIRJET Journal
 

Similar to smart_self_defence_device.PDF (20)

IRJET - Women’s Safety System using IoT
IRJET -  	  Women’s Safety System using IoTIRJET -  	  Women’s Safety System using IoT
IRJET - Women’s Safety System using IoT
 
Batch-6.pptx
Batch-6.pptxBatch-6.pptx
Batch-6.pptx
 
IRJET- Smart and Ubiquitous Defense Monitoring System based on IoT
IRJET- Smart and Ubiquitous Defense Monitoring System based on IoTIRJET- Smart and Ubiquitous Defense Monitoring System based on IoT
IRJET- Smart and Ubiquitous Defense Monitoring System based on IoT
 
Automated women safety device
Automated women safety deviceAutomated women safety device
Automated women safety device
 
IRJET- Smart Shield for Women Safety
IRJET-  	  Smart Shield for Women SafetyIRJET-  	  Smart Shield for Women Safety
IRJET- Smart Shield for Women Safety
 
IRJET- Women Safety using IoT
IRJET- Women Safety using IoTIRJET- Women Safety using IoT
IRJET- Women Safety using IoT
 
IRJET- Intelligent Security System for Women by using Arduino
IRJET- Intelligent Security System for Women by using ArduinoIRJET- Intelligent Security System for Women by using Arduino
IRJET- Intelligent Security System for Women by using Arduino
 
IRJET-Protection for Women using IoT Smart Device with Location and Parameters
IRJET-Protection for Women using IoT Smart Device with Location and ParametersIRJET-Protection for Women using IoT Smart Device with Location and Parameters
IRJET-Protection for Women using IoT Smart Device with Location and Parameters
 
boxiot.pdf
boxiot.pdfboxiot.pdf
boxiot.pdf
 
IOT BASED BLACK BOX DEVICE FOR VEHICLE DETECTION
IOT BASED BLACK BOX DEVICE FOR VEHICLE DETECTIONIOT BASED BLACK BOX DEVICE FOR VEHICLE DETECTION
IOT BASED BLACK BOX DEVICE FOR VEHICLE DETECTION
 
ALPHA-ACCIDENT LOCATION PATIENT HEALTH ASSISTENCE
ALPHA-ACCIDENT LOCATION PATIENT HEALTH ASSISTENCEALPHA-ACCIDENT LOCATION PATIENT HEALTH ASSISTENCE
ALPHA-ACCIDENT LOCATION PATIENT HEALTH ASSISTENCE
 
IRJET - Android App for Women Security
IRJET -  	  Android App for Women SecurityIRJET -  	  Android App for Women Security
IRJET - Android App for Women Security
 
Women Security Assistance system with GPS tracking and messaging system
Women Security Assistance system with GPS tracking and messaging system Women Security Assistance system with GPS tracking and messaging system
Women Security Assistance system with GPS tracking and messaging system
 
IRJET - Fabricating Intelligent Ankle Boot for Dementia Patient
IRJET - Fabricating Intelligent Ankle Boot for Dementia PatientIRJET - Fabricating Intelligent Ankle Boot for Dementia Patient
IRJET - Fabricating Intelligent Ankle Boot for Dementia Patient
 
Intelligent Controlled Residence and Face Recognition Technology
Intelligent Controlled Residence and Face Recognition TechnologyIntelligent Controlled Residence and Face Recognition Technology
Intelligent Controlled Residence and Face Recognition Technology
 
An internet of things-based touchless parking system using ESP32-CAM
An internet of things-based touchless parking system using  ESP32-CAMAn internet of things-based touchless parking system using  ESP32-CAM
An internet of things-based touchless parking system using ESP32-CAM
 
Swarma – A Women Safety Device
Swarma – A Women Safety DeviceSwarma – A Women Safety Device
Swarma – A Women Safety Device
 
IRJET- An Implementation and Efficient Way to Improve Women Safety Empowe...
IRJET-  	  An Implementation and Efficient Way to Improve Women Safety Empowe...IRJET-  	  An Implementation and Efficient Way to Improve Women Safety Empowe...
IRJET- An Implementation and Efficient Way to Improve Women Safety Empowe...
 
Smart ID for Blind People’s
Smart ID for Blind People’sSmart ID for Blind People’s
Smart ID for Blind People’s
 
Design and Development of Advanced Device for Women Safety
Design and Development of Advanced Device for Women SafetyDesign and Development of Advanced Device for Women Safety
Design and Development of Advanced Device for Women Safety
 

smart_self_defence_device.PDF

  • 1. VISVESVARAYA TECHNOLOGICAL UNIVERSITY Jnana Sangama, Belgaum – 590014 A Project Report On “Smart Self Defense Device” Submitted in partial fulfillment of the requirement for the award of BACHELOR OF ENGINEERING In INFORMATION SCIENCE & ENGINEERING By ANUJNA H.M 1AP12IS006 CHAITHRA P 1AP12IS013 JEEVITHA P 1AP12IS022 NAGARATHNA T.S 1AP12IS033 Under the guidance of: Internal Guide: Mr. NANDEESHWAR S.B Assoc. Prof & HOD, Dept. of ISE. 2015-16 DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING A.P.S.COLLEGE OF ENGINEERING Anantha Gnana Gangothri, NH-209, Kanakapura Road, Bangalore-560082
  • 2. A.P.S.COLLEGE OF ENGINEERING (Affiliated to Visvesvaraya Technological University) Anantha Gnana Gangothri, NH-209, Kanakapura Road, Bangalore-560082. DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING CERTIFICATE Certified that the Project Work entitled “Smart Self Defense Device” has been carried out at APS College of Engineering, Bangalore, by Anujna H M (1AP12IS006), Chaithra P(1AP12IS013), Jeevitha P (1AP1212IS022), Nagarathna T S(1AP12IS033), bonafide student/s of Eighth Semester, B.E. in partial fulfillment for the award of degree in Bachelor of Engineering in Information Science & Engineering affiliated to Visvesvaraya Technological University, Belgaum during academic year 2015-2016. It is certified that all corrections/suggestions indicated for Internal Assessment have been incorporated in the report deposited in departmental library. The project report has been approved as it satisfies the academic requirements in respect of project work for the said degree. Mr. Nandeeshwar S. B, Dr. G Ravindranath, Asst. Prof. & HOD Principal External Viva Name of the Examiners 1. 2. Signature with date
  • 3. DECLARATION We hereby declare that the entire project work entitled SMART SELF DEFENCE DEVICE done at APS COLLEGE OF ENGINEERING, Bangalore, submitted to Visvesvaraya Technological University, in partial fulfillment of requirements for the degree of Bachelor of Engineering in Information Science & Engineering is a record of original work done by us and no part of it has been submitted for any degree or diploma of any institution previously. Place: Date: ANUJNA H.M 1AP12IS006 CHAITHRA P 1AP12IS013 JEEVITHA P 1AP12IS022 NAGARATHNA T.S 1AP12IS033
  • 4. I Acknowledgement The completion of project brings with and sense of satisfaction, but it is never completed without thanking the persons who are all responsible for its successful completion. We wish to express our profound feelings of gratitude to this great institution of ours A.P.S College of Engineering for providing us the excellent facilities. Firstly we would like to thank Dr. G.Ravindranath, Principal, for having permitted us to carry out the project on “Self Defence Device” successfully. We express our deep gratitude to Prof. Nandeeswar S B , Assoc, Prof & HOD for providing us an opportunity for fulfilling our goal. We express our warm regards to the seminar co-ordinators Prof. Nandeeswar S B,Assoc Prof HOD, Prof.Abhijit Das, Asst.Prof, for their skillful guidance, constant supervision, timely suggestion and constructive criticism in successful completion our project on time. We deeply grateful to our parents and friends who have been supportive with their tolerance and genuine inspiration, in equal parts. We thank all the teaching and non-teaching staff, Dept of ISE. Anujna.H.M (1AP12IS006) Chaithra.P (1AP12IS013) Jeevitha.P (1AP12IS022) Nagarthna.T.S (1AP12IS033)
  • 5. II ABSTRACT Today in the current global scenario, the prime question in every Woman’s mind, taking into account the ever rising increase of issues on women harassment in recent past, is only about her safety and security. The only thought haunting every Woman’s is when they will be able to move freely on the streets even in odd hours without worrying about their security. This paper suggests a new perspective to use technology to protect women. The system resembles a normal belt which when activated, tracks the location of the victim using GPS and sends emergency messages using GSM ,to three emergency contacts and the police control room. The system also incorporates a screaming alarm that uses real-time clock, to call out for help and also generates an electric shock to injure the attacker for self- defense.
  • 6. Table of Contents Acknowledgement I Abstract II Contents III List of Figures VI List of Tables VII CHAPTER1 Preamble 1-5 1.1 Introduction 1 1.2 Objective of the study 1 1.3 Existing system 2 1.4 Proposed solution 3 1.5 Scope of the study 3 1.6 Limitations of the study 4 1.7 Organization of the report 4 CHAPTER 2 Literature survey 6-12 2.1 General components 6 CHAPTER 3 System 13 requirements 3.1 Hardware requirements 13 3.2 Software requirements 13
  • 7. CHAPTER 4 Tools 14-15 CHAPTER 5 Design and analysis 16-24 5.1 Introduction 16 5.2 Design and analysis 16 5.3 Interfaces 17 5.4 Interfaces description 18 CHAPTER 6 Implementation 25-32 6.1 GPS module 25 6.2 GSM module 29 6.3 LCD module 32 CHAPTER 7 Testing 32-34 7.1 Unit testing 33 CHAPTER 8 Results and snapshots 35-40
  • 8. CHAPTER 9 Conclusion and future scope 41 9.1 Conclusion 41 9.2 Future scope 41 REFERENCES 42 APPENDIX A Acronyms and Abbreviations 43 APPENDIX B Microcontroller arm7 44-48 lpc2148 APPENDIX C LPC2148 arm7 board 49-50
  • 9. List of Figures Figure No. Figure Name Page Number 2.1 Fixed resistor 7 2.2 Variable resistor 7 2.3 Bead thermistor 8 2.4 Disc Capacitors 9 2.5 Electrolytic Capacitor 9 2.6 Diode 10 2.7 Relays 10 2.8 Integrated Circuit 11 2.9 ARM LPC2148 11 2.10 Vibration Motor 12 5.1 Architecture 17 5.2 pin configuration of LCD 18 5.3 Interfacing LPC2148 with LCD. 19 5.4 UART Interfacing 21 5.5 GPS Interfacing 22 5.6 UART Interfacing 23 5.7 GSM Interfacing 24 8.1 Blow count Indicator 35 8.2 Post and Pre amplifier circuit 36 8.3 Buffer and Driver Circuit with the 37 vibration motor 8.4 GPS 65 Module 38 8.5 GSM MGSM900 Modem 38 8.6 Indicator Module 39 8.7 LCD Display 40 B.1 Pin diagram of ARM & LPC 2148 44 C.1 ARM 7 Board 49
  • 10. List of Tables Table Table Name Page Number Number 5.1 Pin Assignment of UART 21 5.7 Pin Assignment of UART 24 B.1 I/O Ports Pins 46 B.2 IOSEL0 bit values 47
  • 11.
  • 12. Smart Self Defense Device CHAPTER 1 PREAMBLE 1.1 INTRODUCTION According to the national crime records bureau. The rate of rape cases are increased more. By observing such a bad condition of women in the world, we have introduced a device by name “Smart Self-Defence device”. This has the potential to help citizens by the technologies that are embedded in it. The primary reasons behind such vibration statistics is the society which is prejudiced against the girl child, lack of proper policing, ineffective laws etc. While the long term solution should aim to correct the above factors. The device is specially designed for giving protection to people. The hardware component mainly calculates the pulse rate and the temperature variation of the human. This device mainly contains GPS, GSM and vibration sensors along with hardware tools like buffers, drivers and a timer which indicates the alarm to control room or respective contacts which is fed in GSM SIM card. 1.2 OBJECTIVE OF THE STUDY This project aims to develop a “Smart Self Defence Device” which helps us to track the location (latitude, longitude) through GPS, GSM, so that we can track the victim place. If the person is in danger then the concerned people of the device holder will be intimated by message. The objective of this device is to give safety to women. If the woman is danger then Police will come to know by using this device. It makes women they don‟t have to worry much. They will feel secure. The device need not to be used by women but also by aged people, child. This device will be useful to all generation people. There are few apps which do works like this. But most of them work on androids and need internet to work. But this device don‟t want internet. This device can be implemented in watches. If it is improvised then it can even use in military to pass emergency alert message to head quarters. Dept. of ISE, APSCE 2015-2016 1
  • 13. Smart Self Defense Device Safety and security are the important perspective to lead a happy life. But now a day it seems difficult to lead such a happy life. So we thought we should build something which is helpful to our society and come up with self-defences device. 1.3 EXISTING SYSTEMS a) Stun Gun: It has an electric shock giving state of art mechanism which can make the attacker confused and paralyzed for nearly half an hour. All one need to do is to press a button and touch its charged terminal against the attacker. As soon as the latest Taser gun is activated the attacker falls to the ground in shock and is unable to move. Disadvantages:  Victim will have to close enough to the attacker in order to touch them with their weapon.    When an attacker has larger gun or weapon the Stun gun could be rendered useless.   b) VithU: The VithU Android application lets a potential victim skip through the number- punching, and lets them push a power button twice to instantly send an SOS alert to contacts. Alert messages are sent out every two minutes to listed contacts, who will receive a message along with your physical location. Disadvantages:  Platform dependency.    Loss of flexibility.    Mandatory internet connection.  Dept. of ISE, APSCE 2015-2016 2
  • 14. Smart Self Defense Device 1.4 PROPOSED SOLUTION This System focuses on a security system that is designed solely to serve the purpose of providing security to citizens so that they never feel helpless while facing social challenges. The system consists of various modules such as GSM shield (SIM 900A), ARM7 board, GPS, screaming alarm, a set of pressure sensors for activation and power supply unit. By integrating a culturally-relevant educational curriculum (service) with a product (good) that is affordable and accessible, this innovation is helpful in saving women from harassment. In India lots of crimes happens against women every day. This device can readily solve this issue. These devices can be installed at small scale and we will try for further progress in the same. Lastly, our main aim to spread this project in the whole world that is large scale production. Advantages:  Women can go anywhere being more secure.    Avoids the women rape.    Culprits can be easily found and can be punished    Consumes less power.    Provides very accurate data via GPS system.    Allows the remote location of asset from anywhere there is cellular Service.    1.5 SCOPE OF THE STUDY The project can be further implemented to “Zapper” which is also known as “Beam Gun” in Japan. It is an electronic light gun which can also be used in defence purpose. Since there is always advancement in technology, with the invention of components used in our device like ARM controller into small size, the device can also be implemented in wrist watches and also other wearable. Additional features like voice recorder, Video and image capturing; conference call facilities can also be added in future. Dept. of ISE, APSCE 2015-2016 3
  • 15. Smart Self Defense Device 1.6 LIMITATION OF THE STUDY  The SIM card or base station may fail which stops the working of device.  Battery should be replaced periodically.  Sometimes attackers may damage the device before location is sent.  The designed device is only the prototype so it is bulky. 1.7 Organization of the Report This project report has been broadly divided into 9 chapters CHAPTER 1: Introduction This chapter gives introduction of the project, statement of the problem, objective of the project , scope of the project and also the limitations of the project. CHAPTER 2: Literature Survey This chapter gives an introduction to the work carried out previous to the development of the project and the explanation about general components used in the project. CHAPTER 3: Requirement Specification This chapter describes the hardware and software requirements. CHAPTER 4: Tools This chapter shows the tools used in the project. CHAPTER 5: Design and Analysis This chapter describes the architecture of the device. It also deals with the analysis of device. CHAPTER 6: Implementation This chapter the coding of the project in detail. Dept. of ISE, APSCE 2015-2016 4
  • 16. Smart Self Defense Device CHAPTER 7: Testing This chapter focuses on the testing of components. CHAPTER 8: Results and snapshots This chapter gives the results in the form of snapshots. CHAPTER 9: Conclusion This chapter gives the conclusion & future enhancement of the project. Appendix A: The abbreviations of acronyms used in the device are described here. Appendix B: This section contains detailed explanation about pin diagram of ARM7 LPC2148. Appendix C: This section contains detailed explanation about board details of ARM7 LPC2148. SUMMARY This chapter is summarized by saying that a prototype of a device has been designed for safety of people with feature like intimating the location. Dept. of ISE, APSCE 2015-2016 5
  • 17. Smart Self Defense Device CHAPTER 2 LITERATURE SURVEY According to the National Crime records Bureau, the total number of rape cases in India was a staggering 228,650 and Delhi, the national capital accounted for 5234 of those and in 2011 according to Ministry of Home Affairs, a total of 24193 cases were reported. This is just the tip of the iceberg. Rape is a notoriously under-reported crime, thanks to its social stigma. A woman is raped every 21 minutes in India and every 18 hrs in Delhi. It is shameful for the whole world. 1.5 million Heart attacks occur in the United States each year with 500,000 deaths. A heart attack occurs about every 20 seconds with a heart attack death about every minute. About 50% of deaths occur within one hour of the heart attack –outside a hospital. There is a only a 6% to 9% early mortality rate from a heart attack for those who survive long enough to reach the hospital. Getting to the hospital quickly is the goal. Deaths from cardiovascular diseases in women exceed the total number of deaths caused by the next 16 causes. Nearly 75% of all deaths in the United States are deaths of elderly people. For many decades, heart disease, cancer, and stroke have been the leading causes of death among the elderly, accounting for 70% of all deaths in this age group. Senior citizens age 70 and over have the greatest risk of fire death. The fire death risk among seniors is more than double the average population. 2.1 GENERAL COMPONENTS This topic deals with the study of components and general development environment related to derive all the activity intended towards our project. 1. RESISTORS : The components which offer value of resistance are known as resistors. There are two types of resistors available. They are: Dept. of ISE, APSCE 2015-2016 6
  • 18. Smart Self Defense Device  Linear resistors :- A resistor, in which current value is directly proportional to the applied voltage is known as linear resistors. There are two categories of linear resistors:  Fixed Resistors: Fixed resistor is a resistor which has a specific value and that value cannot be changed. A fixed resistor can be thin filmed, thick filmed, wire wound or carbon composition resistors. Figure 2.1: Fixed resistor  Variable Resistors: Variable resistors are the resistors whose values can be changed through a dial, knob, and screw or manually by a proper method. Figure 2.2: Variable resistor  Non-linear resistors :- Nonlinear resistors are those resistors, where the current flowing through it does not change according to Ohm‟s Law but, changes with change in temperature or applied voltage. Dept. of ISE, APSCE 2015-2016 7
  • 19. Smart Self Defense Device The widely used type of non-linear resistor is thermistor which is a two terminal device that notices the change in temperature. Example of a thermistor is bead thermistor.[5] Figure 2.3: Bead thermistor 2. CAPACITORS: Devices which can store electronic charge are called capacitors. Capacitance can be understood as the ability of a dielectric to store electric charges. Its unit is Farad, named after the Michael Faraday. The capacitors are named according to the dielectric used. Most common ones are air, paper, and mica, ceramic and electrolytic capacitors. [5] Capacitors provide us with a means of storing electrical energy in the form of an electric field. Capacitors have numerous applications including storage capacitors in power supplies, coupling of A.C. signals between the stages of an amplifier, and decoupling power supply rails so that, As far as A.C. signal components are concerned, the supply rails are indistinguishable from zero volts. Capacitors are of 2 types: -  Disk Capacitors   Electrolytic Capacitors. Dept. of ISE, APSCE 2015-2016 8
  • 20. Smart Self Defense Device  DISC CAPACITORS : Figure 2.4: Disc Capacitors In the disk form, silver is fired on to both sides of the ceramic to form the conductor plates. The sheets are then baked and cut to the appropriate shape and size & attached by pressure contact and soldering. These have high capacitance per unit volume and are very economical.  ELECTROLYTIC CAPACITORS : Figure 2.5: Electrolytic Capacitor These capacitors derive the name from electrolyte which is used as a medium to produce high dielectric constants. These capacitors have low value for large capacitances at low working voltages [5]. Dept. of ISE, APSCE 2015-2016 9
  • 21. Smart Self Defense Device 3. DIODES: Figure 2.6: Diode In the field of electronics too we have a valve called semiconductor diode (a counterpart of thermionic valve) for controlling the flow of electric current in one direction. But we use these diodes in circuits for limited purposes like converting AC to DC, by passing EMF etc.,[5] 4. RELAY: Figure 2.7: Relays A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. A type of relay that can handle the high power required to directly drive an electric motor is called a contactor. Solid-state relays control power circuits with no moving parts, instead using a semiconductor device to perform switching. [6] Dept. of ISE, APSCE 2015-2016 10
  • 22. Smart Self Defense Device 5. INTEGRATED CIRCUITS Figure 2.8: Integrated Circuit All modern digital systems rely on the use of integrated circuits in which hundreds of thousands of components are fabricated on a single chip of silicon. A relative measure of the number of individual semiconductor devices within the chip is given by referring to its „scale of integration‟.[5] 6. ARM CONTROLLER ARM is computer processor based RISC architecture. A RISC-based computer design approach means it requires significantly fewer transistors than typical processors in average computers. This approach reduces costs, heat and power use.[4] ARM processor features include:  Load/store architecture.    An orthogonal instruction set.    Mostly single-cycle execution.    A 16x32-bit register.  Figure 2.9: ARM LPC2148 Dept. of ISE, APSCE 2015-2016 11
  • 23. Smart Self Defense Device 7. VIBRATION MOTOR Vibration motor is a compact size coreless DC motor used to inform the users of receiving the signal by vibrating without no sound. Figure 2.10: Vibration Motor SUMMARY This chapter includes the motive of the project and some of the general components used in the project. Dept. of ISE, APSCE 2015-2016 12
  • 24. Smart Self Defense Device CHAPTER 3 SYSTEM REQUIREMENTS Requirement specification for a system is the description of services provided by the system and its operational constraints. Requirement will deal with the aspects that acts to be a very important phase in any project, using which project functionality will be decided upon. This chapter will deals with the topics related to the requirements of the project mainly like:  Hardware Requirements   Software Requirements  3.1 HARDWARE REQUIREMENTS:  Power supply unit: 12V 1.3 Ah battery.    Measurement of Respiration: Bead thermistor.    GPS module: GPS 250.    GSM Modem: MGSM900.    ARM processor: LPC2148.   3.2 SOFTWARE REQUIREMENTS:  Compiler: Keil C compiler uVision 3.    Language: Embedded C or Assembly.    Burning Software: Flash Magic (version 9.75).  SUMMARY This chapter included various requirements of the project – hardware and software requirements. Dept. of ISE, APSCE 2015-2016 13
  • 25. Smart Self Defense Device CHAPTER 4 TOOLS Just as there are a lot different types of embedded systems, their development tools, both hardware and software, also exists in similar quantity. We will discuss here tools for larger scale embedded systems that require an embedded operating system to function. The base of development is the source code for the operating system kernel and the actual application. In the case of open source software, kernel source and the majority of the development tools are provided free for development, as is the case with Embedded Linux. In proprietary software case like Microsoft Windows CE, kernel source and development tools are bought and licensed for limited use. There are some exceptions like Microsoft‟s DreamSpark and BizSpark projects which offer some of the Microsoft‟s proprietary development tools and software free of cost to students and start-up businesses, respectively. For embedded Linux development, the same kernel source as for the desktop computers is used. Linux kernel is downloaded from the official website, www.kernel.org, and then patched or configured for the target application and hardware. Such type of embedded development also requires a compatible host environment, usually the computer and the operating system running on that computer. Development can also be performed directly on the target hardware, if it is capable enough. While doing embedded development on desktop computer, developer can use an emulator, like QEMU (for Linux), to run the code on emulated target hardware. The second most important thing for embedded development is the compiler package or toolchain. GNU Toolchain is one of the most used and popular toolchain for embedded development. It is a collection of compilers (GNU Compiler Collection (GCC), formerly GNU C Compiler) and tools like “make”,”binutils”, debugger (“gdb”) and “build”. Not only the GNU Toolchain is used for open source software development, but also for proprietary software (i.e. closed source). GNU Toolchain needs itself to be compiled or “build” for the target hardware platform but pre-built ones are also available, like the Mentor Graphics‟ Sourcery G++ Lite (for Linux based development on ARM core hardware platform). An open source text and code editor, GNU Emacs is widely used for Linux based development. Dept. of ISE, APSCE 2015-2016 14
  • 26. Smart Self Defense Device In the case of Windows CE, development is done using the Windows CE Compiler. Microsoft offers an integrated development environment (IDE), known as Platform Builder, for development. All the necessary development tools also come with Platform Builder. Platform Builder is used for building the Windows CE kernel and the target hardware specific code package known as Board Support Package (BSP). Microsoft Visual Studio is also widely used for this purpose. There comes an important stage in embedded development which is creating the boot loader for the completed firmware to make it run on the target hardware. Boot loaders load important hardware specific configurations at system start-up and hand-over the control to the operating system. Developer can create boot loaders themselves from scratch but pre- developed alternatives are also present. “Das U-Boot” (Universal Boot loader), or simply called “Uboot”, is such a widely used open source boot loader. Hardware tools for embedded development include development or evaluation boards for specific processors and embedded architectures. Some famous ones are FriendlyARM‟s Mini2440, Pandaboard, Beagleboard and Craneboard. Development boards are of various types and are usually categorized as Computer on Module (CoM) and System-on-Chip (SoC). CoM is a complete embedded computer system with the core microprocessor, memory and all the peripherals present on a single board. On the other hand, SoC are small boards with just the microprocessor and memory (RAM and ROM). All the extra circuitry, peripherals, and power supply are present on another board, called Carrier board, on which the SoC board is mounted. SUMMARY This chapter gives a detailed explanation on the tools used in the project. Dept. of ISE, APSCE 2015-2016 15
  • 27. Smart Self Defense Device CHAPTER 5 DESIGN AND ANALYSIS 5.1 INTRODUCTION Analysis and design chapter consists of detailed design of the project both low level and high level. Main objective of this chapter is to analyse the requirements mentioned in the previous chapter and design the system which satisfies all the required specifications for implementation. 5.2 DESIGN AND ANALYSIS This hardware component mainly contains amplification process, rectification, GSM module and GPS module. Here the GPS and GSM section are important sections, which will send the longitude and latitude of the victim place. The LCD display used here will display the longitude and latitude on the receiver side. The vibrator sensor is an output of the two inputs sections that is respiration vibration and the sensitive vibration sectors. These are used during accident zones. It also consists of small tools like buffer, rectifiers, timer, registers and storage device capacitors. The GPS used in this has the capabilities such as maps, including streets maps which are displayed in human readable format via test or in a graphical format. It also tracks the nearby information and sends to the receiver end through the SIM. Dept. of ISE, APSCE 2015-2016 16
  • 28. Smart Self Defense Device Counter Buffer and Respirator Monostable Driver Multivibrator Vibration Motor Microcontroller Figure 5.1 Architecture This section deals with explanation of interfaces done in the device in terms of modules.  Interfaces   Interfaces Description   5.3 INTERFACES All the interfaces present in the present project has been discussed here:  Interfacing LCD with Microcontroller   Interfacing GPS with Microcontroller   Interfacing GSM with Microcontroller   Interfacing Buffer with Microcontroller Dept. of ISE, APSCE 2015-2016 17
  • 29. Smart Self Defense Device 5.4 INTERFACES DESCRIPTION  INTERFACING LCD WITH MICROCONTROLLER The pin configuration of LCD is as shown in figure Figure 5.2 : pin configuration of LCD  16x2 means 16 columns and 2 rows of alphanumeric ASCII blocks on the LCD. This LCD has 2 lines and can write maximum 16 letter word per line.It has three control signals and one databus.   R/W: When R/W =1 then it reads data from the LCD RAM.  When R/W =0 then it writes data on LCD RAM.  EN: Latch signal. It is first set to 1 and then to '0' signal with a particular delay to latch the data.  RS: Register Select Control signal. When this signal is '1' = It accepts data to be displayed. When this signal is '0' = It accepts instructions for the LCD like setting font, cursor position etc.  Dept. of ISE, APSCE 2015-2016 18
  • 30. Smart Self Defense Device  D0 to D7: It is the 8-bit Databus. It is used to send both data as well as Instructions to the LCD based upon control signals.   Backlight + and Backlight GND: Turns on Backlight of that LCD for visibility of Words to be displayed in the LCD.   VEE: is the contrast voltage. Using a trim pot, the contrast of the LCD can be adjusted. More the voltage more the contrast and vice versa(voltage should never exceed VCC = +5 volts).   The figure shows the interfacing of LCD Module with Microcontroller  Figure 5.3: Interfacing LPC2148 with LCD.  The LCD which is used in our project is a 8 segment display. LCD technology is constatly evolving, LCD todays employ several variation of liquid crystal technology, including super twisted nemactics and dual scan twisted nemactics. LCD can be interfaced with microcontroller in 4 bits or 8 bits mode these differ in how data is sent to the data line D0-D7 and data stobe given through E of the LCD. LCD commands which are also 8bits are written to LCD in similar way.  Dept. of ISE, APSCE 2015-2016 19
  • 31. Smart Self Defense Device  But, 4 bit user only has 4 data lines D4-D7 in these modes 8 bit characters ASCII data and command data are dived into two parts and send sequentially through data lines. The idea of 4bit communication is used to save pins in microcontoller. 4 bit communication is bit slower than 8 bit.    LCD cannot form multiple resolution images, the contract ratio for LCD images is lesser than CRT nad plasma display, so here in our project we made use of lcd as plasma display has a longer response time LCD show goast images and missing when images change.   The steps to display characters    E = 1   RS = 1   R/W = 0   The command to send to LCD  1. E = 1 2.RS = 0 3.R/W = 1  INTERFACING GPS WITH MICROCONTROLLER The latitude and longitude data is received from satellite to LPC2148 by using GPS module through UART0 port of Microcontroller. To communicate over UART, it must be interfaced. This interfacing is done using three basic signals which are namely, RXD (receive), TXD (transmit), GND (common ground). The figure shows the UART interfacing with Microcontroller Dept. of ISE, APSCE 2015-2016 20
  • 32. Smart Self Defense Device Figure 5.4: UART Interfacing The GPS satellites transmits signals to GPS receiver these receivers passively receives satellites‟ signals they do not transmit each GPS satellites transmits data that indicates its location and the current time. The time log is easily converted into distance to each satellite. The slight difference between signals from each satellite is then used to calculate receiver‟s positions. The serial data is taken from the GPS module through MAX232 into the SBUF register of LPC2148 microcontroller. The data from the GPS receiver is taken by using the serial interrupt of the controller. The first six bytes of the data received are compared with the pre stored string and if matched then only data is further accounted. The pin assignment of UART in microcontroller is as shown in below table UART DB-9 LPC2148 Connector Processor Lines TXD-0 P0.0 UART0(P1) ISP RXD- 0 P0.1PGM Table 5.1: Pin Assignment of UART After interfacing the UART Port the GPS module is interfaced to UART Port. The figure shows the interfacing of GPS module to UART0 port. Dept. of ISE, APSCE 2015-2016 21
  • 33. Smart Self Defense Device Figure 5.5: GPS Interfacing GPS will track her victim location and stores in a buffer connected in the module. Here the GSM will mainly send the collected information like latitude and longitude from the GPS and sends the information to the receiver and through SIM by sending it to base station. Then we are connected the GPS module to the pin number of the micro controller 16, then with the help of the flash magic burner the coed which is loaded by using embedded C will be burnt and are given to the microcontroller. GPS can also trace her number, longitude and latitude of the victim by using the network base stations.  INTERFACING GSM MODULE The GSM module to communicate the microcontroller with mobile phones through UART. To communicate over UART or USART, we just need three basic signals which are namely, RXD (receive), TXD (transmit), GND (common ground). Text message may be sent through the modem by interfacing only three signals of the serial interface of modem with microcontroller i.e., TxD, RxD and GND. In this scheme RTS and CTS signals of serial port interface of GSM Modem are connected with each other. Dept. of ISE, APSCE 2015-2016 22
  • 34. Smart Self Defense Device The transmit signal of serial port of microcontroller is connected with transmit signal (TxD) of the serial interface of GSM Modem while receive signal of microcontroller serial port is connected with receive signal (RxD) of serial interface of GSM Modem. The SMS message in text mode can contain only 140 characters at the most. It depends upon the amount of information collected from GPS Engine that you need at the base station for tracking vehicle or person. Figure 5.6: UART Interfacing Display a text in mobile from LPC2148 kit by using GSM module through UART. All LPC2148 kit contains two serial interfaces that are UART0 & UART1. Here we are using UART0. We can use UART0 for programming kit also and interfacing GSM module also. Dept. of ISE, APSCE 2015-2016 23
  • 35. Smart Self Defense Device The pin assignment of UART in microcontroller is as shown in below table UART DB-9 LPC2148 Connector Processor Lines UART1 (P2) TXD-1 P0.8 RXD-1 P0.9 Table 5.7: Pin Assignment of UART After interfacing the UART Port the GPS module is interfaced to UART Port.The figure shows the interfacing of GPS module to UART0 port. Figure 5.7: GSM Interfacing GSM is a digital mobile telephony system. GSM digitizes and compresses data,then sends it down a channel with two other streams of user data, each in its own time slot. It operates at either the 900MHz.Here we have shown hoe to interface the GSM with microcontroller. SUMMARY This chapter includes the interfacing of the hardware components in detail. Dept. of ISE, APSCE 2015-2016 24
  • 36. Smart Self Defense Device CHAPTER 6 IMPLEMENTATION This chapter deals with the implementation details of the project and it also provides the important modules code and snippets related to the modules. 6.1 GPS MODULE To get_lat_and_lon Input: if the device is active and get the respiratory reading Output: display the current langitude and latitude 1. initialize unsigned char get_lat_and_lon function(char *buf, char *lat, char *lon) 2. initialize unsigned char retval to 0 3. initialize unsigned short i to 0 for(i = 0; i < strlen(buf); i++) { if(buf[i] == '$') true if(!strncmp("$GPGGA", &buf[i],strlen("$GPGGA"))) true strncpy(lat, &buf[i+LAT_INDEX], 9) // Read Latitude strncpy(lon, &buf[i+LON_INDEX], 10) // Read Latitude Dept. of ISE, APSCE 2015-2016 25
  • 37. Smart Self Defense Device retval is 1 break }return retval; Here before starting the program we shoud first insert and initialize the lcd pins and a microcontroller void command() // CONTROL BITS FOR LCD { rs = 0; // register select is 0 to make data initialize rw = 0; // read and write will be make to 0 for insrting data e = 1; // enabling data to 1 needs the data to accept e = 0; } void datawrt() // CONTROL BITS FOR LCD { rs = 1; // registers select will be made 1 for accepting data rw = 0; // read and write section will be enabled Dept. of ISE, APSCE 2015-2016 26
  • 38. Smart Self Defense Device e = 1; //enabling data to 1 for accepting e = 0; } void delay() { unsigned int i; for ( i = 0; i < 6000 ; i++ ) } void main() { unsigned char temp, temp1; displayset(); while(1) { temp = port2; temp1 = port0; if ( temp == 0xfe ) // temp will be given to connection as to 15 pins display1(); Dept. of ISE, APSCE 2015-2016 27
  • 39. Smart Self Defense Device else if ( temp == 0xfd ) // if the temp is given to last pins no output given display2(); else if ( temp == 0xfb ) // temp is next initialized to pin 14 display3(); } } now the program for displaying the sets by connecting it to microcontroller { port3 = 0x00; // initializing the ports of lccd port1 = 0x00; // initializing the pins to 00 port1 = 0x38; // clearing the data command(); delay(); port1 = 0x0e; //initializing the pins to lcd pins command(); Dept. of ISE, APSCE 2015-2016 28
  • 40. Smart Self Defense Device delay(); port1 = 0x01; // clearing the screen command(); delay(); port1 = 0x80; // clearing the lcd display data command(); delay(); port1 = 0x06; //storing output of lcd command(); delay(); // delay time given to the lcd display } 6.2 GSM Module To send_gps_coordinates Input: get the langitude and latitude value from the GPS Output: the current langitude and latitude,message sending and message sent void send_gps_coordinates(void) Dept. of ISE, APSCE 2015-2016 29
  • 41. Smart Self Defense Device { clear the lcd display LINE1,"GPS READING... " in lcd flush_buffer(UART1) while(!get_lat_and_lon((char*)UART1Buffer,&lat_buf[4], &lon_buf[4])) UARTSend(UART0,lat_buf, 13) UARTSend(UART0,lon_buf, 14) print lat_buf , lon_buf clear the lcd lcd_putstring(LINE1,lat_buf) // function used to insert the string lcd_putstring(LINE2,lon_buf) // function used to add string with buffer ang ongitude set the delay to 2000000 clear the lcd lcd_putstring(LINE1," message…") // function for displaying messages lcd_putstring(LINE2," sending…") // function used to send the messages send_msg to PH_NUM // send the message to the number given Dept. of ISE, APSCE 2015-2016 30
  • 42. Smart Self Defense Device set the delay to 2000000 // delaying function sets send_msg to PH_NUM1 // sending message to phone numbers set the delay to 2000000. //delays the time to display clear the lcd // clears the lcd display data lcd_putstring(LINE1," Message ") // putstring the data to the message lcd_putstring(LINE2," Delevered. ") // add the strings to the delevered data s_memset(msg_out, 0, sizeof(msg_out)) // setting the strings to message out default_msg_on_lcd() // messages to lcd } 6.3 LCD Module To display msg in LCD is input: get the longitude and latitude value from the GPS Dept. of ISE, APSCE 2015-2016 31
  • 43. Smart Self Defense Device output: the current longitude and latitude, message sending and message sent will be displayed void main() { P0=0xff; P1=0xff; P3=0xff; delay_50ms(4); initial_lcd(); write_lcd(0x80,0); string_to_lcd(” msg is sending to sim “); write_lcd(0xc0,0); string_to_lcd(“msg is sending to sim1”); } SUMMARY This chapter includes a detailed explanation of the implementation of our project. Dept. of ISE, APSCE 2015-2016 32
  • 44. Smart Self Defense Device CHAPTER 7 TESTING System testing is the stage of implementation, which aimed at ensuring that the system works accurately and effectively before the live operation commences. Testing is the process of executing a program with the intent of finding an error. A good test case is one that has a high probability of finding the undiscovered error. Testing is vital to the success of the system. System Testing makes a good logical assumption that if all parts of the system are correct, the goal will be successfully achieved. Any engineered product can be tested in one of the following ways. Knowing the specified function that a product has been designed from and the test can be conducted to demonstrate each function is fully operational. Knowing the internal working of a product, tests can be conducted to ensure that all gears mesh,that is the internal components have been adequately exercised. The spiral model is the software evolutionary model is an iterative processing, controlling and prototyping aspects of the modules present in the system. 7.1 UNIT TESTING Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. a) Testing GSM/GPRS Modem Using Hyper terminal in PC:  GSM/GPRS RS232 MODEM-SIM900 modem is connected directly to the PC through serial port, without any need of any interfacing modules.   If serial port is not there in the PC, USB To Adapter can be used for this purpose.   Once the connection is done, appropriate COM port that got assigned to the Communication Port in the computer system is checked by looking into the device manager. Dept. of ISE, APSCE 2015-2016 33
  • 45. Smart Self Defense Device b) Testing To Check Whether 16x2 LCD Working or Not:  Connect the pin VCC pin to 5v   Connect pin VEE and GND pin to ground   Connect LED+ to 5v   Connect LED- pin to ground   If LCD is not working well, then both the lines will be bright .If its working properly then only the lower line will be brighten.    c) Testing the GPS with LPC2148:  Give +3.3V power supply to LPC2148 Primer Board, connect +5V adapter with GPS module is connected with the LPC2148 Primer Board. Open the Hyper Terminal screen, select which port are using and set the default settings. Now the screen should show some text messages.   If no reading any data from UART0, then just check the jumper connections & just check the serial cable is working. Otherwise, just check the code with debugging mode in Keil. SUMMARY This chapter gives a detailed explanation on unit testing performed. Dept. of ISE, APSCE 2015-2016 34
  • 46. Smart Self Defense Device CHAPTER 8 RESULTS AND SNAPSHOTS Figure 8.1: Blow count Indicator In this snapshot we have shown an led which will act as an input to the device, here we will correct and analyses the input given .Till the vibrators stops its activity the led will not display anything. The bead thermistor is also connected to the indicator that indicates the blow count.As soon as the vibration stops, the input to the LED is given by the respiration sensor giver directly as an input to the device. Here we have to blow 6 times, as the time limit is given as 1500s, as soon as the blow reaches 6, the led will stop blinking and displays its output by showing the red light at the end. Dept. of ISE, APSCE 2015-2016 35
  • 47. Smart Self Defense Device Figure 8.2: Post and Pre amplifier circuit It will get the input from the respiratory mike. If that is not strong enough then amplifier circuit is needed. If the input is strong without this circuit also device do work. In this circuit strenthing of weak input takes place. This module consists of 2 phases: One is an input phase and another phase is the amplification phase which can be preamplification or post amplification. The user provides the input (blown air) through the bead thermistor. The respiratory rate is determined by variation in temperature of each blow count. The input is then subjected to amplification depending on the strength of the input. If the intensity of the air is high, then it is directly sent to the post amplifier, else it is strengthened by using the Preamplifier circuit and the strengthened input is sent to the post amplifier circuit for further processing. Dept. of ISE, APSCE 2015-2016 36
  • 48. Smart Self Defense Device Figure 8.3: Buffer and Driver Circuit with the vibration motor Here in our project we made use of buffer to store all the information from GPS and GSM , this buffer id directly connected to the microcontroller using the pins of the data sheet which are 14 and 12. this buffer acts similarly to capacitor that which stores the energy and gives back when it is necessary. This buffer will stores and sends the information stored back when ever it s necessary to the microcontroller and device. We also make use a vibrator motor which will vibrates when the input is directly given from the respiration sensor. This vibration motor will starts when the threshold level cross and it will stop when the button given is pressed off. The buffer circuit provides interfacing with the Microcontroller and the controlling circuitry and is also used to regularise the logic present at an interface. Driver relay circuit is used to control AC loads or high voltage loads. These circuits provide isolation between microcontrollers circuits and high voltage operating loads. The buffer used in this project is CD4050B and the IC used for constructing relay driver circuit is UL2003 since it provides high voltage and high current using Darlington array. The driver circuit drives the vibration motor which runs till 10000 ms to ensure whether the device holder is in danger or not. Dept. of ISE, APSCE 2015-2016 37
  • 49. Smart Self Defense Device Figure 8.4: GPS 65 Module The data from the GPS receiver is taken by using the serial interrupt of the controller. The first six bytes of the data received are compared with the pre stored string and if matched then only data is further accounted. Here the GPS satellites transmits signals to GPS receiver these receivers passively receives satellites signals they do not transmit each GPS satellites transmits data that indicates its location and the current time. Figure 8.5: GSM MGSM900 Modem Here the GSM module in integrated with the micro controller by using the language embeddded c. Once the coordinates are tracked, a sms consisting of the latitude and longitude is sent to the intended contacts that are stored in the device prior use. Dept. of ISE, APSCE 2015-2016 38
  • 50. Smart Self Defense Device Figure 8.6: Indicator Module The indicator circuit provides visual indication of which module is being working at that point of time.It consists of : Input indicator which glows for the input blow count greater than 6. Vibration indicator whose LED glows while the vibration motor runs. Reset indicator which glows when the memory of microcontroller is being cleared.GPS indicator which glows when the GPS system is turned on. This above indicator module will tells us weather the input given is proper or not . If the input given is proper then the circuit which contain a green LED bulb will blink, if the input is not proper then the circuit with red led light will blink. If the input is proper then the data are sent to the other modules to execute. Dept. of ISE, APSCE 2015-2016 39
  • 51. Smart Self Defense Device Figure 8.7: LCD Display Here at the sending side we can see that latitude and longitude ca be displayed and the same information can be displayed at the receiving end. The LCD is also interfaced to the micro controller to display the longitude of the victim. Dept. of ISE, APSCE 2015-2016 40
  • 52. Smart Self Defense Device CHAPTER 9 CONCLUSION AND FUTURE SCOPE 9.1 CONCLUSION The proposed design will deal with critical issues faced by women in the near past and will help to solve them with technologically sound equipment and ideas. This system can overcome the fear that scares every woman in the country about her safety and security. When our project is implemented it will have high impact on our society from small kid who travels to school alone these days to aged people whose health condition drops un expectedly. Keeping this in mind safety of citizen at present and in future, this is mainly developed for individual who travel long distance all alone. This device after implemented with features that was done with our efforts can be extended to have a conference call, a voice recorder stores frequently visited location by the user in it etc. using the arm controllers that contains extendible ports. Since there is always advancement in technology, the device can also be embedded into wrist watches and also other wearable with the invention of components used in our device like ARM controller in considerable size after which the watch can serve for multiple purposes. 9.2 FUTURE SCOPE  This project can be further implement zapper (The Zapper, also known as The Gun or Beam Gun in Japan, is an electronic light gun. This can be used for the defense purpose.   Since there is always advancement in technology, the device can also be embedded into wrist watches and also other wearable with the invention of components used in our device like ARM controller in considerable size after which the watch can serve for multiple purposes.   This can be even used in home for the security purpose. If person lives alone in a house then they can use this device. Dept. of ISE, APSCE 2015-2016 41
  • 53. Smart Self Defense Device REFERENCES [1] "ARM7DI Data Sheet"; Document Number ARM DDI 0027D; Issued: Dec 1994. [2] "ARM co-founder John Biggs". Engadget. Retrieved December 23, 2011. ",." [3] "D-Link DSL-604+ Wireless ADSL Router - Supportforum - eXpansys Sverige". 090506 expansys.se [4] Electronic Communication Systems – ARM Architecture Reference Manual,George Kennedy [5] “Electronics in Industry” - George M.Chute [6] http://www.instructables.com/id/All-You-Need-to-Know-About-Relays/ [7]http://electronics.stackexchange.com/questions/109858/how-does-a-pre-amplifier-work- and-why-is-it-needed [8] http://microcontrollerslab.com/relay-driver-circuit-using-uln2003/ [9] http://www.microcontroller-project.com/16x2-lcd-working.html [10] http://embeddedlifehelp.blogspot.in/2012/03/16x2-lcd-programming-for- beginners-made.html?m=1 [11] https://www.pantechsolutions.net/project-kits/interfacing-uart-with-arm7-friendly [12]https://www.pantechsolutions.net/microcontroller-boards/uart-interfacing-with-lpc2148- arm7-primer [13] "On MicroSD Problems". Bunnie Studios. Andrew (bunnie) Huang. [14] “Principles of Electronics” - V.K.Mehta [15] “SID: Ship Intrusion Detection with Wireless Sensor Networks” International Conference on Distributed Computing Systems. [16] “Telecommunication Switching, Traffic and Networks” – J.E.Flood Hanjiang Luo, Kaishun Wu, Zhongwen Guo, Lin Gu, Zhong Yang and Lionel M. Dept. of ISE, APSCE 2015-2016 42
  • 54. Smart Self Defense Device APPENDIX A A.1 ACRONYM AND ABBREVATIONS Acronym Abbreviation GPS Global Positioning System GSM Global System for Mobile LCD Liquid Crystal Display ARM Advanced RISC Machine LPC Linear Programming Control RISC Reduce Instruction Set Computer UART Universal asynchronous Receiver/Transmitter LED Light Emitting Diode Dept. of ISE, APSCE 2015-2016 43
  • 55. Smart Self Defense Device APPENDIX B B.1 MICROCONTROLLER ARM7 LPC2148 The pin diagram of the LPC2148 microcontroller is show in the Figure A.1. Figure B.1: Pin diagram of ARM & LPC 2148 Dept. of ISE, APSCE 2015-2016 44
  • 56. Smart Self Defense Device The LPC2148 microcontroller has 2 ports and each port comprises of 32 pins. So in total the microcontroller has 64 pins. B.1.1 MEMORY : LPC2148 has 32kB on chip SRAM and 512 kB on chip FLASH memory. It has inbuilt support up to 2kB end point USB RAM also. This huge amount of memory is well suited for almost all the applications. The basic functions of above memory.  On chip FLASH memory system: The LPC2148 incorporates a 512 kB Flash memory system. This memory may be used for both code and data storage. The FLASH memory can be programmed by means of 1. Serialbuilt-in JTAG interface 2. Using In System Programming (ISP) and UART0or 3. By means of InApplication Programming (IAP) capabilities. The application program, using the IAP functions, may also erase and/or program the Flash while the application is running, allowing a great degree of flexibility for data storage field firmware upgrades, etc. When the LPC2148 on-chip boot loader is used, 500 kB of Flash memory is available for user code. The LPC2148 Flash memory provides minimum of 100,000 erase/write cycles and 20 years of data-retention.  On chip SRAM: The LPC2148 provides 32 kB of static RAM which may be used for code and/or data storage. It may be accessed as 8-bits, 16-bits, and 32-bits. B.1.2 I/O PORTS:  LPC 2148 has two I/O Ports each of 32 bit wide giving us total 64 I/O Pins. Ports are named as P0 and P1. Dept. of ISE, APSCE 2015-2016 45
  • 57. Smart Self Defense Device  Pins of each port are labelled as PX.Y where X stands for port number, 0 or 1 where else Y stands for pin number 0 to 31.   Each pin can perform alternate functions also. For eg. P0.8 serves as GPIO as well as transmitter pin of UART1, PWM4 and AD1.1.   On RESET, each pin is configured as GPIO. For any of the other use, programmer must configure it properly. PORT TYPE DESCRIPTION PINS P0.0-P0.31 Input/output General purpose input/output. The number of GPIOs P1.16-P1.31 actually available depends on the use of alternate functions. Table B.1: I/O Ports Pins  PORT 0 is a 32-bit I/O port with individual direction controls for each bit. Total of 28 pins of the Port 0 can be used as a general purpose bi-directional digital I/Os while P0.31 provides digital output functions only. The operation of port 0 pins depends upon the pin function selected via the pin connect block. Pins P0.24, P0.26 and P0.27 are not available.   PORT 1 is a 32-bit bi-directional I/O port with individual direction controls for each bit. The operation of port 1 pins depends upon the pin function selected via the pin connect block. Pins 0 through 15 of port 1 are not available.   PORT0 and PORT1 are controlled via two groups of registers explained below.   IOPIN: This is GPIO Port Pin value register. The Current State of the GPIO configured port pins can always be read from this register, regardless of pin direction.  IODIR: This is GPIO Port Direction control register. This register individually Controls the direction of each Port Pin. Dept. of ISE, APSCE 2015-2016 46
  • 58. Smart Self Defense Device  IOCLR: This is GPIO Port Output Clear registers. This register controls the state of output pins. Writing ones produces lows at the corresponding port pins and clears the corresponding bits in the IOSET register. Writing zeroes has no effect.  IOSET: This is GPIO Port Output Set registers. This register controls the state of output pins in conjunction with the IOCLR register. Writing ones produces highs at the corresponding port pins. Writing zeroes has no effect. These are the set of register used to configure I/O Pins. Now let‟s move to individual registers in deep.  IOSEL0: Port 0 has 32 pins (P0.0 to P0.31). Each pin can have multiple functions. On RESET, all pins are configured as GPIO pins. However we can re-configure using the registers IOSEL0 and IOSEL1. IOSEL0 is used to select function of P0.0 to P0.15. Each pin has up to 4 functions so 2 bits/pin in IOSEL0 is provided for selecting function. 00 Function 0 (Default Function= GPIO) 01 Function 1 10 Function 2 11 Function 3 Table B.2 : IOSEL0 bit values Dept. of ISE, APSCE 2015-2016 47
  • 59. Smart Self Defense Device  IOSEL1: IOSEL1 is used to select function of Pins P0.16 to P0.31  IOSEL2: IOSEL2 is used to select function of Pins P1.16 to P1.31  IO0DIR: IO0DIR is used to configure pins of Port 0-P0 as input or output pins. 1=Output Pin 0= Input Pin  IO1DIR: IO1DIR is used to configure pins of Port 1-P1 as input or output pins. 1=Output Pin 0= Input Pin  IO0SET: It is used to set pins of Port0-P0 to logic 1.  IO0CLR : It is used to set pins of Port0-P0 to logic 0.  IO1SET : It is used to set pins of Port1-P1 to logic 1.  IO1CLR : It is used to set pins of Port1-P1 to logic 0. Dept. of ISE, APSCE 2015-2016 48
  • 60. Smart Self Defense Device APPENDIX C C.1 LPC2148 ARM7 BOARD Features 2148 DEV Board-LPC214X is a evaluation board for LPC2148 ARM7 based microcontroller. The LPC2148 microcontroller has 512KB of internal flash and 32+8K RAM. Figure C.1: ARM 7 Board Following are the salient features of the board.  Dimensions: 160 X 160mm2layer PCB (FR-4 material)   Power supply: DC 9-12V with power LED   linear regulators generate +3.3V/500mA and +5v/500mA from power supply   USB connector ( as alternate power source).   8 Led Array   INT keys   Extension headers for all microcontroller pins.connectors (2). Dept. of ISE, APSCE 2015-2016 49
  • 61. Smart Self Defense Device  RS232 connectors (2).   JTAG connector.   SD/MMC connector.   USB B-type connector with Link-LED.   All peripheral configurable via jumpers.   I2C based EEPROM.   Line X 16 character LCD with back light control.   RDY to Interface 128X64 GRAPHICAL DISPLAY - Optional Dept. of ISE, APSCE 2015-2016 50