Beruflich Dokumente
Kultur Dokumente
PROJECT CERTIFICATE
This is to certify that, the project title,
Distance measurement using InfraRed sensor with ADC0804 & 8051 microcontroller
(AT89C51)
.
IS SUCCESSFULLY COMPLETED BY
PROJECT GUIDE
(
HEAD OF DEPARTMENT
PRINCIPAL
(
INTERNAL EXAMINER
EXTERNAL EXAMINER
PREFACE
We take an opportunity to present this project report on
Distance measurement using InfraRed sensor with ADC0804 & 8051
microcontroller (AT89C51) & put before readers some information
regarding our project.
We have made sincere attempts & taken every care to present
this matter in precise & compact form, the language being as simple as
possible.
CONTENTS
.
Sr.No
Topics
.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
Page No.
.
Acknowledgement
Introduction To The Project
Block diagram
Working
Components Required
Methodology
PCB Layout
Troubleshooting
Advantages
Disadvantages
Application
Conclusion
Bibliography
5
6
8
13
17
18
20
21
22
23
24
25
26
ACKNOWLEDGEMENT
It is indeed a matter of great pleasure and proud privilege to be
able to present this project on Distance measurement using InfraRed
sensor with ADC0804 & 8051 microcontroller (AT89C51) .
We would wish to thank the non-teaching staff and our friends who
have helped us all the time in one way or other.
BLOCK DIAGRAM
IR led
An IR LED, also known as IR transmitter, is a special purpose LED that
transmits infrared rays in the range of 760 nm wavelength. Such LEDs are
usually made of gallium arsenide or aluminium gallium arsenide. They,
along with IR receivers, are commonly used as sensors.
The appearance is same as a common LED. Since the human eye cannot
see the infrared radiations, it is not possible for a person to identify whether
the IR LED is working or not, unlike a common LED. To overcome this
problem, the camera on a cellphone can be used. The camera can show us
the IR rays being emanated from the IR LED in a circuit.
Pin Diagram:
Preset
Pin Diagram:
10
Lcd
LCD (Liquid Crystal Display) screen is an electronic display module and
find a wide range of applications. A 16x2 LCD display is very basic module
and is very commonly used in various devices and circuits. These modules
are preferred over seven segments and other multi segment LEDs. The
reasons being: LCDs are economical; easily programmable; have no
limitation of displaying special & even custom characters (unlike in seven
segments), animations and so on.
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 the character to be displayed on the LCD.
11
Pin Diagram:
12
Pin Description:
Pin
No
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Function
Name
Ground (0V)
Supply voltage; 5V (4.7V 5.3V)
Contrast adjustment; through a variable resistor
Selects command register when low; and data
register when high
Low to write to the register; High to read from the
register
Sends data to data pins when a high to low pulse is
given
Ground
Vcc
VEE
Register
Select
Read/write
Enable
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
Led+
Led13
AT89C51
AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family.
ATMEL 89C51 has 4KB of Flash programmable and erasable read only
memory (PEROM) and 128 bytes of RAM. It can be erased and program to
a maximum of 1000 times.
In 40 pin AT89C51, there are four ports designated as P 1, P2, P3 and P0. All
these ports are 8-bit bi-directional ports, i.e., they can be used as both input
and output ports. Except P 0 which needs external pull-ups, rest of the ports
have internal pull-ups. When 1s are written to these port pins, they are
pulled high by the internal pull-ups and can be used as inputs. These ports
are also bit addressable and so their bits can also be accessed individually.
14
Port P0 and P2 are also used to provide low byte and high byte addresses,
respectively, when connected to an external memory. Port 3 has
multiplexed pins for special functions like serial communication, hardware
interrupts, timer inputs and read/write operation from external
memory. AT89C51 has an inbuilt UART for serial communication. It can be
programmed to operate at different baud rates. Including two timers &
hardware interrupts, it has a total of six interrupts.
Pin Diagram:
15
Pin Description:
16
Pin
No
Function
Name
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
10
RxD
P3.0
11
TxD
P3.1
12
External interrupt 1
Int0
P3.2
13
External interrupt 2
Int1
14
T0
15
T1
16
Write
P3.6
17
Read
P3.7
18
19
20
Reset
8 bit
input/output P3.3
port (P3)
P3.4
pins
P3.5
Crystal 2
Crystal 1
Ground
21
P2.0/ A8
22
P2.1/ A9
17
ADC0804
Analog to digital converters find huge application as an intermediate device
to convert the signals from analog to digital form. These digital signals are
used for further processing by the digital processors. Various sensors like
temperature, pressure, force etc. convert the physical characteristics into
electrical signals that are analog in nature.
ADC0804 is a very commonly used 8-bit analog to digital convertor. It is a
single channel IC, i.e., it can take only one analog signal as input. The
digital outputs vary from 0 to a maximum of 255. The step size can be
adjusted by setting the reference voltage at pin9. When this pin is not
connected, the default reference voltage is the operating voltage, i.e., Vcc.
The step size at 5V is 19.53mV (5V/255), i.e., for every 19.53mV rise in the
analog input, the output varies by 1 unit. To set a particular voltage level as
18
the reference value, this pin is connected to half the voltage. For example,
to set a reference of 4V (Vref), pin9 is connected to 2V (Vref/2), thereby
reducing the step size to 15.62mV (4V/255).
ADC0804 needs a clock to operate. The time taken to convert the analog
value to digital value is dependent on this clock source. An external clock
can be given at the Clock IN pin. ADC 0804 also has an inbuilt clock which
can be used in absence of external clock. A suitable RC circuit is connected
between the Clock IN and Clock R pins to use the internal clock.
Pin Diagram:
19
Pin Description:
20
Pin
No
1
Function
Name
Chip select
3
4
5
6
7
Ground(0V)
9
10
11
12
13
14
15
16
17
18
19
20
Read
Write
Clock IN
Interrupt
Vin(+)
Vin(-)
Analog
Ground
Vref/2
Digital Ground
D7
D6
D5
D4
D3
D2
D1
D0
Clock R
Vcc
WORKING
21
ADC component
LCD module.
23
COMPONENTS REQUIRED
1K
4.7K
10K
47K
100K
1NOS
1NOS
1NOS
1NOS
1NOS
0.01F
100 F/
16V
2NOS
1NOS
1C555
BC548
2 8E
SPK/.
1N4148
GER DIODE
1NOS
1NOS
CAPACITORS
C1,2
C3
MISC
IC1
T1
LS
D1
1NOS
1NOS
24
METHODOLOGY
Design your circuit board. Use PCB Wizard software to draw your
circuit board. You can also use a perforated board that has pre-drilled
holes in it to help you see how your circuit board's components would
be placed and work in reality.
Buy a plain board that is coated with a fine layer of copper on one
side from a retailer.
Scrub the board with a scouring pad and water to make sure the
copper is clean. Let the board dry.
Print your circuit board's design onto the dull side of a sheet of blue
transfer paper. Make sure the design is oriented correctly for transfer.
Place the blue transfer paper on the board with the circuit board's
printed design against the copper.
Lay a sheet of ordinary white paper over the blue paper. Following
the transfer paper's instructions, iron over the white and blue paper to
transfer the design onto the copper board. Iron every design detail
that appears near an edge or corner of the board with the tip of the
iron.
Let the board and blue paper cool. Peel the blue paper slowly away
from the board to see the transferred design.
25
Examine the transfer paper to check for any black toner from the
printed design that failed to transfer to the copper board. Make sure
the board's design is oriented correctly.
Replace any missing toner on the board with ink from a black
permanent marker. Allow the ink to dry for a few hours.
Remove exposed parts of the copper from the board using ferric
chloride in a process called etching.
Wash all the etching equipment and the circuit board thoroughly with
plenty of running water.
Drill 0.03 inch (0.8 mm) lead component holes into your circuit board
with high-speed steel or carbide drill bits. Wear safety goggles and a
protective mask to protect your eyes and lungs while you drill.
Scrub the board clean with a scouring pad and running water. Add
your board's electrical components and solder them into place.
26
PCB LAYOUT
27
TROUBLESHOOTING
After building up the entire project we came to know that our project was
not working, this condition was havoc for us.
28
1. Early Warning
Many fires occur at night or in a room or section that no one may
be in at the time. The audible alert from the fire alarm can wake
individuals up who may otherwise sleep while inhaling smoke. The
alert can also provide an early signal during the day to individuals
who, if not for the alarm, would not have the time needed to
escape the home or building before the fire spreads out of control.
2. Flexibility to place them in specific rooms and areas of your
choice.
3. Low Cost
A fire system that is remotely monitored on a continuous basis is
normally part of an agreement with an alarm company that also
includes burglar alarms.
29
DISADVANTAGES
3. None what so ever!!! They are there to save lives- whatever they
do. Although they could be a nuisance if they do cause false
activations by themselves.
30
APPLICATION
1. Fire alarms can be used in any place like parks,
theaters, HOTELS, restaurants, boats, ships, etc.
2. Fire alarms can be also used as temperature sensors in some
applications, when the temperature goes up abruptly it can inform.
3. Fire alarm can be used in our home for safety purpose and it is a
very good precautionary measure.
31
CONCLUSION
A fire alarm is a device that detects the presence of fire and atmospheric
changes relating tosmoke. In some cases, a firm alarm is a part of a
complete security system, in addition to aburglary protection system. The
fire alarm operates to alert people to evacuate a location inwhich a fire
or smoke accumulation is present.
32
BIBLIOGRAPHY
33