0% found this document useful (0 votes)
292 views49 pages

Diamond Security System

This document describes a diamond security system for museums using an infrared (IR) sensor. The system monitors diamonds on display using an IR-based flame sensor placed under the diamond. When the diamond is picked up, light from an LED falls on the sensor, triggering an alarm. A loud siren is activated. Only authorized personnel with a unique key can deactivate the alarm. The system operates on a 5V power supply and uses an IR sensor to detect changes in infrared light levels that occur when the diamond is moved.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
292 views49 pages

Diamond Security System

This document describes a diamond security system for museums using an infrared (IR) sensor. The system monitors diamonds on display using an IR-based flame sensor placed under the diamond. When the diamond is picked up, light from an LED falls on the sensor, triggering an alarm. A loud siren is activated. Only authorized personnel with a unique key can deactivate the alarm. The system operates on a 5V power supply and uses an IR sensor to detect changes in infrared light levels that occur when the diamond is moved.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

memory ASIC/ FPGA

Sensors ADC Micro Processor DAC Actuators

Human
Cooling
Interface
system

Fig 1.1:block diagram of embedded system

DEPT OF ECE, DRKIST PG.NO:1


DIAMOND SECURITY SYSTEM IN MUSEUMS

Characteristics of Embedded System:


An embedded system is any computer system hidden inside a product other than a
computer.There will encounter a number of difficulties when writing embedded system
software in addition to those we encounter when we write applications
Throughput – Our system may need to handle a lot of data in a short period of time.
Response–Our system may need to react to events quickly
Testability–Setting up equipment to test embedded software can be difficult
Debugability–Without a screen or a keyboard, finding out what the software is doing wrong
(other than not working) is a troublesome problem
Reliability – embedded systems must be able to handle any situation without human
intervention
Memory space – Memory is limited on embedded systems, and you must make the software
and the data fit into whatever memory exists
Program installation – you will need special tools to get your software into embedded
systems
Power consumption – Portable systems must run on battery power, and the software in these
systems must conserve power
Processor hogs – computing that requires large amounts of CPU time can complicate the
response problem
Cost – Reducing the cost of the hardware is a concern in many embedded system projects;
software often operates on hardware that is barely adequate for the job.
Embedded systems have a microprocessor/ microcontroller and a memory. Some have a
serial port or a network connection. They usually do not have keyboards, screens or disk
drives.

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

DEPT OF ECE, DRKIST PG.NO:2


DIAMOND SECURITY SYSTEM IN MUSEUMS

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).

DEPT OF ECE, DRKIST PG.NO:3


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

DEPT OF ECE, DRKIST PG.NO:4


DIAMOND SECURITY SYSTEM IN MUSEUMS

2.1 BLOCK DIAGRAM

Fig 2.1:block diagram of diamond security system

2.1.1. IR SENSOR MODULE


Infrared technology addresses a wide variety of wireless applications. The main areas
are sensing and remote controls. In the electromagnetic spectrum, the infrared portion is
divided into three regions: near infrared region, mid infrared region and far infrared region.

The wavelengths of these regions and their applications are shown below.

• Near infrared region — 700 nm to 1400 nm — IR sensors, fiber optic


• Mid infrared region — 1400 nm to 3000 nm — Heat sensing
• Far infrared region — 3000 nm to 1 mm — Thermal imaging

The frequency range of infrared is higher than microwave and lesser than visible light.

DEPT OF ECE, DRKIST PG.NO:5


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

DEPT OF ECE, DRKIST PG.NO:6


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

Fig 2.2: IR sensor working

DEPT OF ECE, DRKIST PG.NO:7


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

The picture of a typical Infrared LED is shown below.

Fig 2.3:IR transmitter

There are different types of infrared transmitters depending on their wavelengths,


output power and response time. A simple infrared transmitter can be constructed using an
infrared LED, a current limiting resistor and a power supply. The schematic of a typical IR
transmitter is shown below. When operated at a supply of 5V, the IR transmitter consumes
about 3 to 5 mA of current. Infrared transmitters can be modulated to produce a particular
frequency of infrared light. The most commonly used modulation is OOK (ON – OFF –
KEYING) modulation. IR transmitters can be found in several applications. Some
applications require infrared heat and the best infrared source is infrared transmitter. When
infrared emitters are used with Quartz, solar cells can be made.

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.

DEPT OF ECE, DRKIST PG.NO:8


DIAMOND SECURITY SYSTEM IN MUSEUMS

Fig 2.4:IR Receiver

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.

It consists of an IR phototransistor, a diode, a MOSFET, a potentiometer and an LED. When


the phototransistor receives any infrared radiation, current flows through it and MOSFET
turns on. This in turn lights up the LED which acts as a load. The potentiometer is used to
control the sensitivity of the phototransistor.

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.

DEPT OF ECE, DRKIST PG.NO:9


DIAMOND SECURITY SYSTEM IN MUSEUMS

Fig 2.5: working of IR sensor module

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.

Fig 2.6: A typical IR sensing circuit


It consists of an IR LED, a photodiode, a potentiometer, an IC Operational amplifier
and an LED.IR LED emits infrared light. The Photodiode detects the infrared light. An IC
Op – Amp is used as a voltage comparator. The potentiometer is used to calibrate the output
of the sensor according to the requirement.

DEPT OF ECE, DRKIST PG.NO:10


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

DEPT OF ECE, DRKIST PG.NO:11


DIAMOND SECURITY SYSTEM IN MUSEUMS

Fig 2.7: The pictorial representation of the above scenarios

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.

Fig 2.8: The directivity of IR sensor

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.

DEPT OF ECE, DRKIST PG.NO:12


DIAMOND SECURITY SYSTEM IN MUSEUMS

2.1.2 IR BASED FLAME SENSOR


A flame detector is a sensor designed to detect and respond to the presence of a flame
or fire. Responses to a detected flame depend on the installation, but can include sounding an
alarm, deactivating a fuel line (such as a propane or a natural gas line), and activating a fire
suppression system.

Fig 2.9:IR based flame sensor

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

DEPT OF ECE, DRKIST PG.NO:13


DIAMOND SECURITY SYSTEM IN MUSEUMS

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

Vcc 3.3 – 5V power supply

GND Ground

Dout Digital output

Applications of flame sensors


▪ Hydrogen stations
▪ Combustion monitors for burners
▪ Oil and gas pipelines
▪ Automotive manufacturing facilities
▪ Nuclear facilities
▪ Aircraft hangars
▪ Turbine enclosures

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.

2.1.3. BUZZER DRIVER CIRCUIT

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.

DEPT OF ECE, DRKIST PG.NO:14


DIAMOND SECURITY SYSTEM IN MUSEUMS

Vcc

BUZZER
CONTROLLER

PIN

GROUND

Fig 2.10: buzzer circuit

The operation of this circuit is as follows:

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.

DEPT OF ECE, DRKIST PG.NO:15


DIAMOND SECURITY SYSTEM IN MUSEUMS

BUZZER INTERFACING WITH THE MICROCONTROLLER:

CONTROLLER
DRIVER BUZZER
CIRCUIT

PIN

Fig no.2.11: interfacing buzzer with microcontroller block diagram

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,

DEPT OF ECE, DRKIST PG.NO:16


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

Main LED materials


The main semiconductor materials used to manufacture LEDs are:

• 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

2.1.5. ARDUINO UNO

The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It


has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a
16 MHz ceramic resonator, 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.

Fig 2.12 ARDUINO UNO

DEPT OF ECE, DRKIST PG.NO:17


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

• Stronger RESET circuit.

• AT mega 16U2 replace the 8U2.

"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)

DEPT OF ECE, DRKIST PG.NO:18


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

The power pins are as follows:

• 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.

• GND. Ground pins.

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).

DEPT OF ECE, DRKIST PG.NO:19


DIAMOND SECURITY SYSTEM IN MUSEUMS

2.1.5.4. Input and Output :

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:

There are a couple of other pins on the board:

• 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.

DEPT OF ECE, DRKIST PG.NO:20


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

2.1.5.6. Software Reset:

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.

DEPT OF ECE, DRKIST PG.NO:21


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

2.1.5.7. USB Over current Protection:

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.

2.1.5.8. Physical Characteristics:

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.

2.1.5.9. UART (Universal Asynchronous Receiver/Transmitter) :

FEATURES:

• 16 bytes Receive and Transmit FIFOs


• Register locations conform to ‘550 industry standard.
• Receiver FIFO trigger points at 1, 4, 8, and 14 bytes.
• Built-in fractional baud rate generator with auto bauding capabilities.
• Mechanism that enables software and hardware flow control implementation

DEPT OF ECE, DRKIST PG.NO:22


DIAMOND SECURITY SYSTEM IN MUSEUMS

2.1.5.10. PIN DESCRIPTION:

Fig 2.13 UART Description

2.1.5.11. REGISTER DESCRIPTION:

UART0 contains registers organized as shown in Table. The Divisor Latch


Access Bit (DLAB) is contained in U0LCR and enables access to the Divisor Latches

DEPT OF ECE, DRKIST PG.NO:23


DIAMOND SECURITY SYSTEM IN MUSEUMS

CHAPTER 3

POWER SUPPLY

3.1 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

Fig 3.1: power supply

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.

DEPT OF ECE, DRKIST PG.NO:24


DIAMOND SECURITY SYSTEM IN MUSEUMS

3.1.2 Step down transformer

Fig 3.2: step down tranformer

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.

DEPT OF ECE, DRKIST PG.NO:25


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

3.1.4 Bridge rectifier

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).

3.1.5 FILTER CIRCUIT

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.

DEPT OF ECE, DRKIST PG.NO:26


DIAMOND SECURITY SYSTEM IN MUSEUMS

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

factors like temperature changes. This problem can be eliminated by using a

regulator. A regulator will maintain the output constant even when changes at the

input or any other changes occur.

DEPT OF ECE, DRKIST PG.NO:27


DIAMOND SECURITY SYSTEM IN MUSEUMS

CHAPTER 4

ARDUINO CODING

4.1. Integrated Development Environment “IDE” For Arduino

Introduction to Arduino IDE


IDE stands for “Integrated Development Environment” :it is an official software introduced
by Arduino.cc, that is mainly used for editing, compiling and uploading the code in the
Arduino Device. Almost all Arduino modules are compatible with this software that is an
open source and is readily available to install and start compiling the code on the go.
In this article, we will introduce the Software, how we can install it, and make it ready for
developing applications using Arduino modules.
Arduino IDE Definition
1. Arduino IDE is an open source software that is mainly used for writing and compiling the
code into the Arduino Module.

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.

8. This environment supports both C and C++ languages.

DEPT OF ECE, DRKIST PG.NO:28


DIAMOND SECURITY SYSTEM IN MUSEUMS

How to get Arduino IDE


we can download the Software from Arduino main website. As I said earlier, the software is
available for common operating systems like Linux, Windows, and MACos,we select to
download the correct software version that is easily compatible with our operating system.
Details on IDE: The IDE environment is mainly distributed into three sections
1. Menu Bar

2. Text Editor

3. Output Pane

As we download and open the IDE software, it will appear like an image below.

Fig 4.1

DEPT OF ECE, DRKIST PG.NO:29


DIAMOND SECURITY SYSTEM IN MUSEUMS

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

Sketch – For compiling and programming

DEPT OF ECE, DRKIST PG.NO:30


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

The upward arrow is reserved for opening an existing Arduino project.

The downward arrow is used to save the current running code.


The button appearing on the top right corner is a Serial Monitor – A separate pop-up
window that acts as an independent terminal and plays a vital role for sending and receiving
the Serial Data. You can also go to the Tools panel and select Serial Monitor pressing
Ctrl+Shift+M all at once will open the Serial Monitor. The Serial Monitor will actually help
to debug the written Sketches where you can get a hold of how your program is operating.
Your Arduino Module should be connected to your computer by USB cable in order to
activate the Serial Monitor.
You need to select the baud rate of the Arduino Board you are using right now. For my
Arduino Uno Baud Rate is 9600, as you right the following code and click the Serial
Monitor, the output will show as the image below.

DEPT OF ECE, DRKIST PG.NO:31


DIAMOND SECURITY SYSTEM IN MUSEUMS

Fig 4.3

The main screen below show how to select a program from examples ie: Bink.cc

Fig 4.4

DEPT OF ECE, DRKIST PG.NO:32


DIAMOND SECURITY SYSTEM IN MUSEUMS

Example of Code in IDE Editor: blinking a LED on pin D13


void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second

Example 2: read analog value from pin A0


void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}

DEPT OF ECE, DRKIST PG.NO:33


DIAMOND SECURITY SYSTEM IN MUSEUMS

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

More or less, Arduino C language works similar to the regular C


language used for any embedded system microcontroller, however, there are
some dedicated libraries used for calling and executing specific functions on the
board.
Libraries
Libraries are very useful for adding the extra functionality into the Arduino
Module. There is a list of libraries you can add by clicking the Sketch button in
the menu bar and going to Include Library.

Fig 4.6

Suppose, I Include the EEPROM library, Temperature sensors


DHT11/22, LCD or I2C library it will appear on the text editor
as

DEPT OF ECE, DRKIST PG.NO:34


DIAMOND SECURITY SYSTEM IN MUSEUMS

#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.

Making Pins As Input or Output


The digitalRead and digitalWrite commands are used for addressing
and making the Arduino pins as an input and output respectively.
These commands are text sensitive i.e. you need to write them down the exact
way they are given like digitalWrite starting with small “d” and write with
capital “W”. Writing it down with Digitalwrite or digitalwritewon’t be calling
or addressing any function.
Example : if we want to use Pin D13 as output , the code will be;
pinMode(13, OUTPUT); followed by digitalWrite(13,HIGH);
If we want to use Pin D13 as input, the code will be : pinMode(13,
INPUT);followed by x=digitalRead(13);
Selecting Board of Arduino
In order to upload the sketch, we need to select the relevant board we
are using and the ports for that operating system. As we click the Tools on the
Menu, it will open like the figure below.
Just

DEPT OF ECE, DRKIST PG.NO:35


DIAMOND SECURITY SYSTEM IN MUSEUMS

Fig 4.7

Fig 4.8

DEPT OF ECE, DRKIST PG.NO:36


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

DEPT OF ECE, DRKIST PG.NO:37


DIAMOND SECURITY SYSTEM IN MUSEUMS

As we upload the code, TX and RX LEDs will blink on the board,


indicating the desired program is running successfully.

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

Example of test serial monitor on program test2.cc

Bootloader

As we go to the Tools section, we will find a bootloader at the end. It is very


helpful to burn the code directly into the controller, setting us free from buying
the external burner to burn the required code.

DEPT OF ECE, DRKIST PG.NO:38


DIAMOND SECURITY SYSTEM IN MUSEUMS

Fig 4.11

When we buy the new Arduino Module, the bootloader is already


installed inside the controller. However, if we intend to buy a controller and
put in the Arduino module, we need to burn the bootloader again inside the
controller by going to the Tools section and selecting the burn bootloader.
the Program Structure

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

DEPT OF ECE, DRKIST PG.NO:39


DIAMOND SECURITY SYSTEM IN MUSEUMS

known as a constructor, which is used to create an instance of the class. In


order to use the functions of the class, we need to declare an instance for it.
Setup()
Every Arduino sketch must have a setup function. This function
defines the initial state of the Arduino upon boot and runs only once.
Here we’ll define the following:
1. Pin functionality using the pinMode function
2. Initial state of pins
3. Initialize classes
4. Initialize variables
5. Code logic

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

DEPT OF ECE, DRKIST PG.NO:40


DIAMOND SECURITY SYSTEM IN MUSEUMS

Fig 4.12

Simulators for ARDUINO: in the next article we will see


some details on powerful simulators for Arduino, example: Autodesk
Eagle (recommended), Proteus , Autodesk Circuits, Virtronics Simulator for
Arduino , Electronify , Fritzing , VBB4Arduino – Virtual Breadboard for
Arduino.

DEPT OF ECE, DRKIST PG.NO:41


DIAMOND SECURITY SYSTEM IN MUSEUMS

Fig 4.13

Fig 4.14

DEPT OF ECE, DRKIST PG.NO:42


DIAMOND SECURITY SYSTEM IN MUSEUMS

4.2. ARDUINO CODING

int diamond=2;

int buzzer=4;

void setup() {

// put your setup code here, to run once:

pinMode(diamond,INPUT);

pinMode(buzzer,INPUT);

Serial.begin(9600);

void loop() {

// put your main code here, to run repeatedly:

int diamond_val=digitalRead(diamond);

//Serial.println(diamond_val);

if(diamond_val==0){

digitalWrite(buzzer,HIGH);

Serial.println("No Diamond");

delay(1000);

DEPT OF ECE, DRKIST PG.NO:43


DIAMOND SECURITY SYSTEM IN MUSEUMS

else{

digitalWrite(buzzer,LOW);

Serial.println("Diamod present");

delay(1000);

DEPT OF ECE, DRKIST PG.NO:44


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

DEPT OF ECE, DRKIST PG.NO:45


DIAMOND SECURITY SYSTEM IN MUSEUMS

• 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

DEPT OF ECE, DRKIST PG.NO:46


DIAMOND SECURITY SYSTEM IN MUSEUMS

CHAPTER 6
RESULT
6.1 RESULT

Fig 6.1 : circuit when diamond is placed

Fig 6.2 : circuit when diamond is missing

DEPT OF ECE, DRKIST PG.NO:47


DIAMOND SECURITY SYSTEM IN MUSEUMS

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.

6.3 FUTURE SCOPE


The limitations can be overcome by using IR BASED FLAME circuit in place
of IR sensor module, in which range between receiver and transmitter module
can be increased. The main drawback with the present module is that it can be
blocked by common objects i.e., placing another object in line of sight of
sensor, this can be overcome by using laser module and IR BASED FLAME
circuit.

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.

DEPT OF ECE, DRKIST PG.NO:48


DIAMOND SECURITY SYSTEM IN MUSEUMS

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/

DEPT OF ECE, DRKIST PG.NO:49

You might also like