Bi-Directional People Counter Using PIR Sensors and Arduino UNO

 

Bi-Directional People Counter Using Arduino UNO

The Bi-Directional People Counter is a smart occupancy monitoring system that counts the number of people entering and exiting a room using two PIR motion sensors. The system is built around an Arduino Uno, which processes the sensor signals and updates the count in real time.

This project is ideal for classrooms, labs, shops, libraries, and offices where monitoring room occupancy is important.

 Working Principle

The system uses two PIR sensors placed at the entrance:

  • Entry Detection:
    If Sensor 1 triggers first and then Sensor 2, the system detects a person entering → Count increases (+1).

  • Exit Detection:
    If Sensor 2 triggers first and then Sensor 1, the system detects a person leaving → Count decreases (−1).

The Arduino checks the sequence of sensor activation to determine direction.


 Display System

A 16×2 LCD display (Non-I2C) is connected in 4-bit mode to the Arduino.

The LCD continuously displays:

People In Room:
Count: X

Where X is the live number of people currently inside.


 Components Required

  • 1 × Arduino UNO

  • 2 × PIR Motion Sensors

  • 1 × 16×2 LCD Display (Non-I2C)

  • 1 × 10k Potentiometer (for LCD contrast)

  • Breadboard

  • Jumper Wires

  • 5V Power Supply


 Circuit Overview

  • PIR Sensor 1 → Arduino Digital Pin (e.g., D2)

  • PIR Sensor 2 → Arduino Digital Pin (e.g., D3)

  • LCD RS, EN, D4–D7 → Arduino Digital Pins

  • VSS → GND

  • VDD → 5V

  • RW → GND

  • Potentiometer → LCD Contrast

  • All GNDs connected together


 Key Features

✅ Detects entry and exit direction
✅ Real-time occupancy display
✅ Automatic counting system
✅ Low cost and easy installation
✅ Suitable for small to medium rooms


 Applications

  • Smart classrooms

  • Office attendance monitoring

  • Library occupancy control

  • Shopping stores

  • Lab safety management


 Advantages

  • Hands-free operation

  • Improves room management

  • Can be upgraded with buzzer alert when room is full

  • Can be extended to IoT for online monitoring


This project can be further enhanced by:

  • Adding a buzzer alert when maximum capacity is reached

  • Integrating automatic light control when room is occupied

  • Uploading occupancy data to a cloud platform for smart building automation

 



BEGINNER PROJECTS (Foundation Skills)

  1. Ultrasonic Distance Measurement
  2. Traffic Light Simulation with 7-Segment Display
  3. 7-Segment Display Counter
  4. Kids Piano Circuit (8-Key Version)
  5. 16×2 LCD Display with Text Output
  6. LCD I2C to Arduino UNO
  7. Temperature Measurement using Arduino UNO
  8. LDR Controlled Street Light

INTERMEDIATE PROJECTS (Build Your Skills)

  1. Servo Motor Control Using Potentiometer
  2. DC Motor Speed Control
  3. Temperature Controlled Fan
  4. PIR Based Theft Alert System
  5. LPG Gas Leakage Detection System
  6. Automatic Door Locking System
  7. Soil Moisture Based Automatic Watering System
  8. Simple Digital Clock using Arduino UNO
  9. Automatic Voting Machine (EVM)
  10. Joystick Control using Arduino Uno
  11. RGB Lamp Control using Arduino Uno

    ADVANCED PROJECTS (Master Level)

    1. Home Automation Using Arduino UNO
    2. Bluetooth RC Car using Arduino Uno
    3. Obstacle Avoiding Robot
    4. Line Follower Robot
    5. Radar System Using Arduino UNO
    6. Automatic Parking System
    7. Bi-Directional People Counter using Arduino Uno 
    8. Automatic Plant Watering System
    9. NeoPixel LED Ring Control using Arduino Uno
    10. Smart Gloves for Bedridden People

      ROBOTICS & MOTION PROJECTS

      1. RC Car Using L293D Motor Driver
      2. Robot Arm and Leg Control Using Servo
      3. Smart Irrigation System using Arduino Uno

      Comments