bidirectional visitor counter

28
Bidirectional Bidirectional visitor visitor counter counter

Upload: rahul-verma

Post on 27-Nov-2014

1.903 views

Category:

Documents


155 download

DESCRIPTION

presentation on bidirectional visitor counter

TRANSCRIPT

Page 1: Bidirectional Visitor Counter

Bidirectional visitor Bidirectional visitor countercounter

Page 2: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

Why do we need one ?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 MallsSports venues AirportsToll gatesLiftCar parking

Page 3: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

What is it ?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.

Page 4: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

Principle of Digital CounterPrinciple 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)

Page 5: Bidirectional Visitor Counter

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.

Page 6: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

• Transmitter 1

Transmitter 2 Receiver2

Receiver1

ENTRY

EXIT

Microcontr-oller

D0-D7

Page 7: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

ComponentsComponents• 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

Page 8: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

Resistor 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.

Page 9: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

CapacitorsCapacitors

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.

Page 10: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

TransistorsTransistors

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

Page 11: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

Quad op-amp LM324Quad op-amp LM324

• 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.

Page 12: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

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

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

Page 13: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

SensorsSensors

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

Optical sensors

Page 14: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

Microcontroller/MicroprocessorMicrocontroller/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.

Page 15: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

1234567891011121314151617181920

4039383736353433323130292827262524232221

P1.0P1.1P1.2P1.3P1.4P1.5P1.6P1.7RST

(RXD)P3.0(TXD)P3.1

(T0)P3.4(T1)P3.5

XTAL2XTAL1

GND

(INT0)P3.2(INT1)P3.3

(RD)P3.7(WR)P3.6

VccP0.0(AD0)P0.1(AD1)P0.2(AD2)P0.3(AD3)P0.4(AD4)P0.5(AD5)P0.6(AD6)P0.7(AD7)EA/VPPALE/PROGPSENP2.7(A15)P2.6(A14)P2.5(A13)P2.4(A12)P2.3(A11)P2.2(A10)P2.1(A9)P2.0(A8)

8051(8031

)

AT89C2051 MicrocontrollerAT89C2051 Microcontroller

Dual functionality port(P0,P2,P3)

Page 16: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

Features of the AT89C2051 Features of the AT89C2051 processorprocessor• 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

Page 17: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

Program Source codeProgram 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;• }

Page 18: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

• 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];• }

Contd...

Page 19: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

• 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;• } }• }

Contd...

Page 20: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

7 segment display units7 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.

Page 21: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

LED (Infrared radiation led)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.

Page 22: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

GS-SH-250 T RelayGS-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.

Page 23: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

Circuit diagramCircuit diagram

Bidirectional Visitor Counter

Page 24: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

Page 25: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

Page 26: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

• 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.

Contd.…..

Page 27: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER

AdvantagesAdvantages

• 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.

Page 28: Bidirectional Visitor Counter

BIDIRECTIONAL VISITOR COUNTER