
Privacy-Preserving Doorway People Counting Using Embedded PIR–Ultrasonic Sensor Fusion
Aryan Biradar
21/07/2026
Occupancy sensing is crucial for smart building automation and energy management systems. Conventional vision-based and cloud-dependent systems raise privacy concerns and often require significant computational resources. This work presents a low-cost, privacy-preserving, offline edge-computing system for people counting. The proposed system combines two passive infrared (PIR) sensors and one ultrasonic sensor integrated with an Arduino-based platform to detect directional movement through a doorway and classify events such as entry, exit, or no-count. Event-level features, including PIR activation sequence and ultrasonic blocked duration, were extracted from the sensor signals and used to train a decision-tree classifier. The learned decision logic was then deployed directly on the embedded system for real-time classification. Experimental evaluation was conducted using controlled single-subject, single-occupant doorway movement scenarios, including valid entry, valid exit, false trigger, and linger-then-retreat behaviors. The live implementation achieved an overall accuracy of 85.86% and a weighted F1-score of 86.33% under these conditions, demonstrating that reliable occupancy-related event classification can be performed without cameras, cloud services, or high-cost infrastructure. These results show the potential of lightweight sensor-fusion approaches for privacy-preserving occupancy monitoring in smart buildings and emergency-response applications.