Bidirectional Visitor Counter using 8051 Microcontroller
AT89C51 (8051 based Microcontroller)
8051 Programmer
Push Button
10µF Electrolytic Capacitor
2 x 10KΩ Resistors (1/4 Watt)
11.0592 MHz Crystal
2 x 33pF Ceramic Capacitors
16 x 2 LCD Display
10KΩ Potentiometer
2 x IR Sensors (Reflective Type)
Connecting Wires
Power Supply
Keil µVision Software
Willar Software
Proteus


The sensor circuit is designed by selecting appropriate value of resistors for both the LED and the Photo Diode. A 150Ω current limiting resistor is placed in series with the IR LED.
Photo Diode is connected in reverse bias with a series resistor of 10KΩ. Photo Diode and 10KΩ Resistor form a potential divider and the output is given to the non – inverting input of the Operational Amplifier (Op – Amp).
A 10KΩ POT is connected at the inverting input. This POT can be adjust in order to change the sensitivity of the IR Sensor. A 16 x 2 LCD Display is used to display the count values. The data line of the LCD are connected to PORT1 Pins of the Microcontroller.
The Control Pins i.e. RS, RW and E are tied to P3.6, GND and P3.7 pins. A 10KΩ POT is connected to contrast adjust pin i.e. Pin 3 of LCD.
Another important aspect of the design involves designing the oscillator circuit and the reset circuit. The oscillator circuit is designed by selecting an 11.0592 MHz quartz crystal and two ceramic capacitors – each 33pF.
The reset circuit is designed by selecting a resistor of 10KΩ and an electrolyte capacitor of 10µF to ensure a reset pulse width of 100ms and reset pin voltage drop of 1.2V.