Sie sind auf Seite 1von 10

A MINI PROJECT REPORT

ON

“MOTION SENSOR USING PIR AND 8051”

Submitted in partial fulfilment of the requirements


of the degree of

“Third Year Semester-V of Bachelor of Engineering”

By
Shreya M. Moon
Shruti M. Moon
Mayuri S. Patil

Department of Electronics of Engineering 2019-20


DATTA MEGHE COLLEGE OF ENGINEERING
Sector 3, Airoli, Navi Mumbai-400708
Department of Electronics Engineering
Academic Year 2018-19
CERTIFICATE

This is to certify that the following students has performed and completed
satisfactorily in subject of “Microcontroller and Application”(Mini project)
Semester V of Bachelor of Engineering of University of Mumbai.
Name Division Roll No. Exam seat Signature
no.
SHREYA M. MOON B 19

SHRUTI M. MOON B 20

MAYURI S. PATIL B 29

Practical In-charge H.O.D. Principal

Internal Examiner External Examiner


ACKNOWLEDGMENT

With immense pleasure, we hereby take the privilege to present our project report
on “MOTION SENSOR USING PIR AND 8051”
We would like to express our special thanks and gratitude to those who gave their
valuable time for helping us in completing this project.
Expressing our gratitude and thanking to H.O.D. Dr. D. J. Pete Sir who provided
us all the required facilities for completion of the project. We would like to thank
our Subject Teacher Mr. Susheel Kumar Sir and lab incharge Mrs. Jain Mam
for their constant support and guidance.
Also, we would like to thank Mr. S. B. Patil Sir, other teaching and non-teaching
staff of Datta Meghe College of Engineering & our friends who directly or
indirectly helped us a lot for completing this project.
INTRODUCTION

The Intel 8051 microcontroller is one of the most popular general purpose
microcontrollers in use today. The success of the Intel 8051 spawned a number of
clones, which are collectively referred to as the MCS-51 family of
microcontrollers, which includes chips from vendors such as Atmel, Philips,
Infineon, Analog Devices and Texas Instruments.

BLOCK DIAGRAM OF MICROPROCESSOR


HARDWARE DESIGN

Interfacing PIR sensor to 8051

The 8051 considers any voltage between 2 and 5V at its port pin as HIGH and any
voltage between 0 to 0.8V as LOW. Since the output of the PIR sensor module has
only two stages (HIGH (3.3V) and LOW (0V)) , it can be directly interfaced to the
8051 microcontroller. The circuit diagram for interfacing PIR sensor to 8051
microcontroller is shown below.

The circuit shown above will read the status of the output of the PIR sensor and
switch ON the LED when there is a motion detected and switch OFF the LED
when there is no motion detected. The output pin of the PIR sensor is connected to
Port 3.5 pin of the 8051. Resistor R1, capacitor C1 and push button switch S1
forms the reset circuit. Capacitors C3, C4 and crystal X1 are associated with the
oscillator circuit. C2 is just a decoupling capacitor. LED is connected through Port
2.0 of the microcontroller. Transistor Q1 is used for switching the LED. R2 limits
the base current of the transistor and R3 limits the current through the LED. 
COMPONENTES
1. 8051 Interfacing IC
2. PIR sensor
3. Crystal Oscillator (12MHz)
4. BC548 transistor
5. Resistor
6. Capacitor
7. Wires
8. Buzzer
9. LED

PIR SENSOR
PIR sensor is the abbreviation of Passive Infrared Sensor. It measures the
amount of infrared energy radiated by objects in front of it. They do not emit
any kind of radiation but senses the infrared waves emitted or reflected by
objects. The heart of a PIR sensor is a solid state sensor or an array of such
sensors constructed from pyroelectric materials. The pyroelectric material is
material by virtue of it generates energy when exposed to radiation. Gallium
Nitride is the most common material used for constructing PIR sensors.
Suitable lenses are mounted at the front of the sensor to focus the incoming
radiation to the sensor face. Whenever an object or a human passes across
the sensor the intensity of the of the incoming radiation with respect to the
background changes. As a result the energy generated by the sensor also
changes. Suitable signal conditioning circuits convert the energy change to a
suitable voltage output. In simple words, the output of a PIR sensor module
will be HIGH when there is motion in its field of view and the output will be
LOW when there is no motion.
DSN-FIR800 is the PIR sensor module used in this project. Its image is
shown above.  It operates from 4.5 to 5V supply and the standby current
is less than 60uA. The output voltage will be 3.3V when the motion is
detected and 0V when there is no motion. The sensing angle cone is 110°
and the sensing range is 7 meters. The default delay time is 5 seconds. There
are two present resistors on the sensor module. One is used for adjusting the
delay time and the other is used for adjusting the sensitivity. Refer the
datasheet of DSN-FIR800 for knowing more.

PIN DIAGRAM OF 8951


he AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller
with 4K bytes of in-system programmable Flash memory
The AT89S51 provides the following standard features: 4K bytes of Flash,
128 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, two 16-
bit timer/counters, a five vector two-level interrupt architecture, a full duplex
serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S51
is designed with static logic for operation down 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 external interrupt or hardware reset.

Port Pin Alternate function


P3.0 RXD (serial input port)
P3.1 TXD (serial output port)
P3.2 INT0 (external interrupt 0)
P3.3 INT1 (external interrupt 1)
P3.4 T0 (timer 0 external input)
P3.5 T1 (timer 1 external input)
P3.6 WR (external data memory write strobe)
P3.7 RD (external data memory read strobe)

SOFTWARE DESIGN

Interfacing Program with 8051

PIR EQU P3.5

LED EQU P2.0

ORG 00H

CLR P2.0

SETB P3.5

HERE: JNB PIR, HERE

SETB LED

HERE1: JB PIR, HERE1

CLR LED

SJMP HERE

END

HEX FILE:
:03000000020800F3
:0C080000787FE4F6D8FD75810702000047
:10000000C2A0D2B530B5FDD2A020B5FDC2A080F40B
:00000001FF

The status of the output of the PIR sensor is checked using JNB and JB
instructions. Code “HERE: JNB PIR, HERE” loops there until the output of the
PIR sensor is HIGH. When it becomes HIGH it means a motion detected and the
program sets P2.O HIGH in order to make the LED ON. The output pin of the PIR
sensor remains HIGH for 5 seconds after a motion is detected. Code”HERE1: JB
PIR, HERE1″ loops there until the output of the PIR sensor becomes LOW. When
it becomes LOW the loop is exited and Port 2.0 is made LOW for switching OFF
the LED. Then the program jumps back to label “HERE” and the entire cycle is
repeated.

CONCLUSION:
Thus to conclude we have designed the PIR Sensor with 8051 which is very useful
in daily life & security, we have successfully completed the project, also we got to
learn and experience new topic.

Das könnte Ihnen auch gefallen