Person Counting Machine
Person Counting Machine
Submitted By:
Group of 24 Members
Submitted To:
Er. Dinesh Mahato
Department of Computer Engineering
Madan Bhandari Collage of Engineering
Date of Submission:
CERTIFICATE OF PROJECT COMPLETION
This is to certify that the project titled "Person Counting Machine" has been successfully completed by
a dedicated group of 24 members under the esteemed guidance of Assistant Professor Er. Dinesh
Mahato.
This project was undertaken as a part of the Embedded Systems curriculum in the Department of
Computer Engineering at Madan Bhandari College of Engineering. The project demonstrates the
practical application of embedded systems in real-world scenarios by implementing a smart person
counting mechanism, which can be utilized in various domains such as security, automation, and crowd
management.
The successful completion of this project showcases the students' technical proficiency, teamwork, and
problem-solving skills in embedded system design, sensor integration, and real-time data processing. It
also reflects their ability to apply theoretical knowledge to practical challenges, contributing to their
overall academic and professional growth.
This certification acknowledges the hard work, dedication, and innovative approach of the project team in
achieving the desired objectives and fulfilling the academic requirements of the course.
Issued by:
Department of Computer Engineering
Madan Bhandari College of Engineering
Date: ___________
Signature: ____________________
(Assistant Professor Er. Dinesh Mahato)
Signature: ____________________
(Er. Chandan Kumar Bhagat – Head of Department, Computer Engineering)
Final Report on Embedded System: Person Counting Machine
Introduction: The Person Counting Machine is an embedded system designed to count the number of
people passing through a designated area. This system utilizes an ultrasonic sensor to detect individuals,
an Arduino Uno R3 microcontroller for processing, and a MAX7219 LED matrix display for visual output.
The system finds applications in crowd monitoring, smart door systems, and security applications. This
report provides a detailed analysis of the system's design, implementation, and performance.
Objective
The objective you've outlined is to develop a person counting machine using an ultrasonic sensor, an
Arduino Uno R3, and a MAX7219 LED matrix. This system aims to track the number of people passing
through a specific location, such as a doorway or corridor, and display the count on the LED matrix. Here's
an elaboration of the system components and functionality:
System Overview
The person counting system will use an ultrasonic sensor to detect the presence of people moving through
a specific area. As people pass, the sensor will register their movement, and an Arduino will process the
data and update the count. The updated count will be visually shown on a MAX7219 LED matrix.
Key Components
Arduino Uno R3: The main controller that manages the logic for counting people, interfacing with the
ultrasonic sensor, and controlling the MAX7219 LED matrix.
Ultrasonic Sensor (HC-SR04): Used to detect movement or the presence of people. The ultrasonic sensor
works by emitting a high-frequency sound pulse and measuring the time it takes for the pulse to bounce
back. If an object, such as a person, interrupts the sensor's path, it will detect a change in the reflected time
and register the object.
MAX7219 LED Matrix: This is a modular 8x8 LED matrix display used to show the person count. It can
display numbers or other visual elements to represent the status of movement or counting. The MAX7219
is controlled via SPI (Serial Peripheral Interface), and the Arduino can manage it using appropriate
libraries.
Working Mechanism
The HC-SR04 ultrasonic sensor will be placed at a strategic location where it can effectively monitor the
area people pass through.
The sensor continuously emits sound waves. When an object (a person) enters its range, the sound waves
are reflected back, and the sensor calculates the distance based on the time it takes for the sound to return.
By monitoring changes in the distance, the system can determine if a person has passed through the
detection zone. A threshold distance can be set to distinguish between different objects and the person’s
movement.
Counting Mechanism
The system will use logic to detect when a person has crossed the detection zone. For example, if the
sensor detects a distance below a certain threshold (indicating an object is close), it registers the event as
a person entering or leaving.
You can implement software logic to count a person when the sensor detects an entry or exit. For instance,
if the distance first drops below a threshold and then increases, it indicates that a person has crossed the
sensor’s detection area.
To accurately count people entering or leaving, you can use a state change detection method or a threshold
crossing method to avoid double counting.
The Arduino will send the updated person count to the MAX7219 LED matrix using the SPI interface.
The LED matrix will display the count, updating in real time as people pass through the detection zone.
The count can be displayed as a number or as visual symbols like an arrow to indicate movement status
(e.g., people entering or leaving).
A simple user interface on the LED matrix can show the count in large, easy-to-read numbers.
System Features
Real-time counting: The system will continuously update the person count as people pass.
Movement Status: Displaying the current movement status (e.g., number of people entering or exiting).
Accuracy and Precision: Fine-tuning the threshold distance and time can help improve the accuracy of
detecting people.
LED Display: Clear display of the person count, using the MAX7219 module’s ability to show 8x8 LEDs,
providing a compact but effective visual display.
Components Used:
Arduino Uno R3: Acts as the central processing unit for the system.
MAX7219 LED Matrix Display: Displays messages and the person count.
Circuit Connections:
#include <LedControl.h>
#include <NewPing.h>
int personCount = 0;
void setup() {
Serial.begin(9600);
for (int i = 0; i < 4; i++) {
lc.shutdown(i, false);
lc.setIntensity(i, 8);
lc.clearDisplay(i);
}
}
void loop() {
delay(500);
unsigned int distance = sonar.ping_cm();
if (distance > 0 && distance < 50) {
personCount++;
Serial.print("Person Count: ");
Serial.println(personCount);
}
• The ultrasonic sensor successfully detects people passing and increments the count with minimal
delay.
• The MAX7219 LED matrix displays "WALK" and updates the count dynamically.
• The system operates in real-time, providing accurate and responsive tracking.
• The response time of the sensor and display update is within acceptable limits, ensuring smooth
operation.
• The system was tested under different lighting and environmental conditions, demonstrating
reliability and stability.
• The Arduino Uno processed sensor data efficiently, ensuring smooth and uninterrupted operation.
• The power consumption was found to be minimal, making it suitable for continuous operation.
8. Future Enhancements:
• Wireless Data Transmission: Implement IoT features to send real-time data to a remote server for
monitoring and analytics.
• Multiple Sensor Integration: Enhance accuracy by using multiple sensors to detect bidirectional
movement and prevent false counting.
• Mobile Application: Develop an app to monitor person count remotely, providing insights and
analytics to users.
• Power Optimization: Use battery-operated solutions or solar power for portability and energy
efficiency.
• Edge Computing: Implement onboard data processing to reduce latency and improve decision-
making in real-time scenarios.
• Automated Alerts: Introduce an alert system to notify authorities if the count exceeds a predefined
threshold.
• Integration with Security Systems: Link the counter with surveillance cameras or access control
systems for enhanced security.
9. Conclusion:
The person counting machine was successfully designed and implemented using an ultrasonic sensor,
Arduino Uno, and MAX7219 LED matrix display. The system effectively detects individuals and provides
a real-time count. Through rigorous testing, the system demonstrated reliability and accuracy in counting
people passing through the monitored area. This project highlights the importance of embedded systems
in automation and smart monitoring applications. The proposed future enhancements will further increase
the system’s usability and efficiency, making it a valuable solution for crowd management and security
applications.
10. References:
IoT and Smart Sensors for Crowd Monitoring - IEEE Research Papers