infra-red beam for bank security
Post on 07-Apr-2018
225 Views
Preview:
TRANSCRIPT
-
8/4/2019 Infra-red Beam for Bank Security
1/66
INFRA-RED BEAM BANK SECURITY
A
MINI PROJECT REPORT
Submitted to the Faculty of Engineering of
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY,
KAKINADA.
In partial fulfillment of the requirements for the award of degree of
BACHELOR OF TECHNOLOGY
In
ELECTRONICS & COMMUNICATION ENGINEERINGSUBMITTED BY
D.JITENDRA(08R81A0491) V.V.SIVA
KUMAR(08R81A04C7)
N.S.S.S.C.RAJA SEKHAR(09R85A0408)
G.NAGARJUNA(08R81A04A6)
UNDER THE ESTEEMED GUIDANCE OF
L.SUNEEL B.TECH.
DEPARTMENT OF ELECTRONICS & COMMUNICATION
ENGINEERING
SRI SUNFLOWER COLLEGE OF ENGINEERING
&TECHNOLOGY
(Approved by AICTE, Affiliated to JNTU K)
1
-
8/4/2019 Infra-red Beam for Bank Security
2/66
LANKAPALLI-521131.
SRI SUNFLOWER COLLEGE OF ENGINEERING
&TECHNOLOGY
LANKAPALLI(CHALLAPALLI)
Department of Electronics & Communication
Engineering
CERTIFICATE
This is to certify that the project title INFRA RED BEAM BANK
SECURITYis a bonafied record of work done jointly by
D.JITENDRA (08R81A0491)
V.V.SIVA KUMAR (08R81A04C7)
N.S.S.S.C.RAJA SEKHAR (09R85A0408)
G.NAGARJUNA (08R81A04A6)
Under my guidance and supervision and is submitted in partial
fulfillment of the requirements for the award of the degree of Bachelor of Technology
in Electronics & Communication Engineering by Jawaharlal Nehru Technology
University during the year 2011-12.
2
-
8/4/2019 Infra-red Beam for Bank Security
3/66
ASOC.PROF.Y.R.K.PARAMA HAMSA M.TECH. ASST.PROF.L.SUNEEL
B.TECH. Head of the Department, E.C.E Project
Guide, E.C.E
ACKNOWLEDGEMENT
First and foremost we sincerely salute our esteemed institution SRI
SUNFLOWER COLLEGE OF ENGINEERING AND TECHNOLOGY for giving
this golden opportunity for fulfilling our warm dreams of becoming engineers.
We here by express our sincere gratitude to our principal Dr.G.V.Raju,
who has rendered us his constant encouragement and valuable suggestions in making
our project.
We are also thankful to Mr.Y.R.K.Paramahamsa, M.Tech Head of
Electronics and Communication Dept. for his constant encouragement and valuable
support throughout the course of our project.
We are glad to express our deep sense of gratitude to Mr.L.SUNEEL,
B.Tech, and our guide for his guidance and co -operation in completing this project.
We thank one and all who have rendered help to us in the completion of
this work.
Project Associates.
D.JITENDRA (08R81A0491)
V.V.SIVA KUMAR (08R81A04C7)
N.S.S.S.C.RAJA SEKHAR (09R85A0408)
3
-
8/4/2019 Infra-red Beam for Bank Security
4/66
G.NAGARJUNA (08R81A04A6)
4
-
8/4/2019 Infra-red Beam for Bank Security
5/66
ABSTRACT
INFRARED BEAM BANK SECURITY
Infrared radiation is electromagnetic radiation of a wavelength longer thanthat of visible light, but shorter than that of radio waves. The name means "below red"
red being the color of visible light with the longest wavelength. Infrared radiation has
wavelengths between about 750 nm and 1 mm, spanning three orders of magnitude.
The uses of infrared include military, such as: target acquisition, surveillance, homing
and tracking and non-military, such as thermal efficiency analysis, remote
temperature sensing, short-ranged wireless communication, spectroscopy, and
weather forecasting. Infrared astronomy uses sensor-equipped telescopes to penetrate
dusty regions of space, such as molecular clouds; detect cool objects such as planets,
and to view highly red-shifted objects from the early days of the universe.
The goal of this project is to build an Infrared security system for access
control of a door, window or lockers in banks and theyre by providing threshold
crossing alert. A retro-reflective photoelectric beam sensor built into the emitter
detects when the passing of a person or the presence of an object in the path of the
infrared beam breaks the infrared beam. A buzzer is used to alert that a security
breech has occurred or that an object has entered or passed through the infrared beam.
Module:
Embedded Micro controller
IR Unit
LCD
Buzzer
Language:
Embedded c
1
-
8/4/2019 Infra-red Beam for Bank Security
6/66
INDEX
Chapter.No Topic Page Number
1. Introduction 1
2. Block Diagram 2
3. Block Diagram Description 3
4. Circuit Diagram 4
5. Circuit Diagram Description 5
6. AT89S52 Micro Controller 6
7. Power Supply
16
8. IR PAIR
23
9. Relays 28
10.LCD (Liquid Crystal Display) 35
11.Keil Software 44
12.IR Advantages & Disadvantages 46
13.Flow Chart 48
14.Source Code 49
15.Conclusion 54
16.Future Scope 55
-
8/4/2019 Infra-red Beam for Bank Security
7/66
17.Bibliography 56
List of figures
FIGURE No. FIGURE DESCRIPTION PAGE NUMBER
1 Block diagram 2
2 Circuit Diagram 4
3 Internal Architecture 8
4 Pin diagram 9
5 Oscillator Connections 13
6 Power supply block diagram 16
7 Power supply Circuit diagram 17
8 An ideal step-down transformer 18
9 Ideal power equation 20
10 Voltage Regulator
21
11 Voltage Regulator internal block diagram
22
-
8/4/2019 Infra-red Beam for Bank Security
8/66
12 Frequency band 23
13 IR LED QED234 24
14 Emitter/Detector Alignment 25
15 Buzzer Driver 27
16 Relay Internal Block diagram
28
17 Relay 6v DC 28
18 Basic block diagram of Relay
29
19 Pin diagram of MAX 232 33
20 LCD Address locations for a 1x16 line 36
21 Shapes and sizes of different LCDs 37
22 Pin diagram of 1x16 lines LCD 38
23 Different codes for LCD 42
-
8/4/2019 Infra-red Beam for Bank Security
9/66
List of tables
TABLE No. TABLEDESCRIPTION PAGE NUMBER
1 Port 1 pins 10
2 Port 3 pins 11
3 Interrupt Register 13
4 TCON Register 14
5 TMOD Register 14
6 MAX 232 Voltage levels 34
7 Pin Description of LCD 38
-
8/4/2019 Infra-red Beam for Bank Security
10/66
-
8/4/2019 Infra-red Beam for Bank Security
11/66
1. Introduction:
Infrared radiation is electromagnetic radiation of a wavelength longer than that
of visible light, but shorter than that of radio waves. The name means "below red" red
being the color of visible light with the longest wavelength. Infrared radiation haswavelengths between about 750 nm and 1 mm, spanning three orders of magnitude.
The uses of infrared include military, such as: target acquisition, surveillance, homing
and tracking and non-military, such as thermal efficiency analysis, remote
temperature sensing, short-ranged wireless communication, spectroscopy, and
weather forecasting. Infrared astronomy uses sensor-equipped telescopes to penetrate
dusty regions of space, such as molecular clouds; detect cool objects such as planets,
and to view highly red-shifted objects from the early days of the universe.
2. Block Diagram:
1
-
8/4/2019 Infra-red Beam for Bank Security
12/66
Figure-1
3. Block Diagram Description:
2
Microcontroll
er
IR
module
Rela
y
Loc
k
LCDBuzze
r
Power
supply
-
8/4/2019 Infra-red Beam for Bank Security
13/66
The block diagram consists of IR module, power supply, buzzer, micro
controller, relay and LCD.
This power supply section is required to convert AC signal to DC signal andalso to reduce the amplitude of the signal. The available voltage signal from the mains
is 230V/50Hz which is an AC voltage, but the required is DC voltage (no frequency)
with the amplitude of +5V and +12V for various applications.
Here the IR receiver receives IR frequency from transmitter generates a bit 0
while IR frequency focused on the IR detector, generates bit 1 when there is no IR
signal. This IR data is given to the RXD pin of the micro controller used in the
receiver. . The micro controller will take the input data and compare with the internaldata with respect to the output data. Then the corresponding information about the
detection of object is display on the display.
When the signal is received at the receiver on the LCD we get a display that
OBJECT IS DETECTED and simultaneously the buzzer rings continuously giving
the indication that threat or object is detected till we reset the micro controller.
A relay is an electrical switch that opens and closes under the control of
another electrical circuit. In the original form, the switch is operated by an
electromagnet to open or close one or many sets of contacts. A relay is able to control
an output circuit of higher power than the input circuit, it can be considered to be, in a
broad sense, a form of an electrical amplifier.
4. Circuit Diagram:
3
-
8/4/2019 Infra-red Beam for Bank Security
14/66
Figure-2
5. Circuit Diagram Description:
4
-
8/4/2019 Infra-red Beam for Bank Security
15/66
From the circuit 5v dc and 12 v dc is required to drive the all the components.
The mains give the 230v ac so first we step down the 230v ac in to 12v ac by using
step down transformer. Then the output is given to the bridge rectifier as given in the
circuit diagram. The rectifier is eliminating the negative peak voltage of the input
voltage the output of the rectifier is the pulsating dc.
The dc error pulses are eliminated by using capacitor filter. Then the output at
the parallel of the capacitor is the 12v dc. But the Micro Controller is work on 5v dc
so convert the 12v dc in the 5v dc by using voltage regulator the output of the
regulator is constant irrespective of the input voltage.
The Micro Controller requires the reset logic circuit for protection of the
internal program and internal clock when in the power failure. A sudden change in the
power may cause data error. These types of the errors will corrupt the internal
program. The reset logic circuit contains one capacitor and a resistor. This
arrangement is shown in the Micro Controller circuit. XTAL1 and XTAL2 are the
input and output, respectively. An inverting amplifier which is configured an on-chip
oscillator. Either a quartz crystal or ceramic resonator may be used. To drive the
device from an external clock source, XTAL2 should be left unconnected while
XTAL1 is driven. There are no requirements on the duty cycle of the external clock
signal, since the input to the internal clocking circuitry is through a divide-by-two
flip-flop, but minimum and maximum voltage high and low time specifications must
be observed.
The display will be the construction of 2 rows and 16 columns of matrixpixels. This display was also having the two types of data input modes one is parallel
data input and another one is series input data type. In the first type the data will given
in the form of parallel from the micro controller it need not to require the parallel to
series conversion but in the series input mode the Micro Controller can require the
parallel to the series converter to convert the parallel data to the corresponding serial
data. This display requires the 5 volts power supply for back light.
Here the IR receiver receives IR frequency from transmitter generates a bit 0
while IR frequency focused on the IR detector, generates bit 1 when there is no IR
signal. This IR data is given to the RXD pin of the micro controller used in thereceiver. . The micro controller will take the input data and compare with the internal
data with respect to the output data. Then the corresponding information about the
detection of object is displayed on the LCD.
When the signal is received at the receiver on the LCD we get a display that
OBJECT IS DETECTED and simultaneously the buzzer rings continuously giving
the indication that threat or object is detected till we reset the micro controller.
6. AT89S52 MICRO CONTROLLER
Microprocessors vs. Microcontrollers:
5
-
8/4/2019 Infra-red Beam for Bank Security
16/66
Microprocessors are single-chip CPUs used in microcomputers.
Microcontrollers and microprocessors are different in three main aspects: hardware
architecture, applications, and instruction set features.
Hardware architecture: A microprocessor is a single chip CPU while amicrocontroller is a single IC contains a CPU and much of remaining circuitry of a
complete computer (e.g., RAM, ROM, serial interface, parallel interface, timer, and
interrupt handling circuit).
Applications: Microprocessors are commonly used as a CPU in computers while
microcontrollers are found in small, minimum component designs performing control
oriented activities.
Microprocessor instruction sets are processing Intensive.
Their instructions operate on nibbles, bytes, words, or even double words.
Addressing modes provide access to large arrays of data using pointers and offsets.
They have instructions to set and clear individual bits and perform bit operations.
They have instructions for input/output operations, event timing, enabling and
setting priority levels for interrupts caused by external stimuli.
Processing power of a microcontroller is much less than a microprocessor.
Difference between 8051 and 8052:
The 8052 microcontroller is the 8051's "big brother." It is a slightly more powerful
microcontroller, sporting a number of additional features which the developer may
make use of:
256 bytes of Internal RAM (compared to 128 in the standard 8051).
A third 16-bit timer, capable of a number of new operation modes and 16-bit
reloads.
Additional SFRs to support the functionality offered by the third timer.
AT89S52:
Features:
6
-
8/4/2019 Infra-red Beam for Bank Security
17/66
Compatible with MCS-51 Products
8K Bytes of In-System Programmable (ISP) Flash Memory
Endurance: 1000 Write/Erase Cycles
4.0V to 5.5V Operating Range
Fully Static Operation: 0 Hz to 33 MHz
Three-level Program Memory Lock
256K Internal RAM
32 Programmable I/O Lines
3 16-bit Timer/Counters
Eight Interrupt Sources
Full Duplex UART Serial Channel
Low-power Idle and Power-down Modes
Interrupt Recovery from Power-down Mode
Watchdog Timer
Dual Data Pointer
Power-off Flag
DESCRIPTION OF MICROCONTROLLER 89S52:
The AT89S52 is a low-power, high-performance CMOS 8-bit micro controller
with 8Kbytes of in-system programmable Flash memory. The device is manufactured
Using Atmels high-density nonvolatile memory technology and is compatible
with the industry-standard 80C51 micro controller. The on-chip Flash allows the
program memory to be reprogrammed in-system or by a conventional nonvolatile
memory programmer. By combining a versatile 8-bit CPU with in-system
programmable flash one monolithic chip; the Atmel AT89S52 is a powerful micro
controller, which provides a highly flexible and cost-effective solution to many
embedded control applications.
7
-
8/4/2019 Infra-red Beam for Bank Security
18/66
Figure-3
PIN CONFIGURATIONS:
PDIP
8
-
8/4/2019 Infra-red Beam for Bank Security
19/66
Figure-4
The AT89S52 provides the following standard features: 8K bytes of Flash,
256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit
timer/counters, full duplex serial port, on-chip oscillator, and clock circuitry. In
addition, the AT89S52 is designed with static logic for perationdown to zero
frequency and supports two software selectable power saving modes. The Idle Mode
stops the CPU while allowing the RAM timer/counters, serial port, and interrupt
system to continue functioning. The Power-down mode saves the RAM contents but
freezes the oscillator, disabling all other chip functions until the next interrupt or
hardware reset.
PIN DESCRIPTION OF MICROCONTROLLER 89S52:
VCC
9
-
8/4/2019 Infra-red Beam for Bank Security
20/66
Supply voltage.
GND
Ground.
Port 0
Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin
can sink eight TTL inputs. When 1sare written to port 0 pins, the pins can be used as
high impedance inputs. Port 0 can also be configured to be the multiplexed low order
address/data bus during accesses to external program and data memory. In this mode,
P0 has internal pull-ups. Port 0 also receives the code bytes during Flash
programming and outputs the code bytes during program verification. External pull-
ups are required during program verification
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 Output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are
pulled high by the internal pull-ups and can be used as inputs. In addition, P1.0 and P1.1 can
be configured to be the timer/counter 2 external count input. (P1.0/T2) and the timer/counter2 trigger input P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives
the low-order address bytes during Flash programming and verification.
Port Pin Alternate functions
P.1.0T2 (External count input totimer/counter) clock-out.
P.1.1T2EX (Timer/counter 2 capture/reloadtrigger and direction control.
P.1.5MOSI(used for in-system programming)
P.1.6MOSO(used for in-system
programming)
P.1.7 SCK(used for in-system programming)
Table-1
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers
can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by
10
-
8/4/2019 Infra-red Beam for Bank Security
21/66
the internal pull-ups and can be used as inputs. Port 2 emits the high-order address byte
during fetches from external program memory and during accesses to external data memory
that uses 16-bit addresses (MOVX @DPTR). In this application, Port 2 uses strong internal
pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses
(MOVX @ RI), Port 2emits the contents of the P2 Special Function Register. Port 2 also
receives the high-order address bits and some control signals during Flash programming and
verification.
Port 3
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers
can sink/source four TTL inputs. When 1s are writ 1s are written to Port 3 pins, they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are
externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also
serves the functions of various special features of the AT89S52, as shown in the following
table.
Port 3 also receives some control signals for Flash programming and verification.
Port
Pin Alternate functions
P.3.0 RXD(Serial input port)
P.3.1 TXD(Serial output port )
P.3.2 INT0'(External interrupt 0)
P.3.3 INT1'(External interrupt 1)
P.3.4 T0(Timer 0 external input)
P.3.5 T1(Timer 1 external input)
P.3.6 WR'(External data memory write strobe)
P.3.7 RD'(External data memory read strobe)
Table-2
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running
resets the device.
ALE/PROG
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG) during
11
-
8/4/2019 Infra-red Beam for Bank Security
22/66
Flash programming. In normal operation, ALE is emitted at a constant rate of1/6 the oscillator
frequency and may be used for external timing or clocking purposes. Note, however, that one
ALE pulse is skipped during each access to external data Memory. If desired, ALE operation
can be disabled by setting bit 0 of SFR location
8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise,
the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the micro controller
is in external execution mode.
PSEN
Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external
data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at 0000H up to FFFFH.Note,
however, that if lock bit 1 is programmed, EA will be internally latched on reset. A should be
strapped to VCC for internal program executions. This pin also receives the 12-
voltProgramming enables voltage (VPP) during Flash programming.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier
that can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz
crystal or ceramic resonator may be used. To drive the device from an External clock source,
XTAL2 should be left unconnected while XTAL1 is driven, as shown in Figure 2.
12
-
8/4/2019 Infra-red Beam for Bank Security
23/66
Figure 5. Oscillator Connections
Interrupt Registers: The individual interrupt enable bits are in the IE
register. Two priorities can be set for each of the six interrupt sources in the IP
register.
SymbolPositio
nFunction
EA IE.7 Disables all interrupts
- IE.6 Reserved
ETS IE.5 Timer 2 interrupt enable bit
ES IE.4 Serial port interrupt enable bit
ET1 IE.3 Timer 1 interrupt enable bit
EX1 IE,2 External interrupt 1 enable bit
ET0 IE.1 Timer 0 interrupt enable bit
EX0 IE.0 External interrupt 0 enable bit
Table-3
TCON REGISTER : Timer/counter Control Register
7 6 5 4 3 2 1 0TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0
13
-
8/4/2019 Infra-red Beam for Bank Security
24/66
BIT
NUMBER
BIT
MNEMONICDESCRIPTION
7 TF1
Timer 1 overflow flag.Cleared by hardware when processor vectored to interrupt
routine.Set by hardware on timer/counter overflows, when the timer1register overflows.
6 TR1
Timer 1 run control bit.Cleared to turn off timer/counter 1.Set to turn on timer/counter 1.
5 TF0
Timer 0 overflows flag.Cleared by hardware when processor vectors to interruptroutine.Set by hardware on timer/counter overflow, when the timer 0register overflows.
4 TR0Timer 0 run control bit.Cleared to turn off timer/counter 0.Set to turn on timer/counter 0.
3 IE1
Interrupt 1 edge flag.Cleared by hardware when interrupt is processed if edgetriggered (IT1).Set by hardware when external input is detected on NT1 pin.
2 IT1
Interrupt 1 type control bit.Clear to select low level active (level triggered) for externalinterrupt (NT1)1.Set to select falling edge active (edge triggered) for externalinterrupt 1.
1 IE0
Interrupt 0 edge flag.Cleared by hardware when interrupt is processed if edgetriggered (IT0).Set by hardware when external input is detected on NT1 pin.
0 IT0
Interrupt 0 type control bit.Clear to select low level active (level triggered) for externalinterrupt (NT0)1.Set to select falling edge active (edge triggered) for externalinterrupt 1.
Table-4
TMOD REGISTER: Timer/Counter 0 and 1 Modes
7 6 5 4 3 2 1 0
GATE1 C/T' M11 M01 GATE0 C/T' M10 M00
BITNUMBER
BITMNEMONIC
DESCRIPTION
14
-
8/4/2019 Infra-red Beam for Bank Security
25/66
7 GATE1
Timer 1 gating control bit.Clear to enable the timer 1 whenever the TR1 bit is set.Set to enable the timer 1 only while the INT1' pin is high and TR1
bit is set.
6 C/T'
Timer 1 counter/timer select bit.
Cleared for timer operation.Set for counter operation.
5 M11
Timer 1 mode select bit
M11 M10 Operating mode
0 0 13-bit timer
4 M10
0 1 13-bit timer/counter.
1 0 8-bit auto-reload timer/counter.
1 1 timer/counter 1 stopped
3 GATE0
Timer 0 gating control bit.Clear to enable the timer 0 whenever the TR0 bit is set.Set to enable the timer 1 only while the INT0' pin is high and TR0
bit is set.
2 C/T'
Timer 0 counter/timer select bit.Cleared for timer operation.Set for counter operation.
1 M01
Timer 0 mode select bit
M10 M00 Operating mode
0 0 timer/counter 1 stopped
0 M00
0 1 13-bit timer/counter.
1 0 8-bit auto-reload timer/counter.
1 1 TLO is an 8-bit timer/counter.
Table-5
7.POWER SUPPLY:
The Power Supply is a Primary requirement for the project work. The required DC
power supply for the base unit as well as for the recharging unit is derived from the mains
line. For this purpose center tapped secondary of 12V-012V transformer is used. From this
transformer we getting 5V power supply. In this +5V output is a regulated output and it is
designed using 7805 positive voltage regulator. This is a 3 Pin voltage regulator, can deliver
current up to 800 milliamps. Rectification is a process of rendering an alternating current orvoltage into a unidirectional one. The component used for rectification is called Rectifier. A
15
-
8/4/2019 Infra-red Beam for Bank Security
26/66
rectifier permits current to flow only during positive half cycles of the applied AC voltage.
Thus, pulsating DC is obtained to obtain smooth DC power additional filter circuits required.
BLOCK DIAGRAM:
Figure-6-Power supply
CIRCUIT DIAGRAM:
Component Used
(a) Capacitors
(i) 1000F/25v for +12v
(b) Step down transformer
(i) 230v / 12v- 0 -12v/ 500mA Transformer
(c) Diodes: 1N4007
16
-
8/4/2019 Infra-red Beam for Bank Security
27/66
Figure-7-Circuit diagram
A diode can be used as rectifier. There are various types of diodes. However,
semiconductor diodes are very popularly used as rectifiers. A semiconductor diode is a
solid-state device consisting of two elements is being an electron emitter or cathode, the
other an electron collector or anode. Since electrons in a semiconductor diode can flow in
one direction only-form emitter to collector-the diode provides the unilateral conduction
necessary for rectification. The rectified Output is filtered for smoothening the DC, for this
purpose capacitor is used in the filter circuit. The filter capacitors are usually connected in
parallel with the rectifier output and the load. The AC can pass through a capacitor but DC
cannot, the ripples are thus limited and the output becomes smoothed. When the voltage
across the capacitor plates tends to rise, it stores up energy back into voltage and current.
Thus, the fluctuation in the output voltage is reduced considerable
Circuit Explanation
1) Transformer
A transformer is a device that transfers electrical energy from one circuit toanother through inductively coupled electrical conductors. A changing current in the
first circuit (the primary) creates a changing magnetic field; in turn, this magneticfield induces a changing voltage in the second circuit (the secondary). By adding aload to the secondary circuit, one can make current flow in the transformer, thustransferring energy from one circuit to the other.
The secondary induced voltage VS, of an ideal transformer, is scaled from theprimary VP by a factor equal to the ratio of the number of turns of wire in theirrespective windings:
17
-
8/4/2019 Infra-red Beam for Bank Security
28/66
Basic principle
The transformer is based on two principles: firstly, that an electric current canproduce a magnetic field (electromagnetism) and secondly that a changing magneticfield within a coil of wire induces a voltage across the ends of the coil(electromagnetic induction). By changing the current in the primary coil, it changesthe strength of its magnetic field; since the changing magnetic field extends into thesecondary coil, a voltage is induced across the secondary.
A simplified transformer design is shown below. A current passing throughthe primary coil creates a magnetic field. The primary and secondary coils arewrapped around a core of very high magnetic permeability, such as iron; this ensuresthat most of the magnetic field lines produced by the primary current are within theiron and pass through the secondary coil as well as the primary coil.
Figure-8.An ideal step-down transformer showing magnetic flux in the core
Induction law
The voltage induced across the secondary coil may be calculated fromFaraday's law of induction, which states that:
Where VS is the instantaneous voltage, NS is the number of turns in thesecondary coil and equals the magnetic flux through one turn of the coil. If the
turns of the coil are oriented perpendicular to the magnetic field lines, the flux is theproduct of the magnetic field strength B and the area A through which it cuts. The
18
http://en.wikipedia.org/wiki/Image:Transformer3d_col3.svg -
8/4/2019 Infra-red Beam for Bank Security
29/66
area is constant, being equal to the cross-sectional area of the transformer core,whereas the magnetic field varies with time according to the excitation of the primary.Since the same magnetic flux passes through both the primary and secondary coils inan ideal transformer, the instantaneous voltage across the primary winding equals
Taking the ratio of the two equations forVS and VP gives the basic equationfor
stepping up or stepping down the voltage
Ideal power equation
If the secondary coil is attached to a load that allows current to flow, electricalpower is transmitted from the primary circuit to the secondary circuit. Ideally, thetransformer is perfectly efficient; all the incoming energy is transformed from the
primary circuit to the magnetic field and into the secondary circuit. If this condition ismet, the incoming electric power must equal the outgoing power.
Pincoming = IPVP = Poutgoing = ISVS
giving the ideal transformer equation
Figure-9
Pin-coming = IPVP = Pout-going = ISVS
giving the ideal transformer equation
19
http://en.wikipedia.org/wiki/Image:Transformer_under_load.svg -
8/4/2019 Infra-red Beam for Bank Security
30/66
If the voltage is increased (stepped up) (VS > VP), then the current is decreased(stepped down) (IS VP), then the current is decreased(stepped down) (IS
-
8/4/2019 Infra-red Beam for Bank Security
31/66
Figure-10-Voltage Regulator
The LM7805 is simple to use. You simply connect the positive lead of your
unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin,
connect the negative lead to the Common pin and then when you turn on the power,
you get a 5 volt supply from the Output pin.
Regulator Block diagram:
21
-
8/4/2019 Infra-red Beam for Bank Security
32/66
Figure-11-Regulator Block diagram
8.IR PAIR:INFRARED (IR) TECHNOLOGY
Introduction:
Technically known as "infrared radiation", infrared light is part of the
electromagnetic spectrum located just below the red portion of normal visible light
the opposite end to ultraviolet. Although invisible, infrared follows the same
principles as regular light and can be reflected or pass through transparent objects,
such as glass. Infrared remote controls use this invisible light as a form of
communications between themselves and home theater equipment, all of which have
infrared receivers positioned on the front. Essentially, each time you press a button on
a remote, a small infrared diode at the front of the remote beams out pulses of light at
high speed to all of your equipment. When the equipment recognizes the signal as its
own, it responds to the command.
22
-
8/4/2019 Infra-red Beam for Bank Security
33/66
But much like a flashlight, infrared light can be focused or diffused, weak or
strong. The type and number of emitters can affect the possible angles and range your
remote control can be used from. Better remotes can be used up to thirty feet away
and from almost any angle, while poorer remotes must be aimed carefully at the
device being controlled.
The light our eyes see is but a small part of a broad spectrum of electromagnetic
radiation. On the immediate high energy side of the visible spectrum lies the
ultraviolet, and on the low energy side is the infrared. The portion of the infrared
region most useful for analysis of organic compounds is not immediately adjacent to
the visible spectrum, but is that having a wavelength range from 2,500 to 16,000 nm,
with a corresponding frequency range from 1.9*1013 to 1.2*1014 Hz(The frequency of
infrared ranges from 0.003 - 4 x 1014 Hz or about 300 gigahertz to 400 terahertz.).
Figure-12
Infrared imaging is used extensively for both military and civilian purposes.
Military applications include target acquisition, surveillance, night vision, homing and
tracking. Non-military uses include thermal efficiency analysis, remote temperature
sensing, short-ranged wireless communication, spectroscopy, and weather forecasting.
Infrared astronomy uses sensor-equipped telescopes to penetrate dusty regions of
space, such as molecular clouds; detect cool objects such as planets, and to view
highly red-shifted objects from the early days of the universe
IR LED QED234:
23
-
8/4/2019 Infra-red Beam for Bank Security
34/66
Figure-13-IR LED QED234
FEATURES:
Wave length is 940 nm
Chip material =GaAs with AlGaAs window
Package type: T-1 3/4 (5mm lens diameter)
Matched Photo sensor: QSD122/123/124
Medium Emission Angle, 40
High Output Power
Package material and color: Clear, untainted, plastic
Ideal for remote control applications
Emitter/Detector Alignment:
Good alignment of the emitter and detector is important for good operation,
especially if the gap is large. This can be done with a piece of string stretched
between and in line with LED and phototransistor. A length of dowel or stiff wire
24
-
8/4/2019 Infra-red Beam for Bank Security
35/66
could be used to set the alignment. Another method that can be used for longer
distances is a laser pointer shone through one of the mounting holes.
For best results the height of the "beam" should be at coupler height and at an
angle across the tracks. The emitter could also be mounted above the track with the
phototransistor placed between the rails in locations such as hidden yards. Placing the
emitter and detector at an angle would again be helpful.
Figure-14
Infrared Emitters
IR Emitters generally "stick" onto the front of the device you want to control.
Therefore you need one emitter for each device. "Dual" emitters have two emitters and one
plug, so they only take up one jack of the connecting block. "Blink" emitters blink visibly as
well as infrared, so they are easier to troubleshoot. All emitters come with long cords and
extra double-stick tape. "Blast" style emitters, where one emitter blinks into several devices,
are usually less reliable but can be used when the environment is tightly controlled .
Applications:
Infrared Filters
Night vision
ThermographyOther imaging
25
-
8/4/2019 Infra-red Beam for Bank Security
36/66
Tracking
Heating
Communications
Spectroscopy
Meteorology
ClimatologyAstronomy
Art history
Biological systems
Photo bio modulationHealth hazard
BUZZER:
A buzzer or beeper is a signalling device, usually electronic, typically used in
automobiles, household appliances such as a microwave oven, or game shows. It most
commonly consists of a number of switches or sensors connected to a control unit that
determines if and which button was pushed or a preset time has lapsed, and usually
illuminates a light on the appropriate button or control panel, and sounds a warning
in the form of a continuous or intermittent buzzing or beeping sound. Initially this
device was based on an electromechanical system which was identical to an electric
bell without the metal gong (which makes the ringing noise). Often these units wereanchored to a wall or ceiling and used the ceiling or wall as a sounding board.
Another implementation with some AC-connected devices was to implement a circuit
to make the AC current into a noise loud enough to drive a loudspeaker and hook this
circuit up to a cheap 8-ohm speaker. Now-a-days, it is more popular to use a ceramic-
based piezo-electric sounder like a Sonalert which makes a high-pitched tone. Usually
these were hooked up to driver circuits which varied the pitch of the sound or pulsed
the sound on and off.
Buzzer Driver:
26
http://en.wikipedia.org/wiki/Photobiomodulationhttp://en.wikipedia.org/wiki/Photobiomodulation -
8/4/2019 Infra-red Beam for Bank Security
37/66
V C C
Q ?
B C 5 4 7
D ?
4 0 0 7
+
1 2 V
-
B u z
Figure-15
The circuit is designed to control the buzzer. The buzzer ON and OFF is
controlled by the pair of switching transistors (BC 547). The buzzer is connected in
the Q2 transistor collector terminal. When high pulse signal is given to base of the
Q1 transistors, the transistor is conducting and close the collector and emitter
terminal so zero signals is given to base of the Q2 transistor. Hence Q2 transistor and
buzzer is turned OFF state.
When low pulse is given to base of transistor Q1, the transistor is turned OFF.
Now 12V is given to base of Q2 transistor so the transistor is conducting and buzzer
is energized and produces the sound signal.
9.RELAYS
Introduction:
27
C PORT
-
8/4/2019 Infra-red Beam for Bank Security
38/66
A relay is an electrical switch that opens and closes under the control of another
electrical circuit. In the original form, the switch is operated by an electromagnet to
open or close one or many sets of contacts. A relay is able to control an output circuit
of higher power than the input circuit, it can be considered to be, in a broad sense, a
form of an electrical amplifier.
Figure-16-Relay Internal Block diagram
Relays are usually SPDT (single pole double through switch)or DPDT (double
pole double through switch) but they can have many more sets of switch contacts, for
example relays with 4 sets of changeover contacts are readily available.
Figure-17
Basic operation of a relay:
An electric current through a conductor will produce a magnetic
field at right angles to the direction of electron flow. If that conductor is
wrapped into a coil shape, the magnetic field produced will be oriented
28
-
8/4/2019 Infra-red Beam for Bank Security
39/66
along the length of the coil. The greater the current, the greater the
strength of the magnetic field, all other factors being equal.
Figure-18
Inductors react against changes in current because of the energy stored in this
magnetic field. When we construct a transformer from two inductor coils around a
common iron core, we use this field to transfer energy from one coil to the other.
However, there are simpler and more direct uses for electromagnetic fields than the
applications we've seen with inductors and transformers. The magnetic field produced
by a coil of current-carrying wire can be used to exert a mechanical force on any
magnetic object, just as we can use a permanent magnet to attract magnetic objects,
except that this magnet (formed by the coil) can be turned on or off by switching the
current on or off through the coil.
If we place a magnetic object near such a coil for the purpose of making that
object move when we energize the coil with electric current, we have what is called a
solenoid. The movable magnetic object is called an armature, and most armatures can
be moved with either direct current (DC) or alternating current (AC) energizing the
coil. The polarity of the magnetic field is irrelevant for the purpose of attracting an
iron armature. Solenoids can be used to electrically open door latches, open or shut
29
-
8/4/2019 Infra-red Beam for Bank Security
40/66
valves, move robotic limbs, and even actuate electric switch mechanisms and is used
to actuate a set of switch contacts
Relays can be categorized according to the magnetic system and operation:
Neutral Relays:
This is the most elementary type of relay. The neutral relays have a magnetic
coil, which operates the relay at a specified current, regardless of the polarity of the
voltage applied.
Biased Relays:
Biased relays have a permanent magnet above the armature. The relay
operates if the current through the coil winding establishes a magneto-motive force
that opposes the flux by the permanent magnet. If the fluxes are in the same direction,
the relay will not operate, even for a greater current through the coil.
Polarized Relays:
Like the biased relays, the polarized relays operate only when the current
through the coil in one direction. But there the principle is different. The relay coil has
a diode connected in series with it. This blocks the current in the reverse direction.
The major difference between biased relays and polarized relays is that the
former allows the current to pass through in the reverse direction, but does the not
operate the relay and the later blocks the current in reverse direction. You can
imagine how critical these properties when relays are connected in series to form
logic circuits.
Magnetic Stick Relays or Perm polarized Relays:
These relays have a magnetic circuit with high permanence. Two coils, one to
operate (pick up) and one to release (drop) are present. The relay is activated by a
current in the operate coil. On the interruption of the current the armature remains in
picked up position by the residual magnetism. The relay is released by a current
through the release coil.
30
-
8/4/2019 Infra-red Beam for Bank Security
41/66
Slow Release Relays:
These relays have a capacitor connected in parallel to their coil. When the
operating current is interrupted the release of relay is delayed by the stored charge in
the capacitor. The relay releases as the capacitor discharges through the coil.
Relays for AC:
These are neutral relays and picked up for a.c. current through their coil. These
are very fast in action and used on power circuits of the point motors, where high
current flows through the contacts. A normal relay would be slow and make sparks
which in turn may weld the contacts together.
All relays have two operating values (voltages), one pick-up and the other
other drop away. The pick-up value is higher than the drop away value.
Applications:
To control a high-voltage circuit with a low-voltage signal, as in some types of
modems or audio amplifiers,
To control a high-current circuit with a low-current signal, as in the starter
solenoid of an automobile,
To detect and isolate faults on transmission and distribution lines by opening
and closing circuit breakers (protection relays),
To isolate the controlling circuit from the controlled circuit when the two are
at different potentials, for example when controlling a mains-powered device
from a low-voltage switch. The latter is often applied to control office lighting
as the low voltage wires are easily installed in partitions, which may be often
moved as needs change. They may also be controlled by room occupancy
detectors in an effort to conserve energy,
To perform logic functions. For example, the boolean AND function is
realised by connecting NO relay contacts in series, the OR function by
connecting NO contacts in parallel. The change-over or Form C contacts
perform the XOR (exclusive or) function. Similar functions for NAND and
31
-
8/4/2019 Infra-red Beam for Bank Security
42/66
NOR are accomplished using NC contacts. The Ladder programming language
is often used for designing relay logic networks.
o Early computing. Before vacuum tubes and transistors, relays were
used as logical elements in digital computers. See ARRA (computer),
Harvard Mark II, Zuse Z2, and Zuse Z3.
o Safety-critical logic. Because relays are much more resistant than
semiconductors to nuclear radiation, they are widely used in safety-
critical logic, such as the control panels of radioactive waste-handling
machinery.
To perform time delay functions. Relays can be modified to delay opening or
delay closing a set of contacts. A very short (a fraction of a second) delay
would use a copper disk between the armature and moving blade assembly.
Current flowing in the disk maintains magnetic field for a short time,
lengthening release time. For a slightly longer (up to a minute) delay, a
dashpot is used. A dashpot is a piston filled with fluid that is allowed to escape
slowly. The time period can be varied by increasing or decreasing the flow
rate. For longer time periods, a mechanical clockwork timer is installed
MAX 232:
MAX 232C is used to interface the transmitter and receiver circuit to the PC.
It issued to match between the RS232C and TTL levels. The MAX232 is a
dual driver/receiver that includes a capacitive voltage generator to supply
32
-
8/4/2019 Infra-red Beam for Bank Security
43/66
RS232C voltage levels from a single5V supply. Each receiver converts
RS232C inputs to 5V TTL/CMOS levels. These receivers have a typical
threshold of 1.3 V, a typical hysteresis of 0.5 V, and can accept 30V inputs.
Each driver converts TTL/CMOS input levels into RS232C levels.
Pin Diagram for MAX 232:
Figure-19
VOLTAGE LEVELS :
It is helpful to understand what occurs to the voltage levels. When a
MAX232. IC receives a TTL level to convert, it changes a TTL Logic 0 to
between +3 and +15V, and changes TTL Logic 1 to between -3 to -15V, and
vice versa for converting from RS232 to TTL.
This can be confusing when you realize that the RS232 Data Transmission
voltages at a certain logic state are opposite from the RS232 Control Line
voltages at the same logic state. To clarify the matter, see the table below.
33
-
8/4/2019 Infra-red Beam for Bank Security
44/66
Table-6
34
RS232 Line Type & Logic LevelRS232
Voltage
TTL Voltage
to/from MAX232
Data Transmission (Rx/Tx) Logic 0 +3V to +15V 0V
Data Transmission (Rx/Tx) Logic 1 -3V to -15V 5V
Control Signals (RTS/CTS/DTR/DSR)
Logic 0-3V to -15V 5V
Control Signals (RTS/CTS/DTR/DSR)
Logic 1+3V to +15V 0V
-
8/4/2019 Infra-red Beam for Bank Security
45/66
10.LCD (Liquid Crystal Display)
Introduction:
A liquid crystal display (LCD) is a thin, flat display device made up of
any number of color or monochrome pixels arrayed in front of a light source or
reflector. Each pixel consists of a column of liquid crystal molecules suspended
between two transparent electrodes, and two polarizing filters, the axes of polarity of
which are perpendicular to each other. Without the liquid crystals between them,
light passing through one would be blocked by the other. The liquid crystal twists the
polarization of light entering one filter to allow it to pass through the other.
A program must interact with the outside world using input and outputdevices that communicate directly with a human being. One of the most common
devices attached to an controller is an LCD display. Some of the most common LCDs
connected to the controllers are 16X1, 16x2 and 20x2 displays. This means 16
characters per line by 1 line 16 characters per line by 2 lines and 20 characters per line
by 2 lines, respectively.
Many microcontroller devices use 'smart LCD' displays to output visual
information. LCD displays designed around LCD NT-C1611 module, are
inexpensive, easy to use, and it is even possible to produce a readout using the 5X7
dots plus cursor of the display. They have a standard ASCII set of characters and
mathematical symbols. For an 8-bit data bus, the display requires a +5V supply plus
10 I/O lines (RS RW D7 D6 D5 D4 D3 D2 D1 D0). For a 4-bit data bus it only
requires the supply lines plus 6 extra lines(RS RW D7 D6 D5 D4). When the LCD
display is not enabled, data lines are tri-state and they do not interfere with the
operation of the microcontroller.
Features:
(1) Interface with either 4-bit or 8-bit microprocessor.
(2) Display data RAM
(3) 80x8 bits(80 characters).
(4) Character generator ROM
35
available. Line lengths o
8, 16
20, 24
32 an
40
characters ar
all
standar
d, i
one,
two
-
8/4/2019 Infra-red Beam for Bank Security
46/66
(5). 160different 5 7 dot-matrix character patterns.
(6). Character generator RAM
(7) 8 different user programmed 5 7 dot-matrix patterns.
(8).Display data RAM and character generator RAM may be accessed by
the microprocessor.
(9) Numerous instructions
(10) Clear Display, Cursor Home, Display ON/OFF, Cursor ON/OFF,
Blink Character, Cursor Shift, Display Shift.
(11).Built-in reset circuit is triggered at power ON.
(12). Built-in oscillator.
Data can be placed at any location on the LCD. For 161 LCD, the address
locations are:
Figure-20: Address locations for a 1x16 line LCD
36
-
8/4/2019 Infra-red Beam for Bank Security
47/66
Shapes and sizes:
Figure-21
Even limited to character based modules, there is still a wide variety of shapes and
sizes available. Line lengths of 8,16,20,24,32 and 40 characters are all standard, in
one, two and four line versions.
Several different LC technologies exists. supertwist types, for example, offer
Improved contrast and viewing angle over the older twisted nematic types. Some
modules are available with back lighting, so so that they can be viewed in dimly-lit
conditions. The back lighting may be either electro-luminescent, requiring a high
voltage inverter circuit, or simple LED illumination.
PIN DESCRIPTION:
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16
Pins (two pins are extra in both for back-light LED connections).
37
-
8/4/2019 Infra-red Beam for Bank Security
48/66
Figure-22: pin diagram of 1x16 lines LCD
Pin Symbol Function
1 Vss Power supply(GND)
2 Vdd Power supply(+5v)
3 Vo Contrast adjust
4 RS Introduction/data register sheet
5 R/W Data bus line
6 E Enable signal
7 14
DB0-
DB7 Data bus line
15 A Power supply for LED B/L(+)
16 K Power supply for LED B/L(-)
Table-7
CONTROL LINES:
EN:
Line is called "Enable." This control line is used to tell the LCD that you are
sending it data. To send data to the LCD, your program should make sure this line is
low (0) and then set the other two control lines and/or put data on the data bus. When
the other lines are completely ready, bring EN high (1) and wait for the minimum
amount of time required by the LCD datasheet (this varies from LCD to LCD), and
end by bringing it low (0) again.
RS:
38
-
8/4/2019 Infra-red Beam for Bank Security
49/66
Line is the "Register Select" line. When RS is low (0), the data is to be treated as a
command or special instruction (such as clear screen, position cursor, etc.). When RS
is high (1), the data being sent is text data which sould be displayed on the screen. For
example, to display the letter "T" on the screen you would set RS high.
RW:
Line is the "Read/Write" control line. When RW is low (0), the information on
the data bus is being written to the LCD. When RW is high (1), the program is
effectively querying (or reading) the LCD. Only one instruction ("Get LCD status") is
a read command. All others are write commands, so RW will almost always be low.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of
operation selected by the user). In the case of an 8-bit data bus, the lines are referred
to as DB0, DB1, DB2, DB3, DB4, DB5, DB6, and DB7.
Logic status on control lines:
E - 0 Access to LCD disabled
- 1 Access to LCD enabled
R/W - 0 Writing data to LCD
- 1 Reading data from LCD
RS - 0 Instructions
- 1 Character
Writing data to the LCD:
1) Set R/W bit to low
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
39
-
8/4/2019 Infra-red Beam for Bank Security
50/66
Read data from data lines (if it is reading)on LCD:
1) Set R/W bit to high
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
Entering Text:
First, a little tip: it is manually a lot easier to enter characters and commands in
hexadecimal rather than binary (although, of course, you will need to translate
commands from binary couple of sub-miniature hexadecimal rotary switches is a
simple matter, although a little bit into hex so that you know which bits you are
setting). Replacing the d.i.l. switch pack with a of re-wiring is necessary.
The switches must be the type where On = 0, so that when they are turned to
the zero position, all four outputs are shorted to the common pin, and in position F,
all four outputs are open circuit.
All the available characters that are built into the module are shown in Table 3.
Studying the table, you will see that codes associated with the characters are quoted in
binary and hexadecimal, most significant bits (left-hand four bits) across the top, and
least significant bits (right-hand four bits) down the left.
Most of the characters conform to the ASCII standard, although the Japanese
and Greek characters (and a few other things) are obvious exceptions. Since theseintelligent modules were designed in the Land of the Rising Sun, it seems only fair
that their Katakana phonetic symbols should also be incorporated. The more extensive
Kanji character set, which the Japanese share with the Chinese, consisting of several
thousand different characters, is not included!
Using the switches, of whatever type, and referring to Table 3, enter a few
characters onto the display, both letters and numbers. The RS switch (S10) must be
up (logic 1) when sending the characters, and switch E (S9) must be pressed for each
40
-
8/4/2019 Infra-red Beam for Bank Security
51/66
of them. Thus the operational order is: set RS high, enter character, trigger E, leave RS
high, enter another character, trigger E, and so on.
The first 16 codes in Table 3, 00000000 to 00001111, ($00 to $0F) refer to the
CGRAM. This is the Character Generator RAM (random access memory), which can
be used to hold user-defined graphics characters. This is where these modules really
start to show their potential, offering such capabilities as bar graphs, flashing symbols,
even animated characters. Before the user-defined characters are set up, these codes
will just bring up strange looking symbols.
Codes 00010000 to 00011111 ($10 to $1F) are not used and just display blank
characters. ASCII codes proper start at 00100000 ($20) and end with 01111111
($7F). Codes 10000000 to 10011111 ($80 to $9F) are not used, and 10100000 to
11011111 ($A0 to $DF) are the Japanese characters.
41
-
8/4/2019 Infra-red Beam for Bank Security
52/66
Figure-23
42
-
8/4/2019 Infra-red Beam for Bank Security
53/66
Initialization by Instructions:
Figure-24
If the power conditions for the normal operation of the internal
reset circuit are not satisfied, then executing a series of instructions must
initialize LCD unit. The procedure for this initialization process is as
above show.
11.Keil Software43
-
8/4/2019 Infra-red Beam for Bank Security
54/66
Keil Software
Installation:
Installing the Keil software on a Windows PC
Insert the CD-ROM in your computers CD drive
On most computers, the CD will auto run, and you will see the Keilinstallation menu. If the menu does not appear, manually double click on theSetup icon, in the root directory: you will then see the Keil menu.
On the Keil menu, please select Install Evaluation Software. (You will notrequire a license number to install this software).
Follow the installation instructions as they appear.
Loading the Projects:
The example projects for this book are NOT loaded automaticallywhen you install the Keil compiler.
These files are stored on the CD in a directory /Pont. The files are arranged by
chapter: for example, the project discussed in Chapter 3 is in the directory
/Pont/Ch03_00-Hello.
Rather than using the projects on the CD (where changes cannot be saved), please
copy the files from CD onto an appropriate directory on your hard disk.
Note: you will need to change the file properties after copying: file transferred from
the CD will be read only.
Configuring the Simulator:
Open the Keil Vision2
Go to Project Open Project and browse for Hello in Ch03_00 in Pont and
open it.
Go to Project Select Device for Target Target1
Select 8052(all variants) and click OK
Now we need to check the oscillator frequency:
Go to project Options for Target Target1
Make sure that the oscillator frequency is 12MHz.
Running the Simulation
Having successfully built the target, we are now ready to start the debug
session and run the simulator. First start a debug session
44
-
8/4/2019 Infra-red Beam for Bank Security
55/66
The flashing LED we will view will be connected to Port 1. We therefore want
to observe the activity on this port
To ensure that the port activity is visible, we need to start the periodic
window update flag
Go to Debug - Go
While the simulation is running, view the performance analyzer to check the
delay durations.
Go to Debug Performance Analyzer and click on it
Double click on DELAY_LOOP_Wait in Function Symbols: and click Define
button
12.IR Advantages:
1. Low power requirements: therefore ideal for laptops, telephones, personal
digital assistants2. Low circuitry costs: $2-$5 for the entire coding/decoding circuitry
45
-
8/4/2019 Infra-red Beam for Bank Security
56/66
3. Simple circuitry: no special or proprietary hardware is required, can beincorporated into the integrated circuit of a product
4. Higher security: directionality of the beam helps ensure that data isn't leakedor spilled to nearby devices as it's transmitted
5. Portable
6. Few international regulatory constraints: IrDA (Infrared Data Association)functional devices will ideally be usable by international travelers, no matterwhere they may be
7. High noise immunity: not as likely to have interference from signals fromother devices
IR Disadvantages:
1. Line of sight: transmitters and receivers must be almost directly aligned (i.e.able to see each other) to communicate
2. Blocked by common materials: people, walls, plants, etc. can blocktransmission
3. Short range: performance drops off with longer distances4. Light, weather sensitive: direct sunlight, rain, fog, dust, pollution can affect
transmission5. Speed: data rate transmission is lower than typical wired transmission
Applications:
1.Object Detection using IR light:
It is the same principle in ALL Infra-Red proximity sensors. The basic idea isto send infra red light through IR-LEDs, which is then reflected by any object in frontof the sensor and pick-up the reflected IR light
we are going to use another IR-LED, to detect the IR light that was emitted from
another led of the exact same type.
2. Wheel Encoder:
46
-
8/4/2019 Infra-red Beam for Bank Security
57/66
This is a simple wheel encoder based on the idea that white stripes will reflect IR light,while black ones will absorb it. this will result in a series of electrical pulses as thewheel is rotating, providing the microcontroller with precious information that can beused to calculate displacement, velocity or even acceleration. It is now clear that thiskind of sensor has to be Always ON, to detect every single white stripe passing infront of it, to achieve accurate results.
Contact-Less tachometer:
This is a tachometer, that counts the revolutions per minute of a rotating object, given
that the object has a reflective stripe glued on it, that will pass in front of the IR sensor
for each and every revolution, giving a pulse per revolution. Again a microcontroller
will have to be used to 'understand' the data provided by the sensor and display it.
These are some of the applications of IR technology.
13. Flow Chart:
47
http://ikalogic.com/d_tach.phphttp://ikalogic.com/d_tach.phphttp://ikalogic.com/d_tach.php -
8/4/2019 Infra-red Beam for Bank Security
58/66
14.Source Code:
#include
48
-
8/4/2019 Infra-red Beam for Bank Security
59/66
#include
sbit ir=P0^0;
sbit buzz=P0^1;
sbit relay=P0^2;
sfr LCD=0xA0; /* LCD is connected to Port
P0(P1.4, P1.5, P1.6, P1.7) and its address is 90 */
sbit RW=LCD^1;
sbit RS=LCD^0; /* RS Connected to P1.2*/
sbit EN=LCD^2; /* E Connected to P1.3 */
void cmd_lcd(unsigned char );
void display_lcd(unsigned char );
void delay(unsigned int );
void lcd_init(void);
void display_string(char*);
void set_status(int count);
char *welcome="BANK SECURITY";
/* Start of Main */
void main()
49
-
8/4/2019 Infra-red Beam for Bank Security
60/66
{
lcd_init();
cmd_lcd(0x01);
display_string(welcome);
delay(100);
if(ir==0)
{
goto end;
}
else
{
buzz=0;
relay=0;
cmd_lcd(0x01);
display_string("secure");
while(ir);
}
end:
{
buzz=1;
relay=1;
50
-
8/4/2019 Infra-red Beam for Bank Security
61/66
cmd_lcd(0x01);
display_string("object detected");
}
while(1);
}
/* Initialise LCD module */
void lcd_init(void)
{
delay(10);
cmd_lcd(0x28); /* Function set 4-bit*/
// cmd_lcd(0x28);
//cmd_lcd(0x28);
cmd_lcd(0x0e); /* Display on cursor on */
cmd_lcd(0x01); /* Clear display */
cmd_lcd(0x06); /* Entry mode */
cmd_lcd(0x80); /* First Line Address */
}
/* Commands set for LCD */
void cmd_lcd(unsigned char x)
{
unsigned char y;
51
-
8/4/2019 Infra-red Beam for Bank Security
62/66
y=x>>4;
LCD=y
-
8/4/2019 Infra-red Beam for Bank Security
63/66
for(i=0;i
-
8/4/2019 Infra-red Beam for Bank Security
64/66
16. Future scope:
Due to rapid advances in infrared detector technology, the development of
adaptive optics for ground based work and the commitment to infrared missions from
space organizations such as NASA, ESA and ISAS, the future of infrared astronomy
is extremely bright. Within the next decade, infrared astronomy will bring us exciting
discoveries about new planets orbiting nearby stars, how planets, stars and galaxies
are formed, the early universe, starburst galaxies, brown dwarfs, quasars and
interstellar matter
54
-
8/4/2019 Infra-red Beam for Bank Security
65/66
17. Bibliography:
The 8051 Micro controller and Embedded Systems-Muhammad Ali MazidiJanice Gillispie Mazidi
The 8051 Micro controller Architecture,Programming & Applications
-Kenneth J.Ayala
Fundamentals of Micro processors and Micro computers
-B.Ram
55
-
8/4/2019 Infra-red Beam for Bank Security
66/66
Micro processor Architecture, Programming& Applications
-Ramesh S.Gaonkar
Electronic Components
-D.V.Prasad
References on the Web:
www.national.comwww.atmel.com
www.microsoftsearch.comwww.geocities.comhttp://tycho.usno.navy.mil/gpscurr.html
http://www.national.com/http://www.atmel.com/http://www.microsoftsearch.com/http://www.geocities.com/http://www.national.com/http://www.atmel.com/http://www.microsoftsearch.com/http://www.geocities.com/
top related