Está en la página 1de 28

Bidirectional visitor counter

by
RAHUL KUMAR

Why do we need one ?


Visitors counter is basically a counting device for measurement of the visitor traffic entering and exiting at specific place

Metro stations Malls Sports venues Airports Toll gates Lift Car parking
BIDIRECTIONAL VISITOR COUNTER

What is it ?
Reliable circuit that takes over the task of counting number of persons/ visitors in the room very accurately

When anybody enters into the Room then the counter is Incremented by one and when any one leaves the room then the counter is decremented by one. The total number of persons inside the room is displayed on the seven segment displays.
BIDIRECTIONAL VISITOR COUNTER

Principle of Digital Counter


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 fed 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)

BIDIRECTIONAL VISITOR COUNTER

If sensor pair one is been obstructed (P3.2 becomes one) first, implies persons entry and second pair is obstructed (P3.3 becomes one) first shows exit.

BIDIRECTIONAL VISITOR COUNTER

ENTRY Receiver 1

Transmitter 1

Transmitter 2 Receiver 2 EXIT

D0-D7

Microcontroller

BIDIRECTIONAL VISITOR COUNTER

Components

Resistors Capacitors Transistors Quad Op-amp LM324 Integrated Circuits-74LS76(Dual JK Flipflop) Sensors AT89C2051 Microcontroller 7 segment display units ULN 2003AN device driver GS-SH-250T Relay Power Supply IR Transmitter
BIDIRECTIONAL VISITOR COUNTER

Resistor
Resistor is a passive component that resists the flow of direct or alternating electric circuit. The resistance of the resistor can be estimated by their colour codes. There are some non linear resistors whose resistance changes with temperature or light.

BIDIRECTIONAL VISITOR COUNTER

Capacitors
Capacitor is a passive component used to store charge.

Capacitors are used for smoothing power supply variations , coupling the various stages of audio system, tuning in radio circuits, store energy like in a camera flash.
BIDIRECTIONAL VISITOR COUNTER

Transistors
Transistor is a semiconductor device
used to amplify and switch electronic signals.

BIDIRECTIONAL VISITOR COUNTER

Quad op-amp LM324 op An op amp can be used to compare 2 different voltages. If we apply a reference voltage to one of the inputs and then use the other input to monitor a voltage from some point in a circuit, the output of the op amp will go from high to low (or vice-versa) as the monitored voltage crosses the reference voltage.

BIDIRECTIONAL VISITOR COUNTER

Integrated Circuits-74LS76(Dual CircuitsJK Flip Flop) Flop)


A flip-flop or latch is a circuit that has two stable states and can be used to store state information.

BIDIRECTIONAL VISITOR COUNTER

Sensors
A sensor is a device which receives and responds to a signal.

Optical sensors

BIDIRECTIONAL VISITOR COUNTER

Microcontroller/Microprocessor
It is world s most versatile element which human ever created . It find its application in every field which we can think of. It enable us to provide artificial intelligence to every kind of devices which lead to its automation. The bottom line is that it is the brain of any type of embedded system.
BIDIRECTIONAL VISITOR COUNTER

AT89C2051 Microcontroller
P1. P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 RST (RXD)P3. (TXD)P3.1 (INT )P3.2 (INT1)P3.3 (T )P3.4 (T1)P3.5 (WR)P3.6 (RD)P3.7 XTAL2 XTAL1 GND 1 2 3 4 5 6 7 8 9 1 11 12 13 14 15 16 17 18 19 2 4 39 38 37 36 35 34 33 32 31 3 29 28 27 26 25 24 23 22 21 Vcc P . (AD ) P .1(AD1) P .2(AD2) P .3(AD3) P .4(AD4) P .5(AD5) P .6(AD6) P .7(AD7) EA/VPP ALE/PROG PSEN P2.7(A15) P2.6(A14) P2.5(A13) P2.4(A12) P2.3(A11) P2.2(A1 ) P2.1(A9) P2. (A8)

8 51 (8 31)

Dual functionality port(P ,P2,P3)

BIDIRECTIONAL VISITOR COUNTER

Features of the AT89C2051 processor


Compatible with Intel 8051 2kB of internal FLASH program memory (1000 write cycles) Voltage range from 2.7 to 6 V Clock 0 Hz to 24 MHz 128 bytes of internal RAM 15 programmable I/O pins Two 16-bit counters/timers Analog comparator 6 interrupt sources Programmable UART - (RS232) 2 power-saving modes Small and non-expandable program memory

BIDIRECTIONAL VISITOR COUNTER

Program Source code


The program coding for this bidirectional visitor counter circuit is written in C language and is compiled using C51 Keil compiler. Program: #include <AT89x52.h> int i=0,j,k,l,m,a[ ]=[63,6,91,79,102,109,125,7,127,111];//Declaration for displaying no.from 0-9 void enter (void) interrupt 0// Interrupt definition for incrementing counter and provide delay { i++; if(i>999) i=999; P3_1=0; for(m=0;m<=1000;m++); P3_1=1; } void exit (void) interrupt 1// Interrupt definition for decrementing counter and provide delay { i--; if(i<0) i=0; P3_0=0; for(m=0;m<=1000;m++); P3_0=1; } BIDIRECTIONAL VISITOR COUNTER

Contd...

void main() { IE = 1333; TCON = 5; P3_0=1; P3_1=1; i=0; while(1) { j=i%10; k=i/10; l=i/100; k=k-l*10; P2=a[j]; P0=a[k]; P1=a[l]; }

BIDIRECTIONAL VISITOR COUNTER

Contd...

if (i==0) { P3_7=0; P3_6=0; } else if (i>=1 && i<=10) { P3_7=0; P3_6=1; } else if (i>=11) { P3_7=1; P3_6=1; } } }

BIDIRECTIONAL VISITOR COUNTER

7 segment display units


A seven-segment display, or seven-segment indicator, is a form of electronic display device for displaying decimal numerals. Seven-segment displays are widely used in digital clock, electronic meters, and other electronic devices for displaying numerical information.
BIDIRECTIONAL VISITOR COUNTER

LED (Infrared radiation led)


Led is a special kind of PN junction diode which work in forward bias and emit light in form of radiation.

If radiation is in range of infrared region i.e., 2500nm to 16000nm , it is said to be IR led.


BIDIRECTIONAL VISITOR COUNTER

GS-SHGS-SH-250 T Relay
We know that most of the high end industrial application devices have relays for their effective working. Relays are simple switches which are operated both electrically and mechanically.

BIDIRECTIONAL VISITOR COUNTER

Circuit diagram

BIDIRECTIONAL VISITOR COUNTER

BIDIRECTIONAL VISITOR COUNTER

BIDIRECTIONAL VISITOR COUNTER

Procedure

BIDIRECTIONAL VISITOR COUNTER

Contd...

The IR transmitter will emit modulated 38 kHz IR signal and at the receiver we use L14F1 (Infrared Sensor). The output goes high when the there is an interruption and it return back to low after the time period determined by the capacitor and resistor in the circuit. I.e. around 1 second. This logic is fed to JK flip flop which trigger the microcontroller. Input is given to the microcontroller. Microprocessor gives output to the 7-Segment display. LTS542 (Common Anode) is used for 7-Segment display. Reset button will reset the microcontroller.
BIDIRECTIONAL VISITOR COUNTER

Advantages
Provide information to management on the volume and flow of people throughout a location. Human-based data collection comes at great expense. Counting the visitors helps to maximise the efficiency and effectiveness of employees, floor area and sales potential of an organisation. Low-cost microprocessor based visitor counter is easy to build.

BIDIRECTIONAL VISITOR COUNTER

BIDIRECTIONAL VISITOR COUNTER

También podría gustarte