Microcontroller Based Bidirectional Visitor Counter

Here is a low-cost microcontroller-based visitor counter that can be used to know the number of persons at a place. All the components required are readily available in the market and the circuit is easy to build. Two IR transmitter-receiver pairs are used at the passage: one pair comprising IR transmitter IR TX1 and receiver phototransistor T1 is installed at the entry point of the passage, while the other pair comprising IR transmitter IR TX2 and phototransistor T2 is installed at the exit of the passage. The IR signals from the IR LEDs should continuously fall on the respective phototransistors, so the proper orientation of the transmitters and phototransistors is necessary. circuit description Fig. 1 shows the transmitter-receiver set-up at the entrance-cum-exit of the passage along with a block diagram. Two similar sections detect an interruption of the IR beam and generate a clock pulse for the microcontroller. The microcontroller controls counting and displays the number of persons present inside the hall. Fig. 2 shows the circuit of the microcontroller-based visitor counter, wherein the transmitter and the receiver form the IR detection circuit.

Control logic is built around transistors, operational amplifier LM324 (IC1), and flip-flop (IC2). When nobody is passing through the entry/exit point, the IR beam continuously falls on phototransistor T1. Phototransistor T1 conducts and the high voltage at its emitter drives transistor T3 into saturation, which makes pin 3 of comparator N1 low, and finally, output pin 1 of comparator N1 is high. Now if someone enters the place, first the IR beam from IR TX1 is interrupted and then the IR beam from IR TX2. When the beam from IR TX1 is interrupted, phototransistor T1 and transistor T3 cut-off and pin 3 of comparator N1 go high. A 12MHz crystal is used for providing a clock. Ports 0, 1, and 2 are configured for 7-segment displays. Port-0 pin is externally pulled up with 10-kilo-ohm resistor network RNW1 because port0 is an 8-bit, open-drain, bidirectional, input/output (I/O) port. Port-1 and port-2 are 8-bit bidirectional I/O ports with internal pull-ups (no need for external pull-ups). Port pins 3. 0 and 3. 1 are configured to provide the set pulse to J-K flip-flop IC2(A) and IC2(B), respectively. External interrupts INT0 and INT1 receive the interrupt pulse when the person interrupts the IR beams.

Resistor R9 and capacitor C5 provide a power-on-reset pulse to the microcontroller. Switch S1 is used for manual reset. When the microcontroller is reset, the flip-flops are brought in ‘set’ state through the microcontroller at software run time by making their ‘set’ pin high for a moment. The value of the counter increments by Fig. 5: An actual-size, single-side PCB for the microcontroller-based visitor ‘1’ when the counter (Fig. 2) including its power supply (Fig. 3) interrupt service routine for INT0 is executed. The output of the corresponding J-K flip-flop is set to ‘high’ again by making its ‘set’ input pin low through the microcontroller. The micro-controller is configured as a negative-edge-triggered interrupt sensor. Similarly, if somebody exits the place, first the IR beam from IR TX2 is interrupted and then the IR beam from IR TX1.  At this moment, the high input at ‘J’ and ‘K’ pins of flip-flop IC2(B) toggle its output to low. On the other hand, the low input at ‘J’ and ‘K’ pins of IC2(A) due to clock pin 6 of IC2(B) and ‘J’ input (pin 4) and ‘K’ input (pin 16) of IC2(A) are connected to pin 7 of comparator N2. The negative-going pulse is applied to clock pin 1 of IC2(A) when the person interrupts the IR beam from IR TX1. There is no change in the output of IC2(A) flip-flop. This triggers the external interrupt INT1 (pin 13) of microcontroller AT89C52. The value of the counter decrements by ‘1’ when interrupt service routine for INT1 is executed. The output of the corresponding J-K flip-flop is set to ‘high’ again by making its ‘set’ input pin low through the microcontroller. The circuit is powered by regulated 5V. Fig. 3 shows the circuit of the power supply. The AC mains is stepped down by transformer X1 to deliver a secondary output of 7. 5V, 250mA, which is rectified by bridge rectifier BR1, filtered by capacitor C6 and regulated by IC 7805 (IC4). Capacitor C7 bypasses any ripple in the regulated output. Shown in Fig. 5 and it’s component layout in Fig. 6. software The software for the visitor counter is written in ‘C’ language and compiled using the C51 Keil compiler.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with MyStudyWriters
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Business and administrative studies
Excellent job
Customer 452773, March 9th, 2023
Leadership Studies
excellent job
Customer 452773, July 28th, 2023
Human Resources Management (HRM)
excellent work
Customer 452773, July 3rd, 2023
Human Resources Management (HRM)
excellent, great job
Customer 452773, June 19th, 2023
Business and administrative studies
great job as always
Customer 452773, February 26th, 2023
FIN571
excellent work
Customer 452773, March 1st, 2024
Business and administrative studies
Thank you for your hard work and effort. Made a 96 out of 125 points Lacked information from the rubic
Customer 452773, October 27th, 2023
English 101
great summery in terms of the time given. it lacks a bit of clarity but otherwise perfect.
Customer 452747, June 9th, 2021
Leadership Studies
excellent job
Customer 452773, August 3rd, 2023
Social Work and Human Services
Although it took 2 revisions I am satisfied but I did receive it late because of that.
Customer 452603, March 25th, 2021
ACC543MANAGERIALACCOUNTINGANDLEGALASPECTS
excellent
Customer 452773, January 25th, 2024
Business and administrative studies
Perfect
Customer 452773, February 23rd, 2023
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
Close

Sometimes it is hard to do all the work on your own

Let us help you get a good grade on your paper. Get professional help and free up your time for more important courses. Let us handle your;

  • Dissertations and Thesis
  • Essays
  • All Assignments

  • Research papers
  • Terms Papers
  • Online Classes
Live ChatWhatsApp