Problem statement :
To design and implement a Visitor Counter system using an 8051
microcontroller and Infrared (IR) sensors, which counts and displays the number of people
entering and exiting a room. The count is displayed on a 7-segment display. The system should
increment the count when a person enters and decrement when a person exits, providing an
accurate count of people inside the room at any given time.
1. Introduction:
                In the modern world, due to increasing population and technology, there is a hustle
and bustle all around the globe . A lot of people visit public places including markets, museums,
airports, banks, colleges and hospitals. Therefore it is necessary to keep a tally of the people visiting
such places for a wide variety of reasons. A visitor counter is an electronic system that helps in
automatically counting the number of people present over an area. The project titled "Visitor
Counter Using Infrared Sensor and 8051 Microcontroller" aims to develop a reliable and cost-
effective system that automates this task.
     The system utilizes Infrared (IR) sensors placed at the entrance to detect the movement of
people entering or exiting a room. Based on the sensor signals, an 8051 microcontroller processes
the data and updates the count of visitors. The number of people currently inside the room is
displayed in real-time on a 7-segment display. The count increases when a person enters the room
and decreases when they exit. This system operates efficiently without requiring manual input,
making it ideal for environments where human traffic needs to be monitored.
                                                                                The 8051
microcontroller is the control unit of this system. It processes the signals from the infrared sensors
and controls the display logic to reflect the number of people inside the room without even the
slightest of deviations possible. The 7-segment display indicates a simple and vivid output for the
current visitor count, ensuring that the system is user-friendly and easy to read.
2. PROBLEMS IN REAL TIME SCENARIO:
       This is a very basic circuit and has few limitations, for instance, this system will not
        differentiate between a person and an obstacle interrupting the sensors.
       The system can count on one person at a time and cant be used on a larger scale.
       This is a short range system , so for implementing it on a large range , laser beams can be
        used.
       Several improvements are being worked out to take care of this system, to name a few,
        cameras are being used to differentiate between different interruptions.
3. Components:
AT89C51 (8051 based Micro controller)
       8051 Programmer
       2 x 10µF Capacitor
       1 x 1KΩ Resistors
       11.0592 MHz Crystal
       16 x 2 LCD Display
       2 x LED’s
       2 x IR Sensors (Reflective Type)
       Connecting Wires
       Power Supply
       Keil µVision Software
       Proteus
3.1> Microcontroller :
Key features of the microcontroller used :
       High integration of functionality, field programmability, flexibility.
       Easy to use assembly language and since they usually follow RISC architecture , the
        instruction set is small.
3.2> Capacitor :
       A capacitor is a device which consists of two conductors parallel to each other and insulated
        from each other.
       The most common use of capacitor is that it is used for storing electrical energy .
3.3> Resistor :
       A resistor is a two terminal electronic component that produces a voltage across its terminals
        that is directly proportional to the current passing through the resistor which comes in
        favour of ohms law.
       Resistors can be built into hybrid and printed circuits , as well as integrated circuits .
       Size and position of leads are relevant to equipment designers, most of the resistors
        generally overheat in order to avoid length.
3.4> Crystal oscillator :
       Crystal oscillator is an electric oscillator that uses mechanical resonance of a vibrating crystal
        of piezoelectric material to create an electrical signal with a constant frequency.
       One part per million will result in an error of slightly less than one half second a day, which
        would be about 3 minutes a year.
       It is used for providing a stable clock signal.
3.5> LCD Display :
       LCD stands for liquid crystal display .
       It works by applying a varying voltage to layer of liquid crystal .
       It is often used in battery powered electronic devices because it requires small amount of
        electric power.
       Common displays have 16 to 20 character and 1 to 4 lines.
       In this project, this component is used to display the number of visitors in the room .
3.6> IR Sensors :
       This is the main component used in the system to check if there is any disturbance caused
        between the beam of light at the receiving end.
Pin Configuration :
4. Methodology:
 For this visitor counter system, a pair of IR transmitter – receiver are used on the path . One pair
containing IR transmitter IR TX1 and receiver photo transistor T1 will be installed at the entry point of
the path , while the other pair comprising IR transmitter IR TX2 and photo transistor T2 will be
installed at the exit of the path. The IR signals from the IR LED’s will continuously fall on the
respective photo transistors, so that there will be proper orientation of the transmitters and photo
transistors . When the two similar sections detect interruption of the IR beam , they then generate
the clock pulse for the microcontroller and so, the microcontroller controls the counting and display
of the number of persons present inside the hall.
4.1 Block diagram :