Академический Документы
Профессиональный Документы
Культура Документы
ELECTRONICS HUB
P R O J E C T S | T U T O R I A L S
HOME FREE PROJECT CIRCUITS EMBEDDED 8051 MICROCONTROLLER BIDIRECTIONAL VISITOR COUNTER USING 8051
MICROCONTROLLER
Contents [hide]
This article describes the design and working of a Bidirectional Visitor Counter using 8051
Microcontroller. The main intention is to design a system wherein the number of persons
entering or leaving a room is kept track of and 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.
But, before going to know about this circuit, get an idea about How to interface a 16 x 2 LCD
Display to 8051 Microcontroller as we are going to use this concept in this project.
In this project, we have used an IR LED as the IR Transmitter and a Photo Diode as the IR
Receiver. Two sets of IR sensors consisting of an IR LED and Photo Diode are placed at two
ends of the entrance of a room.
Output from each sensor is fed to the microcontroller. In normal operation, IR light from the
LED would not fall on the Photo Diode as it is a Reflective type IR Sensor. 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 Diode would start
receiving the IR Light and start conducting. As a result, 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.
NOTE: A detailed circuit of the IR Sensors (Reflective Type) is mentioned in the Circuit Design
section.
The microcontroller AT89C51 is interfaced to the IR sensor pairs at PORT2 pins P2.0 and P2.1
respectively. The following image shows the circuit diagram of the Reflective Type IR Sensor
Module used in this project.
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
10F to ensure a reset pulse width of 100ms and reset pin voltage drop of 1.2V.
Buy Detailed Course of Bidirectional Visitor Counter using 8051 Microcontroller @ Just
399/- This course includes
Code
Circuit Diagram
Working
Detailed Explanation of Each component in circuit
Software Installation
When the system is powered ON, the microcontroller initially initializes the stack pointer and
all other variables. It then scans the input pins (P2.0 and P2.1).
In the meantime, when there is no object in front of the IR Sensors, the light from the IR LED
would not fall on the Photo Diode of the first sensor pair and hence, the Photo Diode doesnt
conduct.
As a result, the output of the IR sensors is LOW. In other words, ports P2.0 and P2.1 are at logic
LOW level. If there is a person in front of the IR Sensors, IR light from the IR LED reflects from
the person and falls on the Photo Diode.
As a result, the Photo Diode starts conducting and the output of the sensor becomes HIGH. In
other words, the ports P2.0 and P2.1 are at logic HIGH level.
Now when a transition takes place, i.e. a logic HIGH level is received, first at port P2.0 and then
at P2.1, the microcontroller sees this as an interruption to sense the passage or entry of a
person or an object in front of the IR LED and the Photo Diode.
As per the program, the count value is increased and this value is displayed on the 16 x 2 LCD
Display.
If the microcontroller senses logic HIGH, first on the P2.1 and then on P2.0, it assumes that the
person is leaving the room and as per the program, the microcontroller decreases the count
as displays the same on the LCD.
The program ensures that the count is increased or decreased only when both the sensors
detect the person.
DOWNLOAD CODE
Applications of Bidirectional Visitor Counter Circuit
1. The Bidirectional Visitor Counter using 8051 Microcontroller circuit can be used
domestically to get an indication of number of persons entering a party
2. It can be used at official meetings.
3. It can be used at homes and other places to keep a check on the number of persons
entering a secured place.
4. It can also be used as home automation system to ensure energy saving by switching on
the loads and fans only when needed.
Note: Read the post Mini Projects for more engineering project circuits.
Related Articles
Celsius Scale Bipolar LED Driver Water Level Controller Digital Voltmeter using
Thermometer using Circuit using 8051 8051 Microcontroller
AT89C51 and LM35 Microcontroller
FILED UNDER: 8051 MICROCONTROLLER, ELECTRONICS, EMBEDDED, FREE PROJECT CIRCUITS, MINI PROJECTS
Comments
Administrator says
JUNE 14, 2014 AT 10:03 AM
Reply
aishwarya says
JANUARY 7, 2016 AT 1:04 AM
Reply
which 7 segment display used in this project? is this common anode or common cathode??
Reply
Anusha says
FEBRUARY 12, 2016 AT 1:22 AM
Pooja says
FEBRUARY 25, 2016 AT 6:43 AM
Reply
Anusha says
FEBRUARY 29, 2016 AT 3:28 AM
Yes it will work but the values given to 7 segment must be changed in code..
Reply
Reply
vincent says
MARCH 8, 2016 AT 4:28 PM
Reply
aman says
MARCH 13, 2016 AT 6:30 AM
Reply
aman says
MARCH 13, 2016 AT 6:34 AM
Reply
aman says
MARCH 13, 2016 AT 6:38 AM
Reply
manju says
MARCH 14, 2016 AT 5:27 AM
Reply
Shiv says
MARCH 17, 2016 AT 7:23 AM
Reply
Reply
Sandesh says
MARCH 22, 2016 AT 9:43 AM
Reply
NIHAL RANJAN says
MARCH 23, 2016 AT 1:11 AM
if i use two single digit 7 segment common cathode display in place of 2-Digit 7 segment
common cathode display.will it work?
Reply
Anusha says
MARCH 28, 2016 AT 8:55 AM
Reply
Reply
if i use two single 7 segment common cathode displace in place of 2-Digit 7 segment
common cathode display.will it work?
Reply
Gaurang says
MARCH 30, 2016 AT 9:41 AM
Reply
bhushan patil says
MARCH 31, 2016 AT 4:24 AM
Reply
Reply
please give the program of bidirectional visitor counter using 8051 microcontroller
Reply
BincyBabu says
APRIL 5, 2016 AT 9:08 AM
please give the program for bidirectional visitor counter using 8051
Reply
om says
APRIL 18, 2016 AT 8:19 AM
Reply
om says
APRIL 18, 2016 AT 8:38 AM
Reply
Sybil Sarah says
APRIL 21, 2016 AT 2:05 AM
Reply
Reply
avinash says
APRIL 28, 2016 AT 2:27 AM
plz can anyone suggest program using 8051 microcontroller for bidirectional visitor
counter
Reply
tayyaba says
MAY 27, 2016 AT 11:37 PM
Reply
Reply
Rahul says
JULY 16, 2016 AT 12:24 AM
Which code is used in this project for common cathode 7 segment display?
Reply
rahim says
JULY 30, 2016 AT 8:52 PM
Reply
shrnn says
JULY 31, 2016 AT 11:27 AM
Reply
Prajakta says
FEBRUARY 26, 2017 AT 5:38 AM
Reply
Krushndevsinh says
FEBRUARY 27, 2017 AT 5:13 AM
Reply
pooja says
APRIL 30, 2017 AT 3:32 AM
Reply
Anusha says
JULY 5, 2017 AT 5:29 AM
Reply
Amin says
JUNE 26, 2017 AT 8:44 PM
Sir.. I am interest this project for my thesis design project.. can i get the code every parts of
this project..
I can assure of proving every bit worthy of it. i will give my best to present this project to my
school
Reply
Anusha says
JULY 5, 2017 AT 5:28 AM
Reply
Leave a Reply
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
reCAPTCHA
POST COMMENT
ads by media.net
Electronics Hub
YouTube 18K
Electronics Hub
Follow On
Electronics Hub
Suivre
SUBSCRIBE
Delivered by FeedBurner
Electronics Hub
667,245 likes
Temperature Controllers
Pressure Switch
PROJECTS BY CATEGORY
GENERAL
Tutorials
Symbols
Courses
Calculator
Contact
PROJECTS
Electrical
Electronics
Embedded
Power
Robotics
ARM
IOT
PROJECTS
Mini projects
Microcontroller
Aurdino
Solar
Free circuits
Home Automation
TUTORIALS
Capcitors
Resitors
Filters
Diodes
Transistors
TUTORIALS
Amplifiers
IO Devices
Thyristors
DC Circuits
Nummber System
FOLLOW US
Youtube
Google Plus
1.8k