Professional Documents
Culture Documents
PROJECT REPORT
Automatic Room
light
PROJECT
control
with
visitor
REPORT
counter
5. REFERENCES
.......32
INTRODUCTION
Page
1
Visitor Counter
PROJECT REPORT
INTRODUCTION :
Main concept behind this project is to measure and
display the number of persons entering in any room
like seminar hall, conference room. LCD display
placed outside the room displays this value. And
when number of persons inside the room are zero,
power supply inside the room can be cut using a
relay interface.
This system can be helpful in saving a lot of energy.
Page
2
Visitor Counter
PROJECT REPORT
Working :
The project uses c P89V51RD2 as the
controlling element. It uses two LDR sensors and two
Light transmitters. When the person comes in path
of light beam then sensor gives zero voltage to c.
This zero voltage is detected then c decides to
increment or decrement the visitor count.
As there are two sensors, let us say sensors
A and B, where sensor A is placed before the door
and sensor B is placed after the door.
If a person is entering the room sensor A will
detect first and then sensor B this means that
person is entering the room. If a person is leaving
the room then sensor B will detect first and then the
sensor A this means the person is going out.
Microcontroller counts accordingly the
number of persons inside a room , if the counts
becomes zero then microcontroller switches off the
relay that in turn switches off all the lights of the
room.
Page
3
Visitor Counter
PROJECT REPORT
DESIGN
OF
PROJECT
BLOCK DIAGRAM:
Page
4
Visitor Counter
PROJECT REPORT
Page
5
Visitor Counter
PROJECT REPORT
Circuit Diagram:
Page
6
Visitor Counter
PROJECT REPORT
Electrical Connections:
DOOR
Page
7
Visitor Counter
PROJECT REPORT
Page
8
Visitor Counter
PROJECT REPORT
PCB Layout:
Page
9
Visitor Counter
PROJECT REPORT
Page
10
Visitor Counter
PROJECT REPORT
List of Components:
Page
11
Visitor Counter
PROJECT REPORT
Program Code:
#include<reg51.h>
#include<stdio.h>
//LCD
sbit LCDrs=P3^2;
sbit LCDen=P3^3;
sbit LDR1=P2^0;
sbit LDR2=P2^1;
sbit relay=P1^2;
Visitor Counter
PROJECT REPORT
LCDrs=0;
LCDen=1;
P0=DATA;
LCDrs=0;
LCDen=0;
}
Visitor Counter
PROJECT REPORT
lcdcmd (0x0C);
delay(1);
lcdcmd (0x01);
delay(1);
lcdcmd (0x06);
delay(1);
}
LCDrs=1;
LCDen=1;
P0=DATA;
LCDrs=1;
LCDen=0;
}
Page
14
Visitor Counter
PROJECT REPORT
void main()
{
int visitor;
char abc[16];
Page
15
Visitor Counter
PROJECT REPORT
initialize ();
P2=0xFF;
display_lcd(0x00, "Visitor Counter");
display_lcd(0x40, "
");
delay(300);
while(1)
{
if(LDR1==1)
{
while(LDR2==0);
visitor++;
sprintf(abc,"%d ",visitor);
display_lcd(0x40,abc);
delay(100);
}
Page
16
Visitor Counter
PROJECT REPORT
if(LDR2==1)
{
while(LDR1==0);
visitor--;
sprintf(abc,"%d ",visitor);
display_lcd(0x40,abc);
delay(100);
}
}
Page
17