MAJOR REPORT Final (Main Content) - Arduino Based Bag Security System
MAJOR REPORT Final (Main Content) - Arduino Based Bag Security System
Security has becoming an important issue everywhere. It is becoming necessary nowadays as the
possibilities of intrusion are increasing day by day. In this project, security system has been
designed that has a special feature and which makes the person aware of his being bag being
stolen or lost. We have planned a baggage security system using Arduino. Arduino card s used,
which s considered one of modern programmable device and utilize from speed dial function n
mobile phone.
The result product will be a fully secure bag that comes with a full build n security against theft
and beng lost by the owner. The bag s provided wth a wireless lock/unlock system controlled
by a mobile phone via Bluetooth. The user has to connect the bag to their mobile phone by
Bluetooth and provide the password to unlock t. This will be controlled by an Arduino.
Bag can only be unlocked with high security measures as mentioned above. Apart from this, if in
case the bag is lost, the owner can keep track of this bag through gps tracking and receive
message in his mobile phone through GSM module interfaced with the same Arduino thus being
able to get back the valuable without losing it. Higher security can be assigned by adding
additional feature by which alarm can set in case if anyone tries to break or cut through the lock
system thereby providing the highest possible security to the valuables in the bag.
CHAPTER 1: INTRODUCTION
Unauthorized access has been a big problem since the conception of idea of privacy. Over the
years, many control systems have been designed to prevent unauthorized access. We as humans
have a tendency of locking whatever is deemed precious to us, be it our belongings in the locker,
our houses, other institutional buildings (schools, offices etc.). Hence, it is important to have a
stress-free and convenient means of achieving privacy and safe guarding our belongings. In the
more conventional ways people try to safeguard their belongings by employing a watch dog or
maybe security personals. Billions of dollars worldwide are spent on this very purpose. Many
security systems are deployed by us to protect our belongings from theft. As lifestyles around the
world are getting plush, the need to design and prevent unauthorized access to our resources and
belongings via a sophisticated system is very important and is feasible in the long run.
Hence to achieve this very purpose we have designed an Arduino based bag security system. The
sole purpose of using Arduino in our project is that it has been the open nature of this very
module. The software used on Arduino is entirely available as on open source and the hardware
design information is readily available under creative commons licenses for new designers as
ourselves be it schematics, PCB layouts etc. in practice it is very easy to adapt the software and
the hardware, and then contribute what you do back on the Arduino project as a whole.
The GSM was initially designed for voice, but it can be used for other purposes also. The very
idea of using GSM in our project is that the GSM architecture is deployed in many countries.
Gsm can be used to receive signals captured by various machines in GSM serviceable areas, and
also to send control signals to the device. The installation on long wires to achieve a control
system is very tedious and expensive than the use of mobile networks to achieve this sole
purpose. To achieve. Suitable magnetic sensors are used in out project.
So in a nutshell we have designed a bag security system using Arduino as the brain of our
prototype which controls the GSM module, the GPS module, magnetic sensors and other
components. We have given features like locating the bag, alarm in case of any intrusion and
lock- unlock feature.
Medical devices.
Robotics
Engines
Drones
Automation
Power tools
Trains
Airoplanes
FAMILY OF MICROCONTROLLER:
There are multiple types of microcontrollers such as:
1.
2.
3.
4.
5.
6.
7.
software
and
hardware
of
Arduino
was
designed
for
Arduino board:
There are many varieties of Arduino boards that can be used for different purposes. Most
Arduinos have the majority of these components in common.
Power supply:
Arduino board has to be connected to a power source in different ways. So we can power an
arduino uno through a USB. This can be done using a USB cable which will connect the
computer to the arduino board.
NOTE: Never use a power supply which is greater than 20 V as it shall overpower the
Arduino. Voltage recommended for arduino uno Is 6-12V.
Pins :
5V & 3.3V: as you as well guess that the 5V pin supplies 5V power supply to the
system. Similarly, 3.3V power supply through 3.3V pin.
Analog: The Analog In label which are from A0 TO A5 on the uno board are called the
analog in pins. Main function of analog pins are that they take in analog signals and
convert it to digital signals. Temperature sensors come under this classification.
Digital: Apart from the analog pins are the digital pins which have digital inputs and
digital outputs.
3,5,6,9,10 and 11 on the uno. Such pins act as normal pins. We can use them as PWM
pins as well. Modulation based on width of the signal and pulse variation.
AREF (9): it stands for analog reference and we basically leave this pin alone. We use
this to set an upper limit. Which is basically called external reference.
Reset Button
Arduino has a reset button. When we press the reset button, this will temporarily connect the
reset pin to the ground button and we can transfer the code to the arduino.
Power LED Indicator
When you switch the arduino plug ON. This directly needs to be set that the LCD light has to be
on. So if this light doesnt switch ON., then its time we check our circuit.
TX RX LEDs
TX is called transmitter and RX is called reciever. These are pins responsible for serial
communication. Serial communication means single signals which will pass through the system
at once. Multiple signals will not be done. These LEDs will give us some nice visual indications
whenever our Arduino is receiving or transmitting data.
Main IC
IC, consider it as the brain of Arduino. This has to be very important because we need to know
the IC type so that when we know what code to put up at arduino software. This information can
be found in writing on the top side of the IC.
2.3. GSM
A brief background
Around the early 80s, a problem arised in the European countries since they were using different,
incompatible mobile phone systems which was purely analog. These systems are called as 1G (1st
generation) systems.
GSM is a cell type of network, which means that cell phones connect to it by searching for the
cells in the neighborhood. There are five types of cell sizes in a GSM network
macro, micro, pico, femto, and umbrella cells. The coverage area of each cell depends on the
implementation environment.
Base Station Subsystem(BSS) The base stations and their respective controllers .It
carries out all the radio-related functions.
Network and Switching Subsystem(NSS) The part of the network which actually acts
as the backbone, sometimes just called as the "core network".It comprises of all the
equipments and functions related to the concept of end-to-end call.
GPRS Core Network The optional part which allows the user to use packet-based
Internet connections.
Operations support system (OSS) It deals with the operation and maintenance of GSM
equipment for the radio and network interface.
Features:
Free serial port connecting facility is available in this module, the Hardware/Software
Serial port control can be selected as per our requirement whenever needed.
Not only we can use the button for power on, but also can use the digital pin of Arduino
to make it on and reset the SIM900 module as per our need.
It is controlled via AT commands but we have configured it in the Arduino IDE program.
The minimum power consumption of this module if this specific is 1.5mA (sleep mode)
MAX232 IC:
The MAX232 is the that kind of integrated circuit. The digital logic circuits having ttl
compatibity are feeded by signals converted from an RS-232 serial port. so that devices working
on TTL logic can share the data with devices connected through Serial port(DB9 Connector
here)
Serial port / DB9 connector:
We just need to attach the RS232 cable for serial communication here so that it get connected to
all those devices which have Serial port / DB9 Connector.
The GPS or global positioning system is a system that is based in the space, which provides
location and time info in any weather conditions on earth. The system is capable to assist to any
organization be it military, civic or for personal uses too. It is available to any person with a GPS
receiver.
The GPS system currently has many active satellites in orbit which are inclined fifty five degrees
to the equator. The orbit of the satellites are set to 20,000km from the surface of the earth. At any
given time there are six satellites in the view from most of the places in earth. The concept of
GPS is simple but the technology involved is a little complex
Working of GPS
The gps receives signal from each GPS satellite. The satellite notes the exact time the signal is
send from the satellite. Subtraction is used to estimate three time the signal takes from the
satellite to the receiver. This was the distance between the satellite and the receiver can be
known. The receiver module knows the exact position of the satellite in the sky at the exact
moment the satellite had transmitted the signal. This way the gps system can determine the exact
position by using the travel time of the gps signal from 3 different satellites.
The gps technology needs to know the time very accurately. Atomic clocks are usually used
because they are very accurate. But it is very expensive to use an atomic clock for each and
every gps receiver. Though if the receiver get a signal from a 4 th satellite it solves an equation to
determine the accurate time without the use of atomic clock. The GPS tell the location in 3
dimensions namely east, north and altitude.
Sometimes the receiver does not get the signal from 3 satellites together still can tell you your
location but again it will be less accurate than it will tell u from 4 satellites. When the receiver
receives signals from 4 satellites it tell you your location in 3 dimensions. If you are at sea level
then your location will be fairly accurate but if you are in a mountainous terrain the 2-d fix could
be 100s of m off.
The modern receiver keeps track of every available satellite but only uses signals from the
necessary ones to calculate the receivers position.
To determine the location usually 2 types of information is required namely almanac and
ephemeris. The data is simultaneously transmitted by the satellites and the tracker keeps on
receiving it.
Information about the status of the satellite and orbital information is contained in almanac.
Though the almanac is not accurate enough. A new receiver might need at most 15 minutes to
receive a latest almanac. Many new models of the GPS receiver can get the almanac without
waiting for the satellite. Additional data is required by the GPS receiver for each satellite called
the ephemeris. This contains exact information of the orbit of the satellite. This gives accuracy of
up to 1-2 meters of the location of the satellite. This data (ephemeris) Is received every 2 hours
and has a validity of up to 4 hours.
The gps satellite orbits the globe twice a day in a predetermined orbit and transmit information to
earth. The receiver gets this information and uses the trilateration method to calculate he exact
location of the receiver on earth. As told earlier that the receiver should lock at least 3 satellites
to get a 2-D position which is latitude and longitude and also track the movement. With 4 or
more than 4 the receiver can also calculate the altitude of the user/ receiver. Once the location of
the receiver is locked, more information can be calculated like speed, distance to the destination,
distance of trip, track and also sunrise and sunset timing and even more.
The accuracy of the GPS depends on many factors. Those factors might include the position of
the satellite in space, atmospheric conditions, satellite click errors and ephemeris etc. usually
with a handheld GPS system, and 95% horizontal positions will be with 5-10 mts of their actual
position on earth. But the error in altitude can be twice as much as the error in horizontal
position. The accuracy of the GPS system can be improved by using additional information from
other reference stations.
Many WAAS based GPS are available today that use ground reference for determining the
accurate location on earth. It used ground based references. The corrected data is generally sent
to WAAS satellites which in turn send them to WAAS enabled GPS system for correction of
error.
A-GPS
Usually a cellphone GPS gets a correction almost immediately. Cellphones use assisted GPS
systems to correct or fix data, sometimes in locations where the fix might not be available. This
type of assisted GPS used data connection of the mobile to contact an assisted server. This server
then supplies the almanac and ephemeris to the GPS so that it doesnt have to wait for the
satellite. These servers also send the location data from the network towers which gives an
immediate fix.
What is trilateration?
To get to know trilateration well we need to use our imagination. Imagine you are somewhere on
the globe with some 3 satellites above you in the sky. If you now know your distance from the
satellite then you can imagine you are somewhere in the red circle ( fig. below) when you do the
same for the other 2 circles then you can work out where these three circles intersect which is
what your GPS receiver does( though overlapping spheres are used). The more the satellites the
more accurate you location will be on the globe.
cell on the device to provide backup and a small EPROM that is connected to this chip that stores
the configuration.
Specifications
To use with Arduino for maximum I/0 logic which is 3.6( as maintained by the on board
regulator), level shifting the 5v Tx signal can be done by using 2 1N4148 diodes in series
between Tx of Arduino and Rx of GPS.
baud rate of 9600bps until the GPS position is in lock position the NMEA sentences wont have
the coordinates of the location. The LED starts blinking when the lock is achieved.
Why we have used this module?
This GPS module is very capable for this price range and size s it is very compatible with
Arduino, raspberry PI etc. which are UART based. This specific module is very easy to use and
program. This model is compatible with the microcontroller we have used which is the Arduino
Uno. This model when powered will automatically acquire satellite signals and a fix for the
position. The LED will start blinking when the position fixed is found. This LED keeps blinking
till the time it has the position fix.
2.5. SENSORS
Sensors are devices that are frequently used to detect and respond to electrical or optical
signals.It also converts some of the physical parameters like temperature, blood pressure,
humidity, speed, etc. into a signal which can be measured electrically.
Classification of Sensors
The sensors are classified according to the following parameters:
1.
2.
Transduction principles, basically using the physical and chemical effects of the input
3.
4.
5.
Transduction principle is the basic parameter which is followed for a more efficient approach.
Only the material and technology parameters are chosen by the development engineering group.
Classification based on property is done as:
According to examples Temperature ,they are named as Thermistors,
According to Pressure examples are Fibre optic, vacuum, elastic liquid based manometers,
LVDT, electronic.
According to Flow examples are
displacement, thermal mass, etc.
The principle is simple. If no magnetic field is present, the signal line of the sensor is HIGH (3.5
V). If a magnetic field is objected to the sensor, the signal line goes LOW, at the same time the
LED present on the sensor gets lighted. The polarity of the magnetic field is of influence to the
switching action. The front side of the sensor needs the opposite polarity as the back of the
sensor to switch on. Whenever the bag is unlocked, the magnet gets placed near the Hall Effect
sensor and therefore we are able to detect that the lock has been locked. In this project, we will
be connecting magnetic sensor to Arduino Uno on pin 7.
HALL EFFECT
According to its principle, whenever a magnetic field is applied in a direction perpendicular to
the flow of electric current in a conductor, a potential difference is induced. This voltage can thus
be used to detect whether the sensor is in the proximity of a magnet or not. The Arduino can
detect this voltage change through its interrupt pin and determine whether the magnet is near the
sensor or not.
modulating properties of liquid crystals. We know that Liquid crystals do not emit light directly.
LCD displays are gradually replacing seven segment displays because of a myriad of advantages,
such as:
1. LCDs are cost effective and reasonable.
2. They can be easily programmed.
3. Special characters can be made, these are called customized characters which can be
again easily displayed.
4. Animations can be created.
5. Interfacing with any microcontrollers.
LCD displays utilizes two layers of polarizing material with a liquid crystal solution between
them. When an electric current is passed through the liquid, this results in the crystals to
synchronise, this is done to isolate light from the medium. Therefore, each crystal is like a shutter
window which sometime allows light energy to pass through and sometimes acts like a blocking
wall. This is the basic and rudimentary functioning of a LCD. Monochrome LCD images usually
appear as dark gray or blue images, this is covered by a top layered grayish background.
Types of LCD:
Color LCD displays use two basic techniques for producing color: Passive matrix is considered
the comparatively the less expensive of the two technologies mentioned. The other technology
which is also called thin film transistor or active matrix produces more bright and intense colour
images that are sharp and of high resolution. These are also called the traditional CRT displays
but the only drawback to this technique of LCD is that it very expensive. Recently,to give
competition to the more used active-matrix LCD, recently passive matrix started utilizing a new
CSTN and DSTN technologies. This was done to produce sharp colours rivaling active matrix.
PASSIVE DISPLAY: Passive displays are widely used with segmented digits such as calculators,
fax machines and remote controls, most of which are monochrome or have only a few colours.
ACTIVE DISPLAY:These are used in desktop computer monitors and LCD TVs. 99.99% of all
laptops, active displays are essentially called active matrix.
Characterstics of LCD:
When we say 16x2, we mean that there are 16 characters in one line and 2 represents 2 lines in
our display.
1.
2.
3.
4.
5.
6.
There are various positives of using a LCD.The screen of LCD is very energy efficient. Due to
its low electrical power consumption lets us sue it as a battery powered equipment and this thus
more efficient than a CRT. Since its an electronically modulated optical device made up of
infinite number of segments which are controlling a layer of liquid crystals and arranged in front
of a source of light or a reflector, which helps to produce images in color or monochrome. Liquid
crystals were first discovered in 1888. By 2008, annual sales of televisions with LCD screens
exceeded sales of CRT units worldwide. CRT became absolutely obsolete for any daily purpose
used in appliances because of the popularity of LCD.
Each pixel OD an LCD typically consists of a layer of molecules aligned between two
transparent electrodes, and two polarizing filters, the axes of transmission of which are
perpendicular to each other. With no actuall liquid crystal between the polarizing filters, light
passing through the first filter would be blocked by the second one.
The surface of the electrode that are in contact with the liquid crystal material are given so as to
align the molecules in a certain direction or orientation. This kind of treatment consists of a thin
polymer coat that is unidirectional and it is rubbed also in a unidirectional way. In LCD,
electrodes are made up of transparent conductor called Indium. This leads us to conclusion that
LCD is an intrinsic passice electronic device and its also a simple easy light valve which opens
and shuts the amount of light passing which is governed by LCD drivers.
Before applying an electric field, the orientation of the LCD molecules are determined by the
alignment at the surfaces of the electrode. If the applied voltage is large enough, the liquid
crystals molecules in the centre of the layer are almost completely not twisted and the
polarization of the incident light is not rotated as it passes through the liquid crystal layer.
78xx series:
Here is the list of the commonly used positive voltage regulators. These are called positive
voltage regulators as they are positive with respect to the ground. 7805 has a 5volt output. 7812
produces 12volts. Similarly, 79xx ICs can be used to give a negative supply voltage. If we
combine both, 78xx and 79xx, we get a positive and negative supply voltages.
2.9. POTENTIOMETER:
A potentiometer is informally called pot. It is three terminal resistor within which there is sliding
or rather a rotating contact that makes an adjustable voltage divider. When we use only two
terminals of the resistor, it turns into a rheostat which is basically a variable resistor.
Potentiometer is generally used to measure the potential and is also called a voltage divider.
1. Generally potentiometer are used to control various electrical devices. Such as: volume
controls on audio equipments.
2. They donot have the power to control very high power in any device. They dont cross
beyond a watt. This is only because the power dissipated in the potentiometer will be
later compared to the controller load power.
3. Potentiometers are now days widely used as a displacement transducers. Sole reason is
due to the fact that it generates large output signal.
4. Now days we have preset potentiometers which are fixed and pre-adjusted in the system
while manufacturing. A motor-driven potentiometer can be used in place of a function
generator by using a non-linear resistance to attain trigonometric functions.
5. In our project, potentiometer seemed more feasible than any other digital controls.
Therefore, on an economical base,we used potentiometer.
6. We are using potentiometer to adjust and vary the light in LCD. In our project, it acts like
a light dimmer controller. Potentiometer is used to control the switching process of a
triac. This indirectly makes it a controller of the brightness of the lamp.
Potentiometer can take multiple forms,for instance, we have a combination of a filter network
with a potentiometer,this lets the potentiometer behave like an equalizer.
As history tells us, potentiometer was initially only used for picture control. Various parameters
come under that section like :
1. Brightness
2. Contrast
3. Color response
4. Picture synchronization
5. Motion control.
CONSTRUCTION OF A POTENTIOMETER:
There are specific parts of a potentiometer. Following are the components that constitute a
potentiometer:
1. Resistive element.
2. Sliding contact, which is also called a wiper that moves along the element.
3. The resistive element can be either flat or angled. Also,each end of the resistive element
is connected to a terminal.
3. Single turn potentiometers: In this kind, the wiper travels just once, in one revolution,it
rotates as well. There is a potential of contamination in this kind if because of the narrow
space between the shaft and the housing, in which it rotates.
4. Rotary potentiometer: only an array of sliders can give a visual description of the
potentiometer working. These are generally used in multiband equalisers. It a low power
potentiometer.
5. Multi-turn potentiometer: it is a user accessible and as well as preset. It allows fine
adjustments. Rotations through an angle changes its functioning from a simple rotary
potentiometer.
6. String potentiometer: It is a type of mutliturn potentiometer which operates when a reel
of wire turns against a spring. This is based on the concept of force. Done to convert
linear position to a variable resistance.
7. Logarithmic potentiometer: it uses two separate resistance regions to approximate a
logarithmic law. These are expensive. This kind is made with a material whose resistance
varies from one end to another. A process called tapering occurs in this kind of
potentiometer.
2. Passive antenna: passive antenna doesnot need any power supply. In this kind, RF
designing experience is required.
Helix antenna and patch antenna are excellent options when we talk about active antennas.For
our project,we are using patch antenna. To give a better understanding to why we are using it
with GPS, following are the factors:
1.
2.
3.
4.
5.
High gain.
Low cost.
Large variety of sizes available in the market.
The isolation between the antenna and feed is less in comparison to helix antenna.
In helix antenna, there will be number of signals present on the screen coming from
different satellites which will not be there while using patch antenna.
6. In patch antenna, the probability of noise figure is lower than in a helix antenna because
in helix type, the radiation is omni-directional.
2.11. Capacitor
General voltage storage devices are called capacitors. These are devices are used in electronic
circuits. These are also used in AC fan motors and heating devices. These are of two main types.
The types are electrolytic and non-electrolytic. The first one are used with transistors power
supply and also vacuum tubes. The second type is used to regulate the surges in direct current.
The disadvantage of electrolytic capacitor is that it can fail. It can fail when it is out of
electrolyte or by discharging way too much current. The second category mainly fail if their
stored charge leaks.
The basic capacitor consist of 2 parallel metal plates which do not touch each other. And are
electrically separated by air or by some insulating material example waxed paper or mica or
ceramic or some liquid gel used in the first type of capacitors discussed above. The insulating
layer between the capacitor plates is called a dielectric. Voltage is present across the plates of the
capacitor. The insulating layers does not let the current flow through it. This in turn allows
voltage to be present on the plates.
The shape of the plates can be any. We can have square, circular or maybe rectangular plates.
In case of direct current, the capacitor only charges up to its supply voltage and blocks the
current flow because the dielectric is non- conductive and insulating. But in case of alternating
current the current appears to pass directly through the capacitor with some or no resistance.
The capacitance and the work done by the source voltage onto the plates determines the potential
difference present across the capacitor.
The capacitance in denoted by C. the capacitance is denoted by the permittivity multiplied
with the area of the plate and then devides by the distance between the plates. The formula is
given below.
C= * (A/D)
Where C is the capacitance. is the permittivity. A is the area between the plates and D is the
distance between the plates.
1. Read the value of capacitance on the capacitor. It is mostly give in micro farad, since
farad is a large quantity
2. Take a digital multi meter and set the knob to capacitance.
3. Now connect the multi meter leads to the capacitor terminal and connect the read lead
which is the positive one to capacitor anode and the black lead which is the negative one
to the cathode of the capacitor.
4. Now check what the multi meter reading is. If the multi meter reading is close to the
reading inscribed on the capacitor then we are good to go.
2.12.
POWER SUPPLY:
2.13. SOLENOID:
3. It is based on electromagnetic induction. When an electric current passes through a solenoid,
4.
For testing purpose we need to load the program on Arduino board. The successful loading will
be indicated by the on and off on on-board LED on Arduino. We then need to connect external
LED using a breadboard. The new circuit will flash the external LED and will show the success
of our testing.
For the testing we need a 470 ohm resister (yellow-violet-brown) and a 5mm LED. We will also
be needing a breadboard, wire links, an Arduino Uno board and a USB cable.
Now we download the new version of Arduino IDE and install the package. We then download
the necessary drivers in the package. Once the installing is done, we open the icon and double
click on the Arduino icon.
blink option. A new window will open up and a program will show on the window. Then click on
the upload button on the tool bas which is usually shown in red color. The program will upload
and the LED on the Arduino board will start blinking.
Void setup()
{
pinMode(13, OUTPUT);
}
Void loop()
{
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13. LOW);
delay(1000);
}
External LED testing
Fig below shows the interfacing of the external LED with the Arduino board for testing purposes.
For this we connect the anode of the LED to pin 2 of the board. LED cathode is connected to the
resistor of the predetermined value and the other pin of the resistor is connected to the GND of
the Arduino Uno.
Now for programing purpose star the Arduino ide and type the program desired.
Void setup()
{
pinMode(2, OUTPUT);
}
Void loop()
{
digitalWrite(2, HIGH);
delay(1000);
digitalWrite(2, LOW);
delay(1000);
}
Now verify the program by clicking on the verify button on the tool bar on the top. Save the
program before verifying it. Then upload the program on the Arduino ide. Click on the upload
button after verifying it. After the uploading process completes the external LED should start
blinking.
3.2.
1. We are using sim900 a module which means that the module supports 900 MHz India and
most
mobile providers across the globe use 900 MHz band. For other countries
Fig 3E: Block diagram representing interfacing between GSM and Arduino.
3.3.
We use GY-GPS6MV2 with arduino. It is an electronic device that helps us to the Arduino board
in order to get location in the form of latitude and longitude. We use serial ports for the
connection. Pins 0 and 1 of the arduino board are used to connect the GPS module with Arduino.
The pin 0 of Arduino is connected to SIO of the gps module. GND AND /RAW of the gps
module is connected to the GND of the arduino uno and Vcc of the GPS is connected to 5V of
arduino.
3.4.
3.5.
3.6.
We connect the reed switch to digital pin 2 of Arduino board in the manner given below.
Arduino IDE
For programming purposes, Arduino projects have a feature known as Integrated Development
Environment(IDE) designed on the basis of a programming language called Processing, which
mostly supports languages like C and C++.With the help of this developing environment for
Arduino,many automation projects are done.In fact this more prefferable in most of the cases
because all the feedbacks show that they have been quite useful in programming and controlling
the module effectively.Through the programs and codes,it gets connected to the Arduino
hardware and communicates with them.The toolbar options present there helps us to upload and
verify our codes.Serial monitor can be opened by this.So,we can say that Arduino IDE software
has been acting as a backbone to many automation projects concerning Arduino.
Our project is already provided with the Arduino based Integrated Development
Environment (IDE), which is a type of cross-platform application where programs and codes are
written in Java. It was designed to expose the techniques of programming to all those who are
unfamiliar with software development. It has a code editor containing features like brace
matching,assyntax highlighting,and automatic indentation, and also helps to compile and load
programs to an Arduino board by just one click.Programs written for Arduino using the IDE are
usually called as a sketches.Most of the IDEs have a system of intelligent coding completion and
other features like class browsers, object browsers, and class hierarchical diagrams, so that we
can use them in object-oriented software development.
The IDE mainly aims to reduce the configurations required to bind the multiple development
utilities all together, instead of providing the same set of capabilities as a cohesive unit. Reducing
the setup time will increase the productivity of the developer, in some cases where learning to
use the IDE is quite faster than manually integrating all of the individual tools. A tight integration
of all development tasks usually carries the potential of improving the overall productivity
beyond just helping with setup tasks. For e.g.,Parsing can be done on a continuous basis while
the code gets edited, providing instant feedback when there is an occurence of some syntax
errors. That can help to learn a new programming language and its associated libraries more
faster.
The Arduino IDE supports the languages C and C++ which have the rules and abilities to
organize the coding part. The Arduino IDE supplies a special software library called Wiring ,
which gives many common input and output procedures. An Arduino C/C++ sketch consists of
two functions that are compiled and linked with a program called stub main( ) into an
executable cyclic program:
setup( ): name of a function that runs once the program gets started and helps to initialize
the settings.
loop( ): name of a function which is being called repeatedly until the boards power is
turned off.
After getting it compiled and linked with the GNU toolchain(Since the main source code for the
IDE is released under the authorisation of GNU General Public License , version 2 ),and also
included with the IDE distribution, the Arduino IDE employs the program avrdude for the
conversion of the executable code to a text file in hexadecimal coding that is loaded into the
Arduino board by a loader program present in the board's firmware.
Specifications:-
The options present in the toolbar have their own respective functionsVerify :- Checks the code and detects the errors,if there is any.
Upload:-Helps in the compilation of the code and uploads it to the Arduino board.
4.2.
#include<LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
char str[70];
char *test="$GPGGA";
char logitude[10];
char latitude[10];
int i,j,k;
int temp;
//int Ctrl+z=26; //for sending msg
void setup()
{
lcd.begin(16,2);
Serial.begin(9600);
lcd.setCursor(0,0);
lcd.print("Luggage");
lcd.setCursor(0,1);
lcd.print("Tracking System");
delay(1000);
}
void loop()
{
if (temp==1)
{
for(i=18;i<27;i++)
//extract latitude from string
{
latitude[j]=str[i];
j++;
}
for(i=30;i<40;i++)
//extract longitude from string
{
logitude[k]=str[i];
k++;
}
lcd.setCursor(0,0);
//display latitude and longitude on 16X2 lcd display
lcd.print("Lat(N)");
lcd.print(latitude);
lcd.setCursor(0,1);
lcd.print("Lon(E)");
lcd.print(logitude);
delay(100);
Serial.println("AT+CMGF=1"); //select text mode
delay(10);
Serial.println("AT+CMGS=\"9911770027\""); // enter receipent number
Serial.println();
Serial.print("Latitude(N): ");
//enter latitude in msg
Serial.println(latitude);
//enter latitude value in msg
Serial.print("Longitude(E): ");
//enter Longitude in Msg
Serial.println(logitude);
//enter longitude value in msg
Serial.write(26);
//send msg Ctrl+z=26
temp=0;
i=0;
j=0;
k=0;
delay(20000);
// next reading within 20 seconds
}
}
void serialEvent()
{
while (Serial.available())
//Serial incomming data from GPS
{
char inChar = (char)Serial.read();
str[i]= inChar;
//store incomming data from GPS to temparary string
str[]
i++;
if (i < 7)
{
if(str[i-1] != test[i-1])
{
i=0;
}
}
if(i >=60)
{
temp=1;
}
}
}
CHAPTER 6: RESULT
1. The project was successfully executed. The resultant prototype was able to detect location
and send the coordinates to the mobile phone whose number was specified in the
program.
2. The phone was also able to lock or unlock the prototype.
3. The magnetic sensors was able to detect the intrusion and it successfully initiated a
message to the arduino which inturn sent and message to the user through the GSM
module.
4. The programming was done successfully in the Arduino integrated design environment.
5. Initially problems were encountered during interfacing the GPS module but it was
overcomed after trial and error.
6. Potentiometer was used with the GPS module to give it a separate power.
CHAPTER 7: CONCLUSION
Modern devices touch each and every area of our life today. The world has become so compact
that with a whiz of a cursor anyone can touch anyones life from anywhere in the world. This
makes the need for security of our belongings and property of ut most importance. In this project
we have used Arduino to design a prototype for security and reliability. Our proposed prototype
secures the luggage when the user is on the go. Making the user stress and worry free while
travelling or otherwise when the users belongings are on the go. Mobile phone has been used in
our model to inform the user about an unwanted intrusion in his/hers luggage. When the
magnetic sensors sense a forcefull intrusion then it informs the user about this. Hence the method
that we have used is reliable and robust. The user can also get the GPS coordinates of the
luggage when ever needed. The bag can also be locked or unlocked from any GSM servisable
area in the world via just an instruction.
CHAPTER 9: LIMITATIONS
1. The prototype only works in area which is serviced under the 900 MHz frequency band.
This is because SIM900a module is used in the prototype.
2. The luggage system does not work in area which does not have a GSM coverage.
3. The location of the designed prototype does not come in areas with no coverage example
basements or closed buildings.
4. In most line of sight cases the GPS coordinates are received.
5. In indoor scenarios the GPS coordinates of the prototype designed does not come.
1. In our project named Arduino based bag security using GSM. Firstly, we have thoroughly
explored the functioning of each and every specific component and its been a very
knowledgeable experience.
2. Aakash Huria, Shweta Prakash and Shreshtha Nayak have successfully executed the whole
project with great conviction and diligence. Our aim was to do corroborate a concept which is at a
neophyte level in the electronics business. Luggage tracking has been on track for a long time,
3.