Professional Documents
Culture Documents
New Microsoft Office Word Document
New Microsoft Office Word Document
INTRODUCTION
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.
Ex: MOBILE PHONES: The processor of a mobile phone needs to carry out a
great deal of communications protocol processing to make "TELEPHONECAL.
2
1.1.2 APPLICATIONS OF EMBEDDED SYSTEMS:
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 .
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.
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
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
The RFID reader is used to check whether the vehicle is authorized or not at the
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.
5
IR SENSOR
UART
RFID
READER
Fig.No:1.3 block diagram of sand theft monitoring system
READER
Sensor : IR Sensor, LDR Sensor, Laser Diode
HARDWARE REQUIREMENT
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.
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
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
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.
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.
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.
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:
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
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.
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.
1. PASSIVE
2. ACTIVE
PASSIVE:
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.
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.
INDUCTIVE COUPLING
(< 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.
23
Fig.No: 3.3 inductive coupling
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.
25
3.2.7 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.
interface with a protocol selected from the module Both TTland Wiegend Protocol
CONNECTION DETAILS
Features
26
Output- TTL or Wigand26
27
The total energy emitted at all wavelengths by a black body is related to the
absolute temperature as
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)
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
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.
There are three main processes in semiconductors that are associated with light:
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.
32
Fig no :3.10 The symbol for a photo resistor
33
will be extra electrons available for conduction. This is an example of an extrinsic
semiconductor. Photoresistors are basically photocells.
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
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.
35
Fig no: 3.1.2 GSM/GPRS MODEM
3.6.1 AT COMMANDS:
2. SMS services.
36
3. MMS services.
4. Fax services.
The Hayes subset commands are called the basic commands and the commands
specific to a GSM network are called extended AT commands.
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>
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
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.
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
For example,
ATD123456789
38
For example,
RING
RING
ATA
7) ATH - This command is used to disconnect remote user link with the GSM
module.
Circuit Diagram:
39
Fig no: 3.14 Circuit diagram of GSM/ GPRS Module
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.
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.
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.
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.
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.
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).
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
43
FIGURE NO :3.15 LCD DISPLAY PIN DIAGRAM
PIN DESCRIPTION
44
Table no :3.7 pin description of LCD display
45
CHAPTER 4
RESULT
46
47
CHAPTER 5
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
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.
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.
49
conference on Industrial and information system, ICIIS 2007,8-11 August 2007,
Sri Lanks.
50