Sei sulla pagina 1di 6

BIDIRECTIONAL VISITOR COUNTER

ABSTRACT:
This project describes the design and working of a bidirectional visitor counter. The main
intention is to design a system wherein the number of persons entering or leaving a room is displayed
on a screen. When a person enters the room, count would be increased, whereas on leaving, the count
would decrease. IR sensing mechanism is used to sense the presence of visitors and the whole
counting operation is done by a microcontroller.

INTRODUCTION:
Many times there is a need to monitor the person/people visiting some place like Seminar hall,
conference room or Shopping mall or temple. This project can be used to count and display the
number of visitors entering inside any conference room or seminar hall. This is a bidirectional counter
which means it works in a two way. That means counter will be incremented if person enters the
room and will be decremented if a person leaves the room. LCD displays this value which is placed
outside the room.
This system is helpful for counting the number of people in an auditorium or halls for seminar
to avoid congestion. Moreover it can also be used to check the number of people who have come to
an event or a museum to watch a certain exhibit. Microcontroller is a reliable circuit that takes over
the task of counting the number of persons/ visitors in the room very accurately. In this project there
are showing both In count i.e. number of people entering the room and Out count i.e. number of
people exiting the room on a 16x2 Alphanumeric LCD. An IR sensor is used to monitor the person
entering and exiting the room.
The microcontroller does the above job. It receives the signals from the sensors, and this
signal is operated under the control of software which is stored in ROM. Microcontroller 89s52
continuously monitor the Infrared Receivers. When any object pass through the IR Receiver's then the
IR Rays falling on the receiver are obstructed, this obstruction is sensed by the Microcontroller.

BLOCK DIAGRAM:
When the system is powered, the compiler initially initializes the stack pointer and all other
variables. It then scans the input ports (PortP1.0 first). In the meantime, when there is no interruption
between the IR LED and the phototransistor of the first sensor pair, the output of the phototransistor
is always at low voltage. In other words port P1.0 is at logic low level. Now when a transition takes
place, i.e. a logic high level is received at port P1.0, the compiler sees this as an interruption to sense
the passage of a person or an object between the IR LED and the phototransistor. As per the program,
the count value is increased and this value is displayed on the 2-Digit Counter. Now the compiler
starts scanning the other input pin-P1.1. Similar to the first sensor pair, for this sensor pair also the
phototransistor conducts in absence of any interruption and P1.1 is at logic low level. In case of an
interruption, the pin P1.1 goes high and this interruption is perceived by decreasing the value of
count.
The program ensures that the scanning of both the port pins is done at certain delays so as to
avoid confusion of reading. For instance port P1.0 is scanned for two or three interruptions so as to
ensure the count value is above 1 or 2.
Infra red sensors are a type of light sensors they function in the infra red part of the frequency
spectrum. IR sensors are active sensors they consist of an emitter and a Receiver. When the beam is
cut the controller then accordingly comes to know if the person is entering or exiting and then
1

accordingly increments or decrements the count which is then displayed on the 16 x 2 Alphanumeric
LCD.
From the block diagram it is clear that the sensor pairs are placed face to face so that an
IR radiations from IR LED are continuously received by phototransistor which makes its emitter
base junction forward and collector current Ic equals to emitter current Ie (i.e, Ic=Ie) assuming
base current to be negligible. Hence the voltage at collector node becomes zero (logic 0) which is
feed to microcontroller port pin P3.2 and P3.3, if any object is placed in between the sensor pair
blocks the IR radiation which in turns put the phototransistor in cut-off mode and
Ic!=Ie, this
makes collector voltage to +5V (logic 1)

WORKING PRINCIPLE:
The circuit works on the principle of IR sensing. Two sets of IR sensors consisting of an IR
LED and photo transistor are placed at two ends. Output from each sensor is fed to the
microcontroller. In normal operation, IR light from the LED would fall on the photo transistor and the
latter would conduct. The output from the sensor would be a logic low signal in this case. In case of
any interruption (due to any person crossing the path), the photo transistor would cease to conduct or
conduct less and the output from the sensor would be a logic high signal. The transition from low to
high, for each sensor pair is detected by the microcontroller and accordingly the count would be
increased or decreased.

CIRCUIT COMPONENTS:

R1, R3 760 Ohms

C1 10uF, electrolyte

R2, R4 3K

C2, C3 15pF

R5 10K

X1 12MHz crystal
2

U1 AT89C51

D1, D2 IR LED

U4 2-Digit 7 segment display

Q1, Q2 IR Phototransistor

CIRCUIT DIAGRAM:

Fig. Circuit Diagram of Bidirectional Visitor Counter

CIRCUIT DESIGN:

The heart of the circuit design lies in designing the microcontroller interface. Here we
use the microcontroller AT89C51 which is an 8051 family microcontroller. The microcontroller
AT89C51 is interfaced to the IR sensor pairs at two ports pins P1.0 and P1.1 respectively. The 2Digit 7 segment display is interfaced to the microcontroller at ports P0 and P2.
Another important aspect of the design involves designing the oscillator circuit and the reset
circuit. The oscillator circuit is designed by selecting a 12MHz quartz crystal and two ceramic
capacitors-each 15pF.

The reset circuit is designed by selecting a resistor of 10K and an electrolyte capacitor
of 10uF to ensure a reset pulse width of 100ms and reset pin voltage drop of 1.2V.
3


The sensor circuit is designed by selecting appropriate value of resistors for both the
LED and the phototransistor. Since here the source voltage is 5V and IR LED forward voltage drop
is about 1.2V, the value of resistor (at on current of 5mA) is calculated to be about 760 Ohms. The
phototransistor used here is Silicon NPN transistor QSC112 with maximum collector of 4mA. Since
here phototransistor is used in switching mode, the required collector resistor should be greater than
1.25K (Vcc/Ic = 5/4). Here 5K resistor is used.

HARDWARE REQUIREMENTS:
Microcontroller 89s52
LCD: 16x2 Alphanumeric Display

SOFTWARE REQUIREMENTS:

Keil Software as Compiler.

IR Sensors
Microcontroller Development Kit

Proteus for Circuit Designing

Protel for PCB Designing.

Flash Magic or SISP or Any Flashing


Software

APPLICATIONS:

This circuit can be used domestically to get an indication of number of persons entering party,
official meetings.
It can also be used as home automation system to ensure energy saving by switching on the
loads and fans only when needed
It can be used in colleges and schools to get information on message to find the number of
students in the class

TIME REQUIRED:

For Simple project development - 1 month


For any future development
- 2 months in addition

COST ESTIMATION:

S
L
.
N
O
1

REQIUREMENTS

DISCRETE COMPONENTS

MICROCONTROLLER DEVELOPMENT KIT

MICROCONTROLLER

IR SENSOR

TRANSPORT CHARGES

OTHERS

TOTAL
FUTURE DEVELOPMENT(APPROXIMATELY)

GSM INTERFACE

SPEAKER
OTHERS

C
O
S
T
5
0
0
3
0
0
0
3
0
0
5
0
0
8
0
0
5
0
0
5
6
0
0
2
0
0
0
2
0
0
5

GRAND TOTAL
Cost and time required can increase, if future development increases.

ADVANTAGES:

0
0
8
3
0
0

No need of human intervention.


Can work 24x7 without any problem.
Low cost and very easy to implement.

DISADVANTAGES:
If there are multiple doors for the same room the project becomes quite complex.
IR sensor cannot detect if lots of people are entering at one time.

FUTURE DEVELOPMENTS:

. We can

send this data to a remote location using mobile or internet


Voice alarm system can be added to indicate that room is full & persons cant enter inside.
We can interface GSM modem to send this data through SMS.
Lights can be turned ON/OFF according to the number of people in the room.

Potrebbero piacerti anche