safe alert1
TRANSCRIPT
-
7/30/2019 Safe Alert1
1/12
Safe Alert
ABSTRACT
With the rising power of technology, we are able to accomplish things at a much
quicker rate. Not only has technology given us more information, but it also has
given us the ability to communicate, organize, and manage our time.
With the ever increasing cases of robbery, we require systems that are quick to act
and send immediate alert to the responsible person. Most of such cases occur
when the owner or any care taker of the particular place is away; he is caught
unawares and cannot perform the necessary action.
We have designed such a system that alerts the user of any such action by an
intruder, even an attempt at breaking a safe will be alerted to the user and the user
can take the specific action necessary, like calling up the nearest police station or
intimating his security guard, whatever seems appropriate.
Safe Alert is a system designed to detect intrusion unauthorized entry into a
particular area. Safe Alert is used in residential, commercial, industrial, and
military properties for protection against burglary as well as personal protection
against intruders.
1
-
7/30/2019 Safe Alert1
2/12
TABLE OF CONTENTS
1. Introduction ...............................................................................................6
2. Block Diagram..10
3. Hardware Used.11
3.1. Piezo Electric Sensor11
3.2. Arduino Microcontroller...12
3.3. Bluetooth Module..13
4. Circuit Interface15
5. Software ...17
5.1. Eclipse..17
6. Arduino Code.19
7. Eclipse Interface.20
8. Eclipse Code...26
9. References...31
2
-
7/30/2019 Safe Alert1
3/12
1. Introduction
Having a safe alert system is a preventative measure against burglaries and also a
warning and alert system so that when or if a burglary should occur, response is
immediate. Essentially a safe alert is there to protect your property, yourself and
your family.
A good safe alert should be there as an early warning system that someone is on
your property uninvited, whether you are home or away. You should expect your
alert to reliably go off once someone tries to enter your property illegally. A good
alert system should never be able to be unplugged at the wall socket; rather a
wireless or radio system is best. For a more effective response to your alert it is
best to have your alert system connected to a response team. When your alert is
triggered this response team is immediately alerted and they can come to your
property to investigate.
The Various Sensors used for the alert system are:
Passive infrared detectors
The passive infrared (PIR) motion detector is one of the most common sensors
found in household and small business environments. It offers affordable and
reliable functionality. The term passive refers to the fact that the detector does not
generate or radiate its own energy; it works entirely by detecting the heat energy
given off by other objects.
Ultrasonic detectors
Using frequencies between 15 kHz and 75 kHz, these active detectors transmit
ultrasonic sound waves that are inaudible to humans. The Doppler shift principle
is the underlying method of operation, in which a change in frequency is detected
due to object motion. This is caused when a moving object changes the frequency
of sound waves around it.
Microwave detectors
This device emits microwaves from a transmitter and detects any reflected
microwaves or reduction in beam intensity using a receiver. The transmitter and
receiver are usually combined inside a single housing (monostatic) for indoor
applications, and separate housings (bistatic) for outdoor applications. To reduce
false alarms this type of detector is usually combined with a passive infrared
detector or "Dualtec" alarm.
3
-
7/30/2019 Safe Alert1
4/12
Photo-electric beams
Photoelectric beam systems detect the presence of an intruder by transmitting
visible or infrared light beams across an area, where these beams may be
obstructed. To improve the detection surface area, the beams are often employed
in stacks of two or more. However, if an intruder is aware of the technology's
presence, it can be avoided. The technology can be an effective long-range
detection system, if installed in stacks of three or more where the transmitters and
receivers are staggered to create a fence-like barrier. Systems are available for
both internal and external applications.
Glass break detection
The glass break detector may be used for internal perimeter building protection.
Glass break acoustic detectors are mounted in close proximity to the glass panesand listen for sound frequencies associated with glass breaking.
Smoke, heat, and carbon monoxide detectors
Most systems may also be equipped with smoke, heat, and/or carbon monoxide
detectors. These are also known as 24 hour zones (which are on at all times).
Smoke detectors and heat detectors protect from the risk of fire and carbon
monoxide detectors protect from the risk of carbon monoxide. Although an
intruder alarm panel may also have these detectors connected, it may not meet all
the local fire code requirements of a fire alarm system.
Vibration (shaker) or inertia sensors
These devices are mounted on barriers and are used primarily to detect an attack
on the structure itself. The technology relies on an unstable mechanical
configuration that forms part of the electrical circuit. When movement or
vibration occurs, the unstable portion of the circuit moves and breaks the current
flow, which produces an alarm. The technology of the devices varies and can be
sensitive to different levels of vibration. The medium transmitting the vibrationmust be correctly selected for the specific sensor as they are best suited to
different types of structures and configurations.
Passive magnetic field detection
This buried security system is based on the Magnetic Anomaly Detection
principle of operation. The system uses an electromagnetic field generator
powered by two wires running in parallel. Both wires run along the perimeter and
are usually installed about 5 inches apart on top of a wall or about 12"/30 cm
below ground. The wires are connected to a signal processor which analyzes anychange in the magnetic field.
4
-
7/30/2019 Safe Alert1
5/12
E-field
This proximity system can be installed on building perimeters, fences, and walls.
It also has the ability to be installed free standing on dedicated poles. The system
uses an electromagnetic field generator powering one wire, with another sensing
wire running parallel to it.
Microwave barriers
The operation of a microwave barrier is very simple. This type of device produces
an electromagnetic beam using high frequency waves that pass from the
transmitter to the receiver, creating an invisible but sensitive wall of protection.
When the receiver detects a difference of condition within the beam (and hence a
possible intrusion), the system begins a detailed analysis of the situation. If the
system considers the signal a real intrusion, it provides an alarm signal that can be
treated in analog or digital form.
Microphonic systems
Microphonic based systems vary in design but each is generally based on the
detection of an intruder attempting to cut or climb over a chainwire fence. Usually
the microphonic detection systems are installed as sensor cables attached to rigid
chainwire fences, however some specialised versions of these systems can also be
installed as buried systems underground. Depending on the version selected, it can
be sensitive to different levels of noise or vibration. The system is based on
coaxial or electro-magnetic sensor cable with the controller having the ability to
differentiate between signals from the cable or chainwire being cut, an intruderclimbing the fence, or bad weather conditions.
Taut wire fence systems
A taut wire perimeter security system is basically an independent screen of
tensioned tripwires usually mounted on a fence or wall. Alternatively, the screen
can be made so thick that there is no need for a supporting chainwire fence. These
systems are designed to detect any physical attempt to penetrate the barrier. Taut
wire systems can operate with a variety of switches or detectors that sense
movement at each end of the tensioned wires
Fibre optic cable
A fibre-optic cable can be used to detect intruders by measuring the difference in
the amount of light sent through the fibre core. If the cable is disturbed, light will
'leak' out and the receiver unit will detect a difference in the amount of light
received. The cable can be attached directly to a chainwire fence or bonded into a
barbed steel tape that is used to protect the tops of walls and fences. This type of
barbed tape provides a good physical deterrent as well as giving an immediate
alarm if the tape is cut or severely distorted. Other types work on the detection of
change in polarization which is caused by fiber position change.
5
-
7/30/2019 Safe Alert1
6/12
H-field
This system employs an electro-magnetic field disturbance principle based on two
unshielded (or 'leaky') coaxial cables buried about 1015 cm deep and located at
about 1 metre apart. The transmitter emits continuous Radio Frequency (RF)
energy along one cable and the energy is received by the other cable. When the
change in field strength weakens due to the presence of an object and reaches a
pre-set lower threshold, an alarm condition is generated.
Piezoelectric sensor
A piezoelectric sensor is a device that uses the piezoelectric effect to measure
pressure, acceleration, strain or force by converting them to an electrical charge.
6
-
7/30/2019 Safe Alert1
7/12
Block Diagram
7
-
7/30/2019 Safe Alert1
8/12
HARDWARE USED
Piezoelectric sensor
The Piezoelectric effect is an effect in which energy is converted between
mechanical and electrical forms. It was discovered in the 1880's by the Curie
brothers. Specifically, when a pressure (piezo means pressure in Greek) is applied
to a polarized crystal, the resulting mechanical deformation results in an electrical
charge. Piezoelectric microphones serve as a good example of this phenomenon.
Microphones turn an acoustical pressure into a voltage. Alternatively, when an
electrical charge is applied to a polarized crystal, the crystal undergoes a
mechanical deformation which can in turn create an acoustical pressure. An
example of this can be seen in piezoelectric speakers. (These are the cause of
those annoying system beeps that are all too common in today's computers).
Electrets are solids which have a permanent electrical polarization. (These are
basically the electrical analogs of magnets, which exhibit a permanent magnetic
polarization). In general, the alignment of the internal electric dipoles would result
in a charge which would be observable on the surface of the solid. In practice, this
small charge is quickly dissipated by free charges from the surrounding
atmosphere which are attracted by the surface charges. Electrets are commonly
used in microphones.
Permanent polarization as in the case of the electrets is also observed in crystals.
In these structures, each cell of the crystal has an electric dipole, and the cells areoriented such that the electric dipoles are aligned. Again, this results in excess
surface charge which attracts free charges from the surrounding atmosphere
making the crystal electrically neutral. If a sufficient force is applied to the
piezoelectric crystal, a deformation will take place. This deformation disrupts the
orientation of the electrical dipoles and creates a situation in which the charge is
not completely canceled. This results in a temporary excess of surface charge,
which subsequently is manifested as a voltage which is developed across the
crystal.
In order to utilize this physical principle to make a sensor to measure force, we
must be able to measure the surface charge on the crystal. Two metal plates areused to sandwich the crystal making a capacitor. As mentioned previously, an
external force cause a deformation of the crystal results in a charge which is a
function of the applied force. In its operating region, a greater force will result in
more surface charge. This charge results in a voltage , where is the
charge resulting from a force f, and Cis the capacitance of the device.
In the manner described above, piezoelectric crystals act as transducers which turn
force, or mechanical stress into electrical charge which in turn can be converted
into a voltage. Alternatively, if one was to apply a voltage to the plates of the
system described above, the resultant electric field would cause the internalelectric dipoles to re-align which would cause a deformation of the material. An
8
-
7/30/2019 Safe Alert1
9/12
example of this is the fact that piezoelectric transducers find use both as speakers
(voltage to mechanical) and microphones (mechanical to electrical).
Arduino Microcontroller
Arduino is a single-board microcontroller designed to make the process of using
electronics in multidisciplinary projects more accessible. The hardware consists of
a simple open source hardware board designed around an 8-bit Atmel AVRmicrocontroller, though a new model has been designed around a 32-bit Atmel
ARM. The software consists of a standard programming language compiler and a
boot loader that executes on the microcontroller.
Arduino boards can be purchased pre-assembled or do-it-yourself kits. Hardware
design information is available for those who would like to assemble an Arduino
by hand. It was estimated in mid-2011 that over 300,000 official Arduinos had
been commercially produced at that point.
An Arduino board consists of an Atmel 8-bit AVR microcontroller with
complementary components to facilitate programming and incorporation into
other circuits. An important aspect of the Arduino is the standard way that
connectors are exposed, allowing the CPU board to be connected to a variety of
interchangeable add-on modules known as shields. Some shields communicate
with the Arduino board directly over various pins, but many shields are
individually addressable via an IC serial bus, allowing many shields to be stacked
and used in parallel. Official Arduinos have used the megaAVR series of chips,
specifically the ATmega8, ATmega168, ATmega328, ATmega1280, and
ATmega2560. A handful of other processors have been used by Arduino
compatibles. Most boards include a 5 volt linear regulator and a 16 MHz crystal
oscillator (or ceramic resonator in some variants), although some designs such asthe LilyPad run at 8 MHz and dispense with the onboard voltage regulator due to
specific form-factor restrictions. An Arduino's microcontroller is also pre-
programmed with a boot loader that simplifies uploading of programs to the on-
chip flash memory, compared with other devices that typically need an external
programmer.
At a conceptual level, when using the Arduino software stack, all boards are
programmed over an RS-232 serial connection, but the way this is implemented
varies by hardware version. Serial Arduino boards contain a simple level shifter
circuit to convert between RS-232-level and TTL-level signals. Current Arduino
boards are programmed via USB, implemented using USB-to-serial adapter chipssuch as the FTDI FT232. Some variants, such as the Arduino Mini and the
unofficial Boarduino, use a detachable USB-to-serial adapter board or cable,
Bluetooth or other methods. (When used with traditional microcontroller tools
instead of the Arduino IDE, standard AVR ISP programming is used.)
The Arduino board exposes most of the microcontroller's I/O pins for use by other
circuits. The Diecimila, Duemilanove, and current Uno provide 14 digital I/O
pins, six of which can produce pulse-width modulated signals, and six analog
inputs. These pins are on the top of the board, via female 0.1 inch headers. Several
plug-in application shields are also commercially available.
9
-
7/30/2019 Safe Alert1
10/12
The Arduino Nano, and Arduino-compatible Bare Bones Board and Boarduino
boards may provide male header pins on the underside of the board to be plugged
into solderless breadboards.
There are a great many Arduino-compatible and Arduino-derived boards. Some
are functionally equivalent to an Arduino and may be used interchangeably. Many
are the basic Arduino with the addition of commonplace output drivers, often for
use in school-level education to simplify the construction of buggies and smallrobots. Others are electrically equivalent but change the form factor, sometimes
permitting the continued use of Shields, sometimes not. Some variants use
completely different processors, with varying levels of compatibility.
The Arduino Uno is a microcontroller board based on the ATmega328 . It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP
header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it
with a AC-to-DC adapter or battery to get started. The Uno differs from all
preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega8U2 programmed as a USB-to-serial converter.
BLUETOOTH
Bluetooth is a wireless technology standard for exchanging data over short
distances (using short-wavelength radio transmissions in the ISM band from
24002480 MHz) from fixed and mobile devices, creating personal area networks
(PANs) with high levels of security. Created by telecom vendor Ericsson in
1994,it was originally conceived as a wireless alternative to RS-232 data cables. Itcan connect several devices, overcoming problems of synchronization.
Bluetooth is managed by the Bluetooth Special Interest Group, which has more
than 18,000 member companies in the areas of telecommunication, computing,
networking, and consumer electronics. Bluetooth was standardized as IEEE
802.15.1, but the standard is no longer maintained. The SIG oversees the
development of the specification, manages the qualification program, and protects
the trademarks.
Bluetooth operates in the range of 24002483.5 MHz (including guard bands).
This is in the globally unlicensed Industrial, Scientific and Medical (ISM)2.4 GHz short-range radio frequency band. Bluetooth uses a radio technology
called frequency-hopping spread spectrum. The transmitted data is divided into
packets and each packet is transmitted on one of the 79 designated Bluetooth
channels. Each channel has a bandwidth of 1 MHz. The first channel starts at
2402 MHz and continues up to 2480 MHz in 1 MHz steps. It usually performs
1600 hops per second, with Adaptive Frequency-Hopping (AFH) enabled.
Originally Gaussian frequency-shift keying (GFSK) modulation was the only
modulation scheme available; subsequently, since the introduction of Bluetooth
2.0+EDR, /4-DQPSK and 8DPSK modulation may also be used between
compatible devices. Devices functioning with GFSK are said to be operating inbasic rate (BR) mode where an instantaneous data rate of 1 Mbit/s is possible. The
10
-
7/30/2019 Safe Alert1
11/12
term Enhanced Data Rate (EDR) is used to describe /4-DPSK and 8DPSK
schemes, each giving 2 and 3 Mbit/s respectively. The combination of these (BR
and EDR) modes in Bluetooth radio technology is classified as a "BR/EDR radio".
Bluetooth is a packet-based protocol with a master-slave structure. One master
may communicate with up to 7 slaves in a piconet; all devices share the master's
clock. Packet exchange is based on the basic clock, defined by the master, which
ticks at 312.5 s intervals. Two clock ticks make up a slot of 625 s; two slotsmake up a slot pair of 1250 s. In the simple case of single-slot packets the master
transmits in even slots and receives in odd slots; the slave, conversely, receives in
even slots and transmits in odd slots. Packets may be 1, 3 or 5 slots long but in all
cases the master transmit will begin in even slots and the slave transmit in odd
slots.
Bluetooth provides a secure way to connect and exchange information between
devices such as faxes, mobile phones, telephones, laptops, personal computers,
printers, Global Positioning System (GPS) receivers, digital cameras, and video
game consoles. It was principally designed as a low-bandwidth technology.
Communication and connection
A master Bluetooth device can communicate with a maximum of seven devices in
a piconet (an ad-hoc computer network using Bluetooth technology), though not
all devices reach this maximum. The devices can switch roles, by agreement, and
the slave can become the master (for example, a headset initiating a connection to
a phone will necessarily begin as master, as initiator of the connection; but may
subsequently prefer to be slave).
The Bluetooth Core Specification provides for the connection of two or morepiconets to form a scatternet, in which certain devices simultaneously play the
master role in one piconet and the slave role in another.
At any given time, data can be transferred between the master and one other
device (except for the little-used broadcast mode The master chooses which slave
device to address; typically, it switches rapidly from one device to another in a
round-robin fashion. Since it is the master that chooses which slave to address,
whereas a slave is (in theory) supposed to listen in each receive slot, being a
master is a lighter burden than being a slave. Being a master of seven slaves is
possible; being a slave of more than one master is difficult. The specification is
vague as to required behavior in scatternets
11
-
7/30/2019 Safe Alert1
12/12
12