Diamond Security System
Diamond Security System
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
Embedded System is a combination of hardware and software used to achieve a
single specific task. An embedded system is a microcontroller-based, software driven, reliable,
real-time control system, autonomous, or human or network interactive, operating on diverse
physical variables and in diverse environments and sold into a competitive and cost conscious
market.
An embedded system is not a computer system that is used primarily for
processing, not a software system on PC or UNIX, not a traditional business or scientific
application. High-end embedded & lower end embedded systems. High-end embedded system
- Generally 32, 64 Bit Controllers used with OS. Examples Personal Digital Assistant and
Mobile phones etc .Lower end embedded systems - Generally 8,16 Bit Controllers used with
an minimal operating systems and hardware layout designed for the specific purpose.
Examples Small controllers and devices in our everyday life like Washing Machine,
Microwave Ovens, where they are embedded in.
Human
Cooling
Interface
system
1.2 HISTORY
Given the definition of embedded systems earlier is this chapter; the first such systems
could not possibly have appeared before 1971. That was the year Intel introduced the world's
first microprocessor. This chip, the 4004, was designed for use in a line of business calculators
produced by the Japanese Company Busicom.
In 1969, Busicom asked Intel to design a set of custom integrated circuits-one for each
of their new calculator models. The 4004 was Intel's response rather than design custom
hardware for each calculator, Intel proposed a general-purpose circuit that could be used
throughout the entire line of calculators. Intel's idea was that the software would give each
calculator its unique set of features.
In the 1980s, embedded systems quietly rode the waves of the microcomputer age and
brought microprocessors into every part of our kitchens (bread machines, food processors, and
microwave ovens), living rooms (televisions, stereos, and remote controls), and workplaces
(fax machines, pagers, laser printers, cash registers, and credit card readers).
CHAPTER 2
PROJECT DISCRIPTION
Security is primary concern for every one. This Project describes a design of effective
security alarm system that can monitor the diamond in a museum using IR based flam e
sensors. An LED is connected to this system for visual indication of the safety of the
diamond. This LED shows whether the sensor has been activated and whether the wiring
to the sensor is in order.
The burglar alarm is built with IR based flame sensor. A glowing LED is placed near
the diamond and a highly sensitive IR based flame sensor is placed under the diamond.
Whenever somebody picks the diamond, the light of LED falls on the IR based flame sensor
and it triggers the SCR through a Switching transistor. A loud 60db siren is connected to this
SCR. This siren is activated in triggered conditions.
The system is provided with a unique lock type switch. Only the authorized person will
be having the key, and he only can deactivate / activate the system.This project uses regulated
5V, 750mA power supply. 7805 three terminal voltage regulator is used for voltage
regulation. Bridge type full wave rectifier is used to rectify the ac out put of secondary of
230/12V step down transformer.
The wavelengths of these regions and their applications are shown below.
The frequency range of infrared is higher than microwave and lesser than visible light.
For optical sensing and optical communication, photo optics technologies are used in the
near infrared region as the light is less complex than RF when implemented as a source of
signal. Optical wireless communication is done with IR data transmission for short range
applications. An infrared sensor emits and/or detects infrared radiation to sense its
surroundings.
The working of any Infrared sensor is governed by three laws: Planck’s Radiation law,
Stephen – Boltzmann law and Wien’s Displacement law.
Planck’s law states that “every object emits radiation at a temperature not equal to 00K”.
Stephen – Boltzmann law states that “at all wavelengths, the total energy emitted by a black
body is proportional to the fourth power of the absolute temperature”. According to Wien’s
Displacement law, “the radiation curve of a black body for different temperatures will reach
its peak at a wavelength inversely proportional to the temperature”.
The basic concept of an Infrared Sensor which is used as Obstacle detector is to transmit an
infrared signal, this infrared signal bounces from the surface of an object and the signal is
received at the infrared receiver.
There are five basic elements used in a typical infrared detection system: an infrared source,
a transmission medium, optical component, infrared detectors or receivers and signal
processing. Infrared lasers and Infrared LED’s of specific wavelength can be used as
infrared sources. The three main types of media used for infrared transmission are vacuum,
atmosphere and optical fibers. Optical components are used to focus the infrared radiation or
to limit the spectral response.
Optical lenses made of Quartz, Germanium and Silicon are used to focus the infrared
radiation. Infrared receivers can be photodiodes, phototransistors etc. some important
specifications of infrared receivers are photosensitivity, detectivity and noise equivalent
power. Signal processing is done by amplifiers as the output of infrared detector is very
small.
Types of IR Sensors
Infrared sensors can be passive or active. Passive infrared sensors are basically Infrared
detectors. Passive infrared sensors do not use any infrared source and detects energy emitted
by obstacles in the field of view. They are of two types: quantum and thermal. Thermal
infrared sensors use infrared energy as the source of heat and are independent of wavelength.
Thermocouples, pyroelectric detectors and bolometers are the common types of thermal
infrared detectors.
Quantum type infrared detectors offer higher detection performance and are faster than
thermal type infrared detectors. The photosensitivity of quantum type detectors is
wavelength dependent. Quantum type detectors are further classified into two types: intrinsic
and extrinsic types. Intrinsic type quantum detectors are photoconductive cells and
photovoltaic cells.
Active infrared sensors consist of two elements: infrared source and infrared detector.
Infrared sources include an LED or infrared laser diode. Infrared detectors include
photodiodes or phototransistors. The energy emitted by the infrared source is reflected by an
object and falls on the infrared detector.
IR Transmitter
Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations. Hence,
they are called IR LED’s. Even though an IR LED looks like a normal LED, the radiation
emitted by it is invisible to the human eye.
IR Receiver
Infrared receivers are also called as infrared sensors as they detect the radiation from an IR
transmitter. IR receivers come in the form of photodiodes and phototransistors. Infrared
Photodiodes are different from normal photo diodes as they detect only infrared radiation.
The picture of a typical IR receiver or a photodiode is shown below.
Different types of IR receivers exist based on the wavelength, voltage, package, etc. When
used in an infrared transmitter – receiver combination, the wavelength of the receiver should
match with that of the transmitter.
Principle of Working
The principle of an IR sensor working as an Object Detection Sensor can be explained using
the following figure. An IR sensor consists of an IR LED and an IR Photodiode; together
they are called as Photo – Coupler or Opto – Coupler.
When the IR transmitter emits radiation, it reaches the object and some of the radiation
reflects back to the IR receiver. Based on the intensity of the reception by the IR receiver,
the output of the sensor is defined.
When the light emitted by the IR LED is incident on the photodiode after hitting an
object, the resistance of the photodiode falls down from a huge value. One of the input of the
op – amp is at threshold value set by the potentiometer. The other input to the op-amp is
from the photodiode’s series resistor. When the incident radiation is more on the photodiode,
the voltage drop across the series resistor will be high. In the IC, both the threshold voltage
and the voltage across the series resistor are compared.
If the voltage across the resistor series to photodiode is greater than that of the
threshold voltage, the output of the IC Op – Amp is high. As the output of the IC is
connected to an LED, it lightens up. The threshold voltage can be adjusted by adjusting the
potentiometer depending on the environmental conditions.
The positioning of the IR LED and the IR Receiver is an important factor. When the
IR LED is held directly in front of the IR receiver, this setup is called Direct Incidence. In
this case, almost the entire radiation from the IR LED will fall on the IR receiver. Hence
there is a line of sight communication between the infrared transmitter and the receiver. If an
object falls in this line, it obstructs the radiation from reaching the receiver either by
reflecting the radiation or absorbing the radiation.
Distinguishing Between Black and White Colors
It is universal that black color absorbs the entire radiation incident on it and white
color reflects the entire radiation incident on it. Based on this principle, the second
positioning of the sensor couple can be made. The IR LED and the photodiode are placed
side by side. When the IR transmitter emits infrared radiation, since there is no direct line of
contact between the transmitter and receiver, the emitted radiation must reflect back to the
photodiode after hitting any object. The surface of the object can be divided into two types:
reflective surface and non-reflective surface. If the surface of the object is reflective in
nature i.e. it is white or other light color, most of the radiation incident on it will get
reflected back and reaches the photodiode. Depending on the intensity of the radiation
reflected back, current flows in the photodiode.
If the surface of the object is non-reflective in nature i.e. it is black or other dark
color, it absorbs almost all the radiation incident on it. As there is no reflected radiation,
there is no radiation incident on the photodiode and the resistance of the photodiode remains
higher allowing no current to flow. This situation is similar to there being no object at all.
The positioning and enclosing of the IR transmitter and Receiver is very important. Both the
transmitter and the receiver must be placed at a certain angle, so that the detection of an
object happens properly. This angle is the directivity of the sensor which is +/- 45 degrees.
In order to avoid reflections from surrounding objects other than the object, both the IR
transmitter and the IR receiver must be enclosed properly. Generally the enclosure is made
of plastic and is painted with black color.
There are different types of flame detection methods. Some of them are: Ultraviolet
detector, near IR array detector, infrared (IR) detector, Infrared thermal cameras, UV/IR
detector etc.
When fire burns it emits a small amount of Infra-red light, this light will be received
by the Photodiode (IR receiver) on the sensor module. Then we use an Op-Amp to check for
change in voltage across the IR Receiver, so that if a fire is detected the output pin (DO) will
give 0V(LOW) and if the is no fire the output pin will be 5V(HIGH).
In this project we are using an IR based flame sensor. It is based on the YG1006 sensor
which is a high speed and high sensitive NPN silicon phototransistor. It can detect infrared
light with a wavelength ranging from 700nm to 1000nm and its detection angle is about 60°.
Flame sensor module consists of a photodiode (IR receiver), resistor, capacitor,
potentiometer, and LM393 comparator in an integrated circuit. The sensitivity can be adjusted
by varying the on board potentiometer. Working voltage is between 3.3v and 5v DC, with a
digital output. Logic high on the output indicates presence of flame or fire. Logic low on
output indicates absence of flame or fire.
Table 2.1: Pin Description of Flame sensor Module
Pin Description
GND Ground
The flame sensor detects the presence of fire or flame based on the Infrared (IR)
wavelength emitted by the flame. It gives logic 1 as output if flame is detected, otherwise it
gives logic 0 as output. Arduino Uno checks the logic level on the output pin of the sensor and
performs further tasks such as activating the buzzer and LED, sending an alert message.
Digital systems and microcontroller pins lack sufficient current to drive the circuits
like relays, buzzer circuits etc. While these circuits require around 10milli amps to be operated,
the microcontroller’s pin can provide a maximum of 1-2milli amps current. For this reason, a
driver such as a power transistor is placed in between the microcontroller and the buzzer
circuit.
Vcc
BUZZER
CONTROLLER
PIN
GROUND
The input to the base of the transistor is applied from the microcontroller port pin P1.0.
The transistor will be switched on when the base to emitter voltage is greater than 0.7V (cut-
in voltage). Thus when the voltage applied to the pin P1.0 is high i.e., P1.0=1 (>0.7V), the
transistor will be switched on and thus the buzzer will be ON.
When the voltage at the pin P1.0 is low i.e., P1.0=0 (<0.7V) the transistor will be in
off state and the buzzer will be OFF. Thus the transistor acts like a current driver to operate
the buzzer accordingly.
CONTROLLER
DRIVER BUZZER
CIRCUIT
PIN
2.1.4. LED
a light-emitting diode (LED) is a semiconductor device that emits light when an
electric current is passed through it. Light is produced when the particles that carry the
current (known as electrons and holes) combine together within the semiconductor material.
Since light is generated within the solid semiconductor material, LEDs are described as
solid-state devices. The term solid-state lighting, which also encompasses organic LEDs
(OLEDs), distinguishes this lighting technology from other sources that use heated filaments
(incandescent and tungsten halogen lamps) or gas discharge (fluorescent lamps).
Inside the semiconductor material of the LED, the electrons and holes are contained
within energy bands. The separation of the bands (i.e. the bandgap) determines the energy of
the photons (light particles) that are emitted by the LED.
The photon energy determines the wavelength of the emitted light, and hence its color.
Different semiconductor materials with different bandgaps produce different colors of light.
The precise wavelength (color) can be tuned by altering the composition of the light-
emitting, or active, region.LEDs are comprised of compound semiconductor materials,
which are made up of elements from group III and group V of the periodic table (these are
known as III-V materials). Examples of III-V materials commonly used to make LEDs are
gallium arsenide (GaAs) and gallium phosphide (GaP).
Until the mid-90s LEDs had a limited range of colors, and in particular commercial
blue and white LEDs did not exist. The development of LEDs based on the gallium nitride
(GaN) material system completed the palette of colors and opened up many new
applications.
• Indium gallium nitride (InGaN): blue, green and ultraviolet high-brightness LEDs
• Aluminum gallium indium phosphide (AlGaInP): yellow, orange and red high-brightness
LEDs
• Aluminum gallium arsenide (AlGaAs): red and infrared LEDs
• Gallium phosphide (GaP): yellow and green LEDs
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-
serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2)
programmed as a USB-to-serial converter. Uno board has a resistor pulling the 8U2 HWB
line to ground, making it easier to put into DFU mode. Arduino board has the following new
features:
pinout: added SDA and SCL pins that are near to the AREF pin and two other new
pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage
provided from the board.
In future, shields will be compatible both with the board that use the AVR, which
operate with 5V and with the Arduino Due that operate with 3.3V. The second one is a not
connected pin, that is reserved for future purposes.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The
Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is
the latest in a series of USB Arduino boards, and the reference model for the Arduino platform;
for a comparison with previous versions, see the index of Arduino boards.
2.1.5.1. SUMMARY:
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
2.1.5.2. Power :
The Arduino Uno can be powered via the USB connection or with an external power
supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or
battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the
board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of
the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than
7V, however, the 5V pin may supply less than five volts and the board may be unstable. If
using more than 12V, the voltage regulator may overheat and damage the board. The
recommended range is 7 to 12 volts.
• VIN. The input voltage to the Arduino board when it's using an external power source
(as opposed to 5 volts from the USB connection or other regulated power source). You can
supply voltage through this pin, or, if supplying voltage via the power jack, access it through
this pin.
• 5V.This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the
VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage your board. We don't advise it.
• 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw
is 50 mA.
2.1.5.3. Memory:
The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB
of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Each of the 14 digital pins on the Uno can be used as an input or output, using pin
Mode(), digital Write(), and digital Read() functions. They operate at 5 volts. Each pin can
provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by
default) of 20-50 killoohms. In addition, some pins have specialized functions:
• Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial
chip.
• External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a
low value, a rising or falling edge, or a change in value. See the attach Interrupt() function for
details.
• PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog Write()
function.
• SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication using the SPI library.
• LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though
is it possible to change the upper end of their range using the AREF pin and the analog
Reference() function. Additionally, some pins have specialized functionality:
• AREF. Reference voltage for the analog inputs. Used with analog Reference().
• Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
2.1.5.5. Communication:
The Arduino Uno has a number of facilities for communicating with a computer,
another Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on
the board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no
external driver is needed.
However, on Windows, a .inf file is required. The Arduino software includes a serial
monitor which allows simple textual data to be sent to and from the Arduino board. The RX
and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial
chip and USB connection to the computer (but not for serial communication on pins 0 and
1).A software Serial library allows for serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus; see the documentation for details. For
SPI communication, use the SPI library.
Rather than requiring a physical press of the reset button before an upload, the Arduino
Uno is designed in a way that allows it to be reset by software running on a connected
computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is
connected to the reset line of the ATmega328 via a 100 nano farad capacitor. When this line
is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software
uses this capability to allow you to upload code by simply pressing the upload button in the
Arduino environment. This means that the boot loader can have a shorter timeout, as the
lowering of DTR can be well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer
running Mac OS X or Linux, it resets each time a connection is made to it from software (via
USB). For the following half- second or so, the boot loader is running on the Uno. While it is
programmed to ignore malformed data (i.e. anything besides an upload of new code), it will
intercept the first few bytes of data sent to the board after a connection is opened.
If a sketch running on the board receives one-time configuration or other data when it first
starts, make sure that the software with which it communicates waits a second after opening
the connection and before sending this data.
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either
side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may
also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset
line; see this forum thread for details.
The Arduino Uno has a resettable poly fuse that protects your computer's USB ports
from shorts and overcurrent. Although most computers provide their own internal protection,
the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port,
the fuse will automatically break the connection until the short or overload is removed.
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively,
with the USB connector and power jack extending beyond the former dimension. Four screw
holes allow the board to be attached to a surface or case. Note that the distance between digital
pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100-mil spacing of the other pins.
FEATURES:
CHAPTER 3
POWER SUPPLY
The power supplies are designed to convert high voltage AC mains electricity to
a suitable low voltage supply for electronic circuits and other devices. A power supply can by
broken down into a series of blocks, each of which performs a particular function. A dc power
supply which maintains the output voltage constant irrespective of ac mains fluctuations or
load variations is known as “Regulated D.C Power Supply”
Step
down Bridge Filter
T/F Rectifier Circuit Regulator
Power
supply to
all
sections
3.1.1 Transformer
Transformers are static devices made up of one or more windings, in which those with
two or more windings are coupled, and may be manufactured with or without a magnetic
core. They are used in induction of currents, producing a coupling between two
circuits. Transformers typically change values of voltage and current and are always used in
transferring power through electromagnetic induction between circuits at the same frequency.
Step down transformers are designed to reduce electrical voltage. Their primary
voltage is greater than their secondary voltage. This kind of transformer "steps down" the
voltage applied to it. For instance, a step-down transformer is needed to use a 110v product
in a country with a 220v supply.
Step down transformers convert electrical voltage from one level or phase
configuration usually down to a lower level. They can include features for electrical
isolation, power distribution, and control and instrumentation applications. Step down
transformers typically rely on the principle of magnetic induction between coils to convert
voltage and/or current levels.
Step down transformers are made from two or more coils of insulated wire wound
around a core made of iron. When voltage is applied to one coil (frequently called the
primary or input) it magnetizes the iron core, which induces a voltage in the other coil,
(frequently called the secondary or output). The turns ratio of the two sets of windings
determines the amount of voltage transformation.An example of this would be: 100 turns on
the primary and 50 turns on the secondary, a ratio of 2 to 1.
Step down transformers can be considered nothing more than a voltage ratio device.
With step down transformers the voltage ratio between primary and secondary will mirror
the "turns ratio" (except for single phase smaller than 1 kv a which have compensated
secondary’s). A practical application of this 2 to 1 turns ratio would be a 480 to 240 voltage
step down. Note that if the input were 440 volts then the output would be 220 volts. The
ratio between input and output voltage will stay constant. Transformers should not be
operated at voltages higher than the nameplate rating, but may be operated at lower voltages
than rated. Because of this it is possible to do some non-standard applications using standard
transformers.
3.1.3 RECTIFIER
There are several ways of connecting diodes to make a rectifier to convert AC to DC.
A bridge rectifier can be made using four individual diodes, but it is also available in
special packages containing the four diodes required. It is called a full-wave rectifier because
it uses all the AC wave (both positive and negative sections). 1.4V is used up in the bridge
rectifier because each diode uses 0.7V when conducting and there are always two diodes
conducting, as shown in the diagram below. Bridge rectifiers are rated by the maximum
current they can pass and the maximum reverse voltage they can withstand (this must be at
least three times the supply RMS voltage so the rectifier can withstand the peak voltages).
Digital systems and microcontroller pins lack sufficient current to drive the circuits
like relays, buzzer circuits etc. While these circuits require around 10milli amps to be operated,
the microcontroller’s pin can provide a maximum of 1-2milli amps current.
3.1.6 REGULATOR
This is the last block in a regulated DC power supply. The output voltage or current
will change or fluctuate when there is a change in the input from ac mains or due to
change in load current at the output of the regulated power supply or due to other
regulator. A regulator will maintain the output constant even when changes at the
CHAPTER 4
ARDUINO CODING
2. It is an official Arduino software, making code compilation too easy that even a common
person with no prior technical knowledge can get their feet wet with the learning process.
3. It is easily available for operating systems like MAC, Windows, Linux and runs on the
Java Platform that comes with inbuilt functions and commands that play a vital role for
debugging, editing and compiling the code in the environment.
4. A range of Arduino modules available including Arduino Uno, Arduino Mega, Arduino
Leonardo, Arduino Micro and many more.
5. Each of them contains a microcontroller on the board that is actually programmed and
accepts the information in the form of code.
6. The main code, also known as a sketch, created on the IDE platform will ultimately
generate a Hex File which is then transferred and uploaded in the controller on the board.
7. The IDE environment mainly contains two basic parts: Editor and Compiler where former
is used for writing the required code and later is used for compiling and uploading the code
into the given Arduino Module.
2. Text Editor
3. Output Pane
As we download and open the IDE software, it will appear like an image below.
Fig 4.1
The bar appearing on the top is called Menu Bar that comes with five different options as
follow
File – You can open a new window for writing the code or open an existing one.
Following table shows the number of further subdivisions the file option is categorized into.
Fir 4.2
And at the end of compilation, it will show you the hex file it has generated for the recent
sketch that will send to the Arduino Board for the specific task you aim to achieve.
Edit – Used for copying and pasting the code with further modification for font
Tools – Mainly used for testing projects. The Programmer section in this panel is used for
burning a bootloader to the new microcontroller.
Help – In case you are feeling skeptical about software, complete help is available from
getting started to troubleshooting.
The Six Buttons appearing under the Menu tab are connected with the running program as
follow.
The check mark appearing in the circular button is used to verify the code. Click this once
you have written your code.
The arrow key will upload and transfer the required code to the Arduino board.
The dotted paper is used for creating a new file.
Fig 4.3
The main screen below show how to select a program from examples ie: Bink.cc
Fig 4.4
The bottom of the main screen is described as an Output Pane that mainly
highlights the compilation status of the running code: the memory used by the
code, and errors occurred in the program. You need to fix those errors before
you intend to upload the hex file into your Arduino Module
Fig 4.6
#include <EEPROM.h>.
#include <dht.h>
#include <I2Cdev.h>
Most of the libraries are preinstalled and come with the Arduino software.
However, we can also download them from the external sources.
Fig 4.7
Fig 4.8
Just we go to the “Board” section and select the board we would like to
work on. Similarly, COM1, COM2, COM4, COM5, COM7 or higher are
reserved for the serial and USB board. we can look for the USB serial device
in the ports section of the Windows Device Manager.
Following figure shows the COM4 that we have used for my project,
indicating the Arduino Uno with COM4 port at the right bottom corner of the
screen.
Fig 4.9
After correct selection of both Board and Serial Port, click the verify
and then upload button appearing in the upper left corner of the six button
section or you can go to the Sketch section and press verify/compile and then
upload. The sketch is written in the text editor and is then saved with the file
extension .ino.
It is important to note that the recent Arduino Modules will reset
automatically as you compile and press the upload button the IDE software,
however, older version may require the physical reset on the board.
Note: The port selection criteria mentioned above is dedicated for Windows
operating system only, you can check this Guide if you are using MAC or
Linux.
The amazing thing about this software is that no prior arrangement or
bulk of mess is required to install this software, you will be writing your first
program within 2 minutes after the installation of the IDE environment.
Using Serial Monitor
Fig 4.10
Bootloader
Fig 4.11
Variables
Whenever you’re using Arduino, you need to declare global variables
and instances to be used later on. In a nutshell, a variable allows you to name
and store a value to be used in the future. For example, you would store data
acquired from a sensor in order to use it later. To declare a variable you simply
define its type, name and initial value.
It’s worth mentioning that declaring global variables isn’t an absolute
necessity. However, it’s advisable that you declare your variables to make it
easy to utilize your values further down the line.
Instances
In software programming, a class is a collection of functions and
variables that are kept together in one place. Each class has a special function
Loop()
The loop function is also a must for every Arduino sketch and executes
once setup() is complete. It is the main function and as its name hints, it runs
in a loop over and over again. The loop describes the main logic of your
circuit.
Serial Ploter
Arduino serial plotter is another component of the Arduino IDE, which
allows you to generate a real-time graph of your serial data. The serial plotter
makes it much easier for you to analyze your data through a visual display.
You’re able to create graphs, negative value graphs, and conduct waveform
analysis
Fig 4.12
Fig 4.13
Fig 4.14
int diamond=2;
int buzzer=4;
void setup() {
pinMode(diamond,INPUT);
pinMode(buzzer,INPUT);
Serial.begin(9600);
void loop() {
int diamond_val=digitalRead(diamond);
//Serial.println(diamond_val);
if(diamond_val==0){
digitalWrite(buzzer,HIGH);
Serial.println("No Diamond");
delay(1000);
else{
digitalWrite(buzzer,LOW);
Serial.println("Diamod present");
delay(1000);
CHAPTER 5
APPLICATIONS
5.1.1 APPLICATIONS
• Museums
Mostly our project is designed to increase the security around the rare artifacts
which are kept as exhibits in the museum
• Home / office security
We can also provide security with this project in our offices and houses where
we keep our valuables.
• Banks
We can also keep this model inside each bank lockers where we can provide
security for each and every object placed inside it
5.1.2 ADVANTAGES
• Easy to operate
• Low maintenance
• Low cost
• Simple and reliable circuit
• Safety
• Capable of detecting motion in presence/absence of light.
5.1.3 DISADVANTAGES
• Line of sight
• Get blocked by common objects
• Limited range
• Can be affected by environmental conditions
CHAPTER 6
RESULT
6.1 RESULT
6.2 CONCLUSION
The project “DIAMOND SECURITY SYSTEM IN MUSEUM” has
been successfully designed and tested. It has been developed by integrating
features of all the hardware components used. Presence of every module has
been reasoned out and placed carefully thus contributing to the best working of
the unit.
Secondly, using highly advanced microcontrollers and with the help of
growing technology the project has been successfully implemented.
Finally we conclude that embedded system is an emerging field and
there is a huge scope for research and development.
Each and every time when we need to update the Arduino code we
need to disconnect the system and update it but, we can use microcontroller
with wi-fi module to fix this problem so that any changes in code can be made
over the internet.
CHAPTER 7
REFERENCE
[1] B. Glover, and H. Bhatt, “IR Essentials”, O’Reilly Media, Ebook: June
2009.
[2] C. Mulliner, “Vulnerability analysis and attacks on NFC-enabled mobile
phones”, in International Conference on Availability, Reliability and Security,
IEEE Computer Society, March 2009, pp. 695-700.
[3] C. Turcu, “Designing and Deploying IR Application”, InTech, Ebook:
Aug. 2011.
[4] E. Ilie-Zudor, Z. Kemeny, P. Egri and L. Monostori, “The IR Technology
and its current applications”, In proceedings of The Modern Information
Technology in the Innovation Processes of the Industrial Enterprises-MITIP,
2006, pp. 29-36.
https://www.arduino.cc/en/Main/Software
https://www.arduino.cc/en/Guide/HomePage
http://www.audon.co.uk/arduino.html
https://www.circuito.io/blog/arduino-code/
https://www.makerspaces.com/arduino-uno-tutorial-beginners/