You are on page 1of 50

CHAPTER 1

INTRODUCTION

1.1 OVER VIEW OF EMBEDDED SYSTEM:

An embedded system is a special-purpose system in which the computer is


completely encapsulated by or dedicated to the device or system it controls. Unlike a
general-purpose computer, such as a personal computer, an embedded system
performs one or a few predefined tasks, usually with very specific requirements. Since
the system is dedicated to specific tasks, design engineers can optimize it, reducing
the size and cost of the product. Embedded systems are often mass-produced,
benefiting from economies of scale.

Personal digital assistants (PDAs) or handheld computers are generally


considered embedded devices because of the nature of their hardware design, even
though they are more expandable in software terms. This line of definition continues
to blur as devices expand. With the introduction of the OQO Model 2 with the
Windows XP operating system and ports such as a USB port

Fig.No 1.1 Embedded system

1
both features usually Belong to "general purpose computers", the line of
nomenclature blurs even more.

Physically, embedded systems ranges from portable devices such as digital watches
and MP3 players, to large stationary installations like traffic lights, factory
controllers, or the systems controlling nuclear power plants.

In terms of complexity embedded systems can range from very simple with a
single microcontroller chip, to very complex with multiple units, peripherals and
networks mounted inside a large chassis or enclosure.

1.1.1 REQUIREMENTS OF TYPICAL EMBEDDED SYSTEMS:

EX: CHEMICAL PLANT: Consider a chemical plant. No. of temperatures have to be


measured &based on values certain operations are performed, such as opening a value.

INPUT: - From sensors which measure temperatures.

OUTPUT: signal that controls a value.

Ex: MOBILE PHONES: The processor of a mobile phone needs to carry out a
great deal of communications protocol processing to make "TELEPHONECAL.

Fig. No: 1.2 Typical embedded system organization

2
1.1.2 APPLICATIONS OF EMBEDDED SYSTEMS:

Some widely used applications of embedded systems are listed below:

Automatic teller machines


Cellular telephones.
Computer network.
Disc drives.
Thermo stats.
Sprinklers.
Security monitoring systems.
Hand held calculations.
House-hold appliances.
Inertial guided systems.
Flight control hardware / software.
Medical equipment.
1.1.3 OBJECTIVE

To monitor the sand milling and sand theft that occur in day-to-day life using
RFID Reader and Tag, IR Sensor, Laser diode, LDR Sensor, GSM Modem .

1.2 LITERATURE SURVEY

1.2.1 Photosensitive Security System for Theft Detection and


Control using GSM technology
P. Satya Ravi Teja , V. Kushal, A. Sai Srikar, and K. Srinivasan

SPACES-2015, Dept of ECE, KL UNIVERSITY

This paper illustrates the design and development of a theft control system for
security lockers, homes, bank lockers, jewelry outlets, etc. The proposed system
consists of an LDR (Light Dependent Resistor) based sensor which acts as an
electronic eye for detecting the theft or attempt, and a signaling procedure based on
3
SMS using GSM (Global Systems for Mobile communications) technology. The
GSM based communication helps the owner and concerned authorities to take
necessary and timely action in order to prevent the theft. The LDR circuit is
interfaced using a relay circuit with an Arduino microcontroller board. Efficacy of
the proposed system can be seen in its immediate intimation regarding the incident.
The proposed designed system is very effective and inexpensive.

1.2.1 FENCE to prevent deforestation using An Event Based Sensor


Network

Chethan.K.P, Aravind.K.G, Srinivasan Jayaraman and Balamuralidhar P

2010 International Conference on Chemistry and Chemical Engineering (ICCCE


2010)

Research in wireless sensor networks is ongoing at a large scale for


applications deployable world-wide like forest monitoring etc. To design,
deploy and evaluate novel wireless systems, large and critical application
requires a substantial effort. One of the major applications of wireless sensor
networks is in event detection.

The main objective of this paper is to monitor the forest tree theft and alert
using wireless sensor networks. In forest monitoring application, event
occurrence is rare, so the communication node is kept in at sleep mode.
Whenever an event occurrence has been detected by sensor, it triggers the
communication node. Subsequently, the event is reported to the sink node as
quickly as possible and an alert is generated. In addition to this, the second
objective of this work is power harvesting and power managing that has been
achieved using event detection technique.

CHAPTER 2

4
LDR SENSOR
PROPOSED SYSTEM

In the proposed system we monitor sand mining occurred daily by transportation,

to overcome this problem. We fix RFID reader in the check post. It is used to sense

LASER DIODE
RFID TAG 2 of the RFID tag is merely 8-12
RFID tag fixed in the vehicle. The reading distance

cm that is used to identify the unauthorized vehicle.

The vehicle consists of two types :

Authorized vehicle which is permitted by the government


Unauthorized vehicle which has no permit.

The RFID reader is used to check whether the vehicle is authorized or not at the

same time RFID is used to perform counting of authorized lorry transportation

with sand . IR sensor is used to detect the vehicle contains a load or not. The
RFID TAG 3

message is sent to higher officials, media persons by using GSM technology. Laser

diode is used to monitor the sand mill whether the vehicle is entering in the

incorrect way.

2.1 BLOCK DIAGRAM SAND THEFT MONITORING

5
IR SENSOR

UART

RFID
READER
Fig.No:1.3 block diagram of sand theft monitoring system

2.2 HARDWARE SPECIFICATION

Embedded Processor : ATMEGA-8

READER
Sensor : IR Sensor, LDR Sensor, Laser Diode

Intimation : GSM Modem

Alert System : Mobile Phone

RFID TAG 1 CHAPTER 3

HARDWARE REQUIREMENT

3.1 MICROCONTROLLER ATMEGA-8

3.1.1 INTRODUCTION OF ATMEGA-8

The Atmega-8 is a low-power CMOS 8-bit microcontroller based on the AVR


RISC architecture. By executing powerful instructions in a single clock cycle, the
Atmega-8 achieves throughputs approaching 1 MIPS per MHz, allowing the
system designer to optimize power consumption versus processing speed. The
AVR core combines a rich instruction set with 32 general purpose working
registers.

All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU),
allowing two independent registers to be accessed in one single instruction
executed in one clock cycle. The resulting architecture is more code efficient while
achieving throughputs up to ten times faster than conventional CISC
microcontrollers.

The Atmega-8 provides the following features: 8K bytes of In-System


Programmable Flash with Read-While-Write capabilities, 512 bytes of EEPROM,
1K byte of SRAM, 23 general purpose I/O lines, 32 general purpose working
MICROCONTROLLER
registers, three flexible Timer/Counters with compare modes, internal and external
16X2 LCD DISPLAY

GSM MODEM 7
interrupts, a serial programmable USART, a byte oriented Two-wire Serial
Interface, a 6-channel ADC (eight channels in TQFP and MLF packages) with 10-
bit accuracy, a programmable Watchdog Timer with Internal Oscillator, an SPI
serial port, and five software selectable power saving modes. The Idle mode stops
the CPU while allowing the SRAM, Timer/Counters, SPI port, and interrupt
system to continue functioning. The Power-down mode saves the register contents
but freezes the Oscillator, disabling all other chip functions until the next Interrupt
or Hardware Reset. In Power-save mode, the asynchronous timer continues to run,
allowing the user to maintain a timer base while the rest of the device is sleeping.
The ADC Noise Reduction mode stops the CPU and all I/O modules except
asynchronous timer and ADC, to minimize switching noise during ADC
conversions. In Standby mode, the crystal/resonator Oscillator is running while the
rest of the device is sleeping. This allows very fast start-up combined with low-
power consumption.
3.1.3 FEATURES OF ATMEGA-8

8-bit microcontroller
High-performance, Low-power AVR 8-bit Microcontroller
Advanced RISC Architecture
130 Powerful Instructions Most Single-clock Cycle Execution
32 x 8 General Purpose Working Registers
Fully Static Operation
Up to 16 MIPS Throughput at 16 MHz
On-chip 2-cycle Multiplier
Nonvolatile Program and Data Memories
8K Bytes of In-System Self-Programmable Flash
Endurance: 10,000 Write/Erase Cycles
Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
512 Bytes EEPROM

8
Endurance: 100,000 Write/Erase Cycles
1K Byte Internal SRAM
Programming Lock for Software Security
Peripheral Features
Two 8-bit Timer/Counters with Separate Prescaler, one Compare
Mode
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode,
and Capture Mode
Real Time Counter with Separate Oscillator
Three PWM Channels

8-channel ADC in TQFP and MLF package


Eight Channels 10-bit Accuracy
6-channel ADC in PDIP package
Eight Channels 10-bit Accuracy
Byte-oriented Two-wire Serial Interface
Programmable Serial USART
Master/Slave SPI Serial Interface
Programmable Watchdog Timer with Separate On-chip Oscillator
On-chip Analog Comparator
Special Microcontroller Features
Power-on Reset and Programmable Brown-out Detection
Internal Calibrated RC Oscillator
External and Internal Interrupt Sources
Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-
down, and Standby
I/O and Packages
23 Programmable I/O Lines
28-lead PDIP, 32-lead TQFP, and 32-pad MLF
Operating Voltages
2.7 - 5.5V (Atmega-8)
4.5 - 5.5V (Atmega-8)
Speed Grades
0 - 8 MHz (Atmega-8)

9
0 - 16 MHz (Atmega-8)
Power Consumption at 4 Mhz, 3V, 25C
Active: 3.6 mA
Idle Mode: 1.0 mA
Power-down Mode: 0.5 A

3.1.4 ATMEGA-8 DESCRIPTION

This section discusses the AVR core architecture in general. The main function of
the CPU core is to ensure correct program execution. The CPU must therefore be
able to access memories, perform calculations, control peripherals, and handle
interrupts.

In order to maximize performance and parallelism, the AVR uses a Harvard


architecture with separate memories and buses for program and data. Instructions
in the Program memory are executed with a single level pipelining. While one
instruction is being executed, the next instruction is pre-fetched from the Program
memory. This concept enables instructions to be executed in every clock cycle. The
Program memory is In- System Reprogrammable Flash memory.

The fast-access Register File contains 32 x 8-bit general purpose


working registers with a single clock cycle access time. This allows
single-cycle Arithmetic Logic Unit (ALU) operation. In a typical ALU
operation, two operands are output from the Register File, the
operation is executed, and the result is stored back in the Register File
in one clock cycle.

10
3.1.5 ARCHITECTURE

11
Fig.
No:3.1 Architecture of ATMEGA-8

Six of the 32 registers can be used as three 16-bit indirect address register pointers
for Data Space addressing enabling efficient address calculations. One of these
address pointers can also be used as an address pointer.

The ALU supports arithmetic and logic operations between registers or between a
constant and a register. Single register operations can also be executed in the ALU.
After an arithmetic operation, the Status Register is updated to reflect information
about the result of the operation.

12
The Program flow is provided by conditional and unconditional jump and call
instructions, able to directly address the whole address space. Most AVR
instructions have a single 16-bit word format. Every Program memory address
contains a 16- or 32-bit instruction.

Program Flash memory space is divided in two sections, the Boot program section
and the Application program section. Both sections have dedicated Lock Bits for
write and read/write protection. The SPM instruction that writes into the
Application Flash memory section must reside in the Boot program section.

During interrupts and subroutine calls, the return address Program Counter (PC) is
stored on the Stack. The Stack is effectively allocated in the general data SRAM,
and consequently the Stack size is only limited by the total SRAM size and the
usage of the SRAM. All user programs must initialize the SP in the reset routine
(before subroutines or interrupts are executed). The Stack Pointer SP is read/write
accessible in the I/O space. The data SRAM can easily be accessed through the
five different addressing modes supported in the AVR architecture.

The memory spaces in the AVR architecture are all linear and regular memory
maps. A flexible interrupt module has its control registers in the I/O space with an
additional global interrupt enable bit in the Status Register. All interrupts have a
separate Interrupt Vector in the Interrupt Vector table. The interrupts have priority
in accordance with their Interrupt Vector position. The lower the Interrupt Vector
address, the higher the priority. The I/O memory space contains 64 addresses for
CPU peripheral functions as Control Registers, SPI, and other I/O functions. The

13
I/O Memory can be accessed directly, or as the Data Space locations following
those of the Register File, 0x20 - 0x5F.

ARITHMATIC AND LOGIC UNIT(ALU)

The high-performance AVR ALU operates in direct connection with all the 32
general purpose working registers. Within a single clock cycle, arithmetic
operations between general purpose registers or between a register and an
immediate are executed. The ALU operations are divided into three main
categories arithmetic, logical, and bit-functions. Some implementations of the
architecture also provide a powerful multiplier supporting both signed/unsigned
multiplication and fractional format.

STATUS REGISTER

The Status Register contains information about the result of the most recently
executed arithmetic instruction. This information can be used for altering program
flow in order to perform conditional operations. Note that the Status Register is
updated after all ALU operations, as specified in the Instruction Set Reference.
This will in many cases remove the need for using the dedicated compare
instructions, resulting in faster and more compact code.

The Status Register is not automatically stored when entering an interrupt routine
and restored when returning from an interrupt. This must be handled by software.

GENERAL PURPOSE REGISTER

14
The Register File is optimized for the AVR Enhanced RISC instruction set. In order
to achieve the required performance and flexibility, the following input/output
schemes are supported by the Register File:

One 8-bit output operand and one 8-bit result input.


Two 8-bit output operands and one 8-bit result input.
Two 8-bit output operands and one 16-bit result input.
One 16-bit output operand and one 16-bit result input.

STACK POINTER

The Stack is mainly used for storing temporary data, for storing local variables and
for storing return addresses after interrupts and subroutine calls. The Stack Pointer
Register always points to the top of the Stack. Note that the Stack is implemented
as growing from higher memory locations to lower memory locations. This implies
that a Stack PUSH command decreases the Stack Pointer.

The Stack Pointer points to the data SRAM Stack area where the Subroutine and
Interrupt Stacks are located. This Stack space in the data SRAM must be defined
by the program before any subroutine calls are executed or interrupts are enabled.
The Stack Pointer must be set to point above 0x60. The Stack Pointer is
decremented by one when data is pushed onto the Stack with the PUSH
instruction, and it is decremented by two when the return address is pushed onto
the Stack with subroutine call or interrupt.

The Stack Pointer is incremented by one when data is popped from the Stack with
the POP instruction, and it is incremented by two when address is popped from the
Stack with return from subroutine RET or return from interrupt RETI.

15
The AVR Stack Pointer is implemented as two 8-bit registers in the I/O space. The
number of bits actually used is implementation dependent. Note that the data space
in some implementations of the AVR architecture is so small that only SPL is
needed. In this case, the SPH Register will not be present

3.1.6 PIN DIAGRAM(ATMEGA-8 )

Fi
g.No:3.2 ATMEGA-16PU

PIN DESCRIPTION
16
VCC
Digital supply voltage.
GND
Ground

Port B (PB7..PB0)
XTAL1/XTAL2/TOSC1/TOSC2

Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port B output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, Port B pins that are externally
pulled low will source current if the pull-up resistors are activated. The Port B pins
are tri-stated when a reset condition becomes active, even if the clock is not
running.

Depending on the clock selection fuse settings, PB6 can be used as input to the
inverting Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the
inverting Oscillator amplifier.

If the Internal Calibrated RC Oscillator is used as chip clock source, PB7..6 is used
as TOSC2..1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is
set.

Port C (PC5..PC0)
Port C is an 7-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port C output buffers have symmetrical drive characteristics with
17
both high sink and source capability. As inputs, Port C pins that are externally
pulled low will source current if the pull-up resistors are activated. The Port C pins
are tri-stated when a reset condition becomes active, even if the clock is not
running.

PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the
electrical characteristics of PC6 differ from those of the other pins of Port C. If the
RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on
this pin for longer than the minimum pulse length will generate a Reset, even if the
clock is not running. Shorter pulses are not guaranteed to generate a Reset.

Port D (PD7..PD0)

Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port D output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, Port D pins that are externally
pulled low will source current if the pull-up resistors are activated. The Port D pins
are tri-stated when a reset condition becomes active, even if the clock is not
running.

RESET
Reset input. A low level on this pin for longer than the minimum pulse length will
generate a reset, even if the clock is not running. Shorter pulses are not guaranteed
to generate a reset.
AVCC

18
AVCC is the supply voltage pin for the A/D Converter, Port C (3..0), and ADC
(7..6). It should be externally connected to VCC, even if the ADC is not used. If
the ADC is used, it should be connected to VCC through a low-pass filter. Note
that Port C (5..4) use digital supply voltage, VCC.
AREF
AREF is the analog reference pin for the A/D Converter.

ADC7..6 (TQFP and MLF Package Only)


In the TQFP and MLF package, ADC7..6 serve as analog inputs to the A/D
converter. These pins are powered from the analog supply and serve as 10-bit ADC
channels.

3.2 FUNCTION OF RFID TECHNOLOGY

RFID stands for radio frequency identification. It is an automatic identification


technology to identify objects by using invisible radio waves. Instead of optically
scanning bar codes on a label, RFID uses radio waves to capture data from tags.
One of the key characteristics of RFID is that it does not require the tag to be seen
to read the data stored in it. This means that the tag can be placed either inside or
outside. To accomplish this, 2 components are essential: reader and a tag.

3.2.1 BASIC ELEMENTS OF RFID

1.Tag
2.Readers
TAG:
19
A tag, also called as transponder, is made of a micro-chip with a coiledantenna.
The tag can be programmed with unique information about the object and hence
can be used to identify it. RFID tags can be encased in hardened plastic coatings
making them extremely durable.

RFID tags can store large amounts of data. High end RFID tags can store up to 1
megabyte of data. Some RFID tags supports read/write operations, enabling real
time information updates as the tagged item moves from one location to another.

3.2.2 TYPES OF RFID TAG

1. PASSIVE

2. ACTIVE

PASSIVE:

Passive RFID tags have no internal power supply. The minute


electrical current induced in the antenna by the incoming radio frequency signal
provides just enough power for the CMOS integrated circuit in the tag to power up
and transmit a response. Most passive tags signal by backscattering the carrier
signal from the reader. This means that the antenna has to be designed to both
collect power from the incoming signal and also to transmit the outbound
backscatter signal. The response of a passive RFID tag is not necessarily just an ID
number; the tag chip can contain non-volatile EEPROM for storing data.

3.2.3 READERS:

The RFID reader is designed for fast and easy system integration
without losing performance, functionality or security. The RFID reader consists of
a real time processor, operating system, virtual portable memory, and

20
transmitter/receiver unit in one small self-contained module that is easily installed
in the ceiling or in any other convenient location. A reader, also called interrogator,
comprises of a transmitter, receiver, control module and a transceiver. The
transceiver acts as a communication link between the person and the controlling
PC. A reader should have an attached antenna

which is used to transmit and receive the RF signal. Each reader has associated
software that allows the user to read and program the tags.

3.2.4 THE RFID SYSTEM

An RFID system may consist of several components: tags/transponders, tag


readers, antenna, middleware/application software.

The purpose of an RFID system is to enable data to be transmitted by a mobile


device, called a tag, which is read by an RFID reader and processed according to
the needs of a particular application. The data transmitted by the tag may provide
identification or location information, or specifics about the product tagged, such
as price, color, date of purchase, etc. The use of RFID in tracking and access
applications first appeared in 1932, to identify aircraft as friendly or unfriendly
("identify friend or foe" (IFF)). RFID quickly gained attention because of its ability
to track moving objects. As the technology is refined, more pervasive and possibly
invasive uses for RFID tags are in the works.

In a typical RFID system, individual objects are equipped


with a small, inexpensive tag. The tag contains a transponder with a digital
memory chip that is given a unique electronic product code. The interrogator, an
antenna packaged with a transceiver and decoder, emits a signal activating the

21
RFID tag so it can read and write data to it. When an RFID tag passes through the
electromagnetic zone, it detects the reader's activation signal. The reader decodes
the data encoded in the tag's integrated circuit (silicon chip) and the data is passed
to the host computer. The application software on the host processes the data, and
may perform various filtering operations to reduce the numerous often redundant
reads of the same tag to a smaller and more useful data set.

3.2.5 OPERATING PRINCIPLES OF RFID:

There is a huge variety of different operating principles for


RFID systems. The picture below provides a short survey of known operation
principles. The most important principle - inductive coupling is described below

INDUCTIVE COUPLING

An inductively coupled transponder comprises of an


electronic data carrying device, usually a single microchip and a large area coil that
functions as an antenna. Inductively coupled transponders are almost always
operated passively. This means that all the energy needed for the operation of the
microchip has to be provided by the reader. For this purpose, the reader's antenna
coil generates a strong, high frequency electro-magnetic field, which penetrates the
cross-section of the coil area and the area around the coil. Because the wavelength
of the frequency range used

(< 135 kHz: 2400 m, 13.56 MHz: 22.1 m) is several times greater than the distance
between the reader's antenna and the transponder, the electro-magnetic field may
be treated as a simple magnetic alternating field with regard to the distance
between transponder and antenna .

22
A small part of the emitted field penetrates the antenna coil of
the transponder, which is some distance away from the coil of the reader. By
induction, a voltage Ui is generated in the transponder's antenna coil. This voltage
is rectified and serves as the power supply for the data carrying device (microchip).
A capacitor C1 is connected in parallel with the reader's antenna coil, the
capacitance of which is selected such that it combines with the coil inductance of
the antenna coil to form a parallel resonant circuit, with a resonant frequency that
corresponds with the transmission frequency of the reader. Very high currents are
generated in the antenna coil of the reader by resonance step-up in the parallel
resonant circuit, which can be used to generate the required field strengths for the
operation of the remote transponder.

The antenna coil of the transponder and the capacitor C1 to


form a resonant circuit tuned to the transmission frequency of the reader. The
voltage U at the transponder coil reaches a maximum due to resonance step-up in
the parallel resonant circuit.

23
Fig.No: 3.3 inductive coupling

As described above, inductively coupled systems are based upon a transformer-


type coupling between the primary coil in the reader and the secondary coil in the
transponder. This is true when the distance between the coils does not exceed, so
that the transponder is located in the 0.16 near field of the transmitter antenna.

If a resonant transponder (i.e. the self-resonant frequency of the transponder


corresponds with the transmission frequency of the reader) is placed within the
magnetic alternating field of the reader's antenna, then this draws energy from the
magnetic field. This additional power consumption can be measured as voltage
drop at the internal resistance in the reader antennae through the supply current to
the reader's antenna. The switching on and off of a load resistance at the
transponder's antenna therefore effects voltage changes at the reader's antenna and
thus has the effect of an amplitude modulation of the antenna voltage by the remote
transponder. If the switching on and off of the load resistor is controlled by data,
then this data can be transferred from the transponder to the reader. This type of
data transfer is called load modulation.

To reclaim the data in the reader, the voltage measured at the


reader's antenna is rectified. This represents the demodulation of an amplitude
modulated signal.

Fig.No: 3.4 sample circuit of the power supply and load modulator in a
transponder

24
If
the

additional load resistor in the transponder is switched on and off at a very high
elementary frequency fH, then two spectral lines are created at fa distance of H
around the transmission frequency of the reader, and these can be easily detected
(however fH must be less than fREADER). In the terminology of radio technology
the new elementary frequency is called a subcarrier. Data transfer is by the ASK,
FSK or PSK modulation of the subcarrier in time with the data flow. This
represents an amplitude modulation of the subcarrier.

3.2.6 ADVANTAGES OF RFID:

The advantages of RFID are:

Large amounts of data can be transmitted at very high speeds


Manual work is almost eliminated
Facilitates error free mechanism
Highly reliable

25
3.2.7 RFID READER NSK EDK - 125 -TTL

Fig no: 3.5 RFID READER NSK EDK - 125 -TTL

The NSK125 series RFID Proximity OEM Reader Module has a built-in antenna in
minimized form factor. It is designed to work on the industry standard carrier
frequency of 125 kHz.

This LF reader module with an internal or an external antenna facilitates


communication with Read-Only transponderstype UNIQUE or TK5530 via the
air interface. The tag data is sent to the host systems via the wired communication

interface with a protocol selected from the module Both TTland Wiegend Protocol

The LF module is best suited for applications in Access Control,Time and


Attendance, Asset Management, Handheld Readers,Immobilizers, and other RFID
enabled applications.

CONNECTION DETAILS

Connect - 5 volts and GND

TX - TTL output Can be directly connected to Microcontroller ( To covert TTL to


UART use Converter Board )

D0 & D1 - is used for wigend protocol

Features

26
Output- TTL or Wigand26

Plug-and-Play, needs +5V to become a reader

Buzzer indicates tag reading operation

Compact size and cost-effective

3.3 FUNCTION OF IR SENSOR

Infrared radiation is the portion of electromagnetic spectrum having


wavelengths longer than visible light wavelengths, but smaller than microwaves,
i.e., the region roughly from 0.75m to 1000 m is the infrared region. Infrared
waves are invisible to human eyes. The wavelength region of 0.75m to 3 m is
called near infrared, the region from 3 m to 6 m is called mid infrared and the
region higher than 6 m is called far infrared. (The demarcations are not rigid;
regions are defined differently by many).

Fig no: 3.6 IR sensor

3.3.1 TYPES OF IR SENSORS

There are different types of IR sensors working in various regions of the IR


spectrum but the physics behind "IR sensors" is governed by three laws:

1. Plancks radiation law:


Every object at a temperature T not equal to 0 K emits radiation. Infrared
radiant energy is determined by the temperature and surface condition of an object.
Human eyes cannot detect differences in infrared energy because they are primarily
sensitive to visible light energy from 400 to 700 nm. Our eyes are not sensitive to
the infrared energy.

2. Stephan Boltzmann Law

27
The total energy emitted at all wavelengths by a black body is related to the
absolute temperature as

3. Weins Displacement Law


Weins Law tells that objects of different temperature emit spectra that peak
at different wavelengths. It provides the wavelength for maximum spectral radiant
emittance for a given temperature.
The relationship between the true temperature of the black body and its peak
spectral exitance or dominant wavelength is described by this law. The world is not
full of black bodies; rather it comprises of selectively radiating bodies like rocks,
water, etc. and the relationship between the two is given by emissivity (E).

Emissivity depends on object colour, surface roughness, moisture content,


degree of compaction, field of view, viewing angle & wavelength.

3.3.2 ELEMENTS OF INFRARED DETECTION SYSTEM


A typical system for detecting infrared radiation is given in the following block
diagram :

28
Fig no: 3.7 block diagram infrared detection system
1.Infrared Source
All objects above 0 K radiate infrared energy and hence are infrared sources.
Infrared sources also include blackbody radiators, tungsten lamps, silicon carbide,
and various others. For active IR sensors, infrared Lasers and LEDs of specific IR
wavelengths are used as IR sources.

2.Transmission Medium
Three main types of transmission medium used for Infrared transmission are
vacuum, the atmosphere, and optical fibres.
The transmission of IR radiation is affected by presence of CO2, water vapour
and other elements in the atmosphere. Due to absorption by molecules of water
carbon dioxide, ozone, etc. the atmosphere highly attenuates most IR wavelengths
leaving some important IR windows in the electromagnetic spectrum; these are
primarily utilized by thermal imaging/ remote sensing applications.
Medium wave IR (MWIR:3-5 m)
Long wave IR (LWIR:8-14 m)

Fig no: 3.8 transmission medium


Choice of IR band or a specific wavelength is dictated by the technical
requirements of a specific application.

3.Optical Components.
29
Often optical components are required to converge or focus infrared
radiations, to limit spectral response, etc. To converge/focus radiations, optical
lenses made of quartz, CaF2, Ge and Si, polyethylene Fresnel lenses, and mirrors
made of Al, Au or a similar material are used. For limiting spectral responses, band
pass filters are used. Choppers are used to pass/ interrupt the IR beams.
4.Infrared detectors.
Various types of detectors are used in IR sensors. Important specifications of
detectors are
Photosensitivity or Responsively
Responsively is the Output Voltage/Current per watt of incident energy. Higher the
better.
Noise Equivalent Power (NEP)
NEP represents detection ability of a detector and is the amount of incident light
equal to intrinsic noise level of a detector.
Directivity (D*: D-star)
D* is the photosensitivity per unit area of a detector. It is a measure of S/N ratio of
a detector. D* is inversely proportional to NEP. Larger D* indicates better sensing
element.
In addition, wavelength region or temperature to be measured, response
time, cooling mechanism, active area, no of elements, package, linearity, stability,
temperature characteristics, etc. are important parameters which need attention
while selecting IR detectors.
5. Signal Processing
Since detector outputs are typically very small, preamplifiers with associated
circuitry are used to further process the received signals.
3.3.3 IR SENSOR CIRCUIT:

30
Fig no:3.9 IR sensor circuit

3.4 FUNCTION OF LASER DIODE THEORY AND OPERATION

Laser diodes and light emitting diodes have a number of elements in


common with respect to their theory of operation. However the laser diode theory
of operation incorporates more elements, taking in additional processes to provide
the coherent light it produces.

While there are many different forms of laser diode, the basis of the laser
diode theory of operation is very similar - the basic precepts remain the same,
although there are a number of minor differences in the way they are implemented.

Laser diode theory basics

There are three main processes in semiconductors that are associated with light:

Light absorption: Absorption occurs when light enters a semiconductor


and its energy is transferred to the semiconductor to generate additional free
electrons and holes. This effect is widely used and enables devices like to
photo-detectors and solar cells to operate.

Spontaneous emission: The second effect known as spontaneous emission


occurs in LEDs. The light produced in this manner is what is termed
incoherent. In other words the frequency and phase are random, although the
light is situated in a given part of the spectrum.

31
Stimulated emission: Stimulated emission is different. A light photon
entering the semiconductor lattice will strike an electron and release energy
in the form of another light photon. The way in which this occurs releases
this new photon of identical wavelength and phase. In this way the light that
is generated is said to be coherent.

The key to the laser diode operation occurs at the junction of the highly doped p
and n type regions. In a normal p-n junction current flows across the p-n junction.
This action can occur because the holes from the p-type region and the electrons
from the n-type region combine. With an electromagnetic wave (in this instance
light) in passing through the laser diode junction diode junction it is found that the
photo-emission process occurs. Here the photons release further photons of light
occurs when they strike electrons during the recombination of holes and electrons
occurs.

Naturally there is some absorption of the light, resulting in the generation of holes
and electrons but there is an overall gain in level.

The structure of the laser diode creates an optical cavity in which the light photons
have multiple reflections. When the photons are generated only a small number are
able to leave the cavity. In this way when one photon strikes an electron and
enables another photon to be generated the process repeats itself and the photon
density or light level starts to build up. It is in the design of better optical cavities
that much of the current work on lasers is being undertaken. Ensuring the light is
properly reflected is the key to the operation of the device.

3.5 FUNCTION OF LIGHT DEPENDENT RESISTOR (LDR

32
Fig no :3.10 The symbol for a photo resistor

A photoresistor or light dependent resistor (LDR) is


a resistor whose resistance decreases with increasing incident light intensity; in
other words, it exhibits photoconductivity. photoelectric or light sensing device are
used in almost any branch of industry for control, safety, amusement and sound
reproduction and inspection and measurement.

A photoresistor is made of a high resistance semiconductor. If light falling on the


device is of high enough frequency, photons absorbed by the semiconductor give
bound electrons enough energy to jump into the conduction band. The resulting
free electron (and its hole partner) conduct electricity, thereby lowering resistance.

A photoelectric device can be either intrinsic or extrinsic. An intrinsic


semiconductor has its own charge carriers and is not an efficient semiconductor,
for example, silicon. In intrinsic devices the only available electrons are in
the valence band, and hence the photon must have enough energy to excite the
electron across the entire bandgap. Extrinsic devices have impurities, also
called dopants, added whose ground state energy is closer to the conduction band;
since the electrons do not have as far to jump, lower energy photons (that is, longer
wavelengths and lower frequencies) are sufficient to trigger the device. If a sample
of silicon has some of its atoms replaced by phosphorus atoms (impurities), there

33
will be extra electrons available for conduction. This is an example of an extrinsic
semiconductor. Photoresistors are basically photocells.

Fig.No: 3.11 Photocells


The internal components of a photoelectric control for a typical
Americanstreetlight. The photoresistor is facing rightwards, and controls whether
current flows through the heater which opens the main power contacts. At night,
the heater cools, closing the power contacts, energizing the street light.

3.5.1 SPECIFICATION AND MODEL

Fig no: 3.12 Light dependent resistor

There are many types of photoresistors, with different specifications and models.
Photoresistors can be coated with or packaged in different materials that vary the
resistance, depending on the use for each LDR.

34
3.5.2 APPLICATIONS

Photoresistors come in many types. Inexpensive cadmium sulphide cells can be


found in many consumer items such as camera light meters, street lights, clock
radios, alarm devices, outdoor clocks, solar street lamps and solar road studs, etc.

They are also used in some dynamic compressors together with a


small incandescent lamp or light emitting diode to control gain reduction and are
also used in bed lamps, etc.

Lead sulphide (PbS) and indium antimonide (InSb) LDRs (light dependent
resistor) are used for the mid infrared spectral region. Ge:Cu photoconductors are
among the best far-infrared detectors available, and are used for infrared
astronomy and infrared spectroscopy.

3.6 FUNCTION OF GSM/GPRS MODEM

GSM/GPRS MODEM is a class of wireless MODEM devices that are


designed for communication of a computer with the GSM and GPRS network. It
requires a SIM (Subscriber Identity Module) card just like mobile phones to
activate communication with the network. Also they have IMEI (International
Mobile Equipment Identity) number similar to mobile phones for their
identification. A GSM/GPRS MODEM can perform the following operations:

1. Receive, send or delete SMS messages in a SIM.

2. Read, add, search phonebook entries of the SIM.

3. Make, Receive, or reject a voice call.

35
Fig no: 3.1.2 GSM/GPRS MODEM

The MODEM needs AT commands, for interacting with processor or


controller, which are communicated through serial communication. These
commands are sent by the controller/processor. The MODEM sends back a result
after it receives a command. Different AT commands supported by the MODEM
can be sent by the processor/controller/computer to interact with the GSM and
GPRS cellular network.

3.6.1 AT COMMANDS:

AT commands are used to control MODEMs. AT is the abbreviation for


Attention. These commands come from Hayes commands that were used by the
Hayes smart modems. The Hayes commands started with AT to indicate the
attention from the MODEM. The dial up and wireless MODEMs (devices that
involve machine to machine communication) need AT commands to interact with a
computer. These include the Hayes command set as a subset, along with other
extended AT commands.

AT commands with a GSM/GPRS MODEM or mobile phone can be used to


access following information and services:

1. Information and conFig.ureuration pertaining to mobile device or


MODEM and SIM card.

2. SMS services.

36
3. MMS services.

4. Fax services.

5. Data and Voice link over mobile network.

The Hayes subset commands are called the basic commands and the commands
specific to a GSM network are called extended AT commands.

Explanation of commonly used AT commands:

1) AT - This command is used to check communication between the module


and the computer.

For example,

AT

OK

The command returns a result code OK if the computer (serial port) and
module are connected properly. If any of module or SIM is not working, it would
return a result code ERROR.

2) +CMGF - This command is used to set the SMS mode. Either text or PDU
mode can be selected by assigning 1 or 0 in the command.

SYNTAX: AT+CMGF=<mode>

0: for PDU mode

1: for text mode

The text mode of SMS is easier to operate but it allows limited features of SMS.
The PDU (protocol data unit) allows more access to SMS services but the
operator requires bit level knowledge of TPDUs. The headers and body of SMS are
accessed in hex format in PDU mode so it allows availing more features.

For example,

37
AT+CMGF=1

OK

2) +CMGW - This command is used to store message in the SIM.

SYNTAX: AT+CMGW= Phone number> Message to be stored Ctrl+z

As one types AT+CMGW and phone number, > sign appears on next line where
one can type the message. Multiple line messages can be typed in this case. This is
why the message is terminated by providing a Ctrl+z combination. As Ctrl+z are
pressed, the following information response is displayed on the screen.

+CMGW: Number on which message has been stored.

4) +CMGS - This command is used to send a SMS message to a phone number.

SYNTAX: AT+CMGS= serial number of message to be send.

As the command AT+CMGS and serial number of message are entered, SMS is
sent to the particular SIM.

For example,

AT+CMGS=1

OK

5) ATD - This command is used to dial or call a number.

SYNTAX: ATD<Phone number>(Enter)

For example,

ATD123456789

6) ATA - This command is used to answer a call. An incoming call is indicated by


a message RING which is repeated for every ring of the call. When the call ends
NO CARRIER is displayed on the screen.

SYNTAX: ATA (Enter)

As ATA followed by enter key is pressed, incoming call is answered.

38
For example,

RING

RING

ATA

7) ATH - This command is used to disconnect remote user link with the GSM
module.

SYNTAX: ATH (Enter)

3.6.2 GSM/GPRS Module:

A Fig.ure below show GSM/GPRS module assembles a GSM/GPRS modem


with standard communication interfaces like RS-232 (Serial Port), USB etc., so
that it can be easily interfaced with a computer or a microprocessor /
microcontroller based system. The power supply circuit is also built in the module
that can be activated by using a suitable adaptor.

Fig.ure no: 3.13 GSM/GPRS Module

Circuit Diagram:

39
Fig no: 3.14 Circuit diagram of GSM/ GPRS Module

3.7 FUNCTION OF 16x2 LCD DISPLAY

Fig no :3.15 LCD display

A 16x2 LCD means it can display 16 characters per line and there are 2 such
lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has
two registers, namely, Command and Data.

The command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like initializing it,
clearing its screen, setting the cursor position, controlling display etc. The data
register stores the data to be displayed on the LCD. The data is the ASCII value of

40
the character to be displayed on the LCD. Click to learn more about internal
structure of a LCD.

3.7.1 LCD Technologies and types:

Some of the LCD technologies are,

Blue Mode STN - This is the basic LCD, which needs lot of improvement on
contrast ratio and viewing angle.

FSTN (Film STN) - Comes with an additional linearization film to offer better
contrast.

CSTN (colour STN) - Layers of color filters are added to create up to 65,000
colors.

DSTN (Double STN) - Improves contrast and eliminates any other colors
appearing on the screen.

3.7.2 Special characteristics of LCDs:

Liquid Crystals are very sensitive to constant electric fields. Only AC-
voltages should be applied as DC voltages can cause an electrochemical reaction,
which destroys the liquid crystals irreversibly.

41
Temperature dependent and in a very cold or hot environment LCD may not
work correctly. This is a reversible effect. Some displays need temperature
compensation circuits to automatically adjust the applied LC voltage.

Key specifications of LCD display:

Important factors to consider when evaluating an LCD monitor:

1. Resolution: The horizontal and vertical size measured by number of pixels (e.g.,
1024x768).

2. Dot pitch: The distance between the centers of two adjacent pixels. Smaller dot
pitch indicate sharper image.

3. Viewable size: The diagonal size of the LCD display panel

4. Response time: The minimum time LCD takes to change a pixel's color or
brightness.

5. Refresh rate: The rate at which the data is loaded in the monitor measured with
the unit of number of times per second. Higher the refresh rate lesser is the
flickering.

6. Matrix type: Active TFT or Passive.

42
7. Viewing angle: The angle from which the user can view the image on the
display clearly.

8. Color support: The types and number of colors supported by the LCD (known
as color gamut).

9. Brightness: The amount of light emitted from the display (known as


luminance).

10. Contrast ratio: The ratio of the intensity of the brightest bright to the darkest
dark.

11. Aspect ratio: The ratio of the width to the height (for example, 4:3, 5:4, 16:9 or
16:10).

12. Gamma correction: It is the name of a nonlinear operation used to code and
decode luminance or tristimulus values in video or still image systems

3.7.3 PIN DIAGRAM

43
FIGURE NO :3.15 LCD DISPLAY PIN DIAGRAM

PIN DESCRIPTION

44
Table no :3.7 pin description of LCD display

3.7.4 LCD INTERFACING:

Figure no: 3.16 LCD Interfacing

3.7.5 ADVANTAGES OF LCDS

Consumes less power and generates less heat.


Saves lot of space compared picture tubes due to LCD's flatness.
Due to less weight and flatness LCDs are highly portable.
No flicker and less screen glare in LCDs to reduce eyestrain.

45
CHAPTER 4

RESULT

46
47
CHAPTER 5

CONCLUSION AND FUTURE WORK

Finally we conclude that sand theft is being monitor and avoided by this project.

Natural calamities can be minimized so sand gets strength. The future generation

can be saved.

Sand theft which occur can be uploaded in a specific website where public can

know problem occured in the sand mill. The sand depth can also be calculated

by the sensor generated by the VLSI design. The sand mining can be monitor

by the government directly by using satellite communication .

48
REFERENCE:

1. P.Satya Ravi Teja, V.Kushal , A.Sai Srikar, Photosensitive Security System for
Theft Detection and Control using GSM technology SPACES-2015,Dept of ECE,
KL University.

2. RajM,2015 Design and Implementation of Anti-Theft ATM machine using


Embedded system, International conference on circuit, Power and computing
technology(ICCPCT)

3.Qin taichun Li Xiaogang, Wang Yahui, Liu Ziwei, Design of GSM based tele
monitoring and Alarm system for Disposable Diaper, IEEE International
conference on Green Computing and communication 2013.

4.Geeth Jayadra SiSil Kumarawadu and Lasantha Meegahapola RFID-Based


Anti-Theft Auto Security system with an immobilizer, IEEE Second International

49
conference on Industrial and information system, ICIIS 2007,8-11 August 2007,
Sri Lanks.

5.Kannan, P, and Ms P. Meenakshi Vidya. "Design and Implementation of


Security Based ATM theft Monitoring system.".

6.Ajaykumar M (2013). Anti-Theft ATM Machine Using Vibration Detection


Sensor International Journal of Advanced Research in Computer Science and
Software Engineering, pp: 23-28.

50

You might also like