People Counter System Using PIR Sensor
People Counter System Using PIR Sensor
OBJECTIVE:
To use PIR sensors at a doorway to count how many people enter/exit a room and display
the count on a serial monitor or LCD.
BASIC PRINCIPLE:
The basic principle of People Counter system depends upon the following
components:
PIR Sensors
Microcontroller
Counter Logic
Output Device
1. PIR Sensors: A Passive Infrared (PIR) sensor is an electronic sensor that detects motion
by measuring the infrared (IR) radiation (heat) emitted by objects in its field of view.
3. Counter logic: Counter logic monitors one or more input signals and increases
(increments) or decreases (decrements) a stored value based on predetermined conditions
or sequences.
4. Output Device: Here the LCD display is used to display the output and thus it displays
the person count.
WORKING PRINCIPLE:
The LCD display is connected through bread board to display the count of
the people entered and exited. The potentiometer is also connected to the LCD display to adjust
the intensity of the characters on the screen and to prevent the display from being too faint or too
dark. The connections are given as per the connection diagram using the jumper wires in the
breadboard and the system can be powered either by using an Arduino or external DC supply.
The threshold voltage required for Arduino board and it’s components is 5V such that the
Arduino voltage regulator limits the voltage to 5V incase of voltage level above 5V is provided.
TINKERCAD SIMULATION:
SIMULATION CODE:
#include <LiquidCrystal.h>
int exited=0;
int entered=0;
void setup() {
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("PeopleEntered:");
lcd.setCursor(0, 1);
lcd.print("PeopleExit:");
void loop() {
lcd.setCursor(0, 1);
if(digitalRead(6)==HIGH)
entered++;
lcd.setCursor(14,0);
lcd.print(String(entered));
delay (2500);
if (digitalRead(7) ==HIGH)
exited++;
if(entered>=exited){
lcd.setCursor(14, 1);
lcd.print(String(exited));
delay (2500);
MERITS:
DRAWBACKS:
APPLICATIONS:
The People Counter System successfully demonstrates how PIR sensors and an
Arduino Uno can be integrated to create an automated, cost-effective, and energy-efficient
method of monitoring occupancy. By detecting motion and processing the sensor data through
simple counter logic, the system can accurately count the number of people entering and exiting
a room, with the count clearly displayed on an LCD screen. This type of system has wide
applications in smart buildings, energy management, and security automation, proving the
practical value of microcontroller-based embedded systems in real-world environments.