Project

# Title Team Members TA Documents Sponsor
50 Crowdsurf: Realtime Crowd-Monitoring for indoor spaces
Ananya Krishnan
John Abraham
Tanvika Boyineni
Aniket Chatterjee design_document1.pdf
final_paper1.pdf
photo1.jpeg
photo2.PNG
presentation1.pdf
proposal1.pdf
video
Team Members:
Tanvika Boyineni (tanvika3)
Ananya Krishnan (ananya10)
John Abraham (jabra6)

Problem:
Indoor public spaces (libraries, study lounges, gyms, student centers) often become congested, but students and facility staff lack real time, localized information about crowd density and traffic flow. Existing approaches either rely on cameras, raising privacy concerns, require manual observation, or provide only building level estimates that are not actionable for choosing a specific room/entrance.

Solution:
This project proposes a privacy preserving, real time crowd monitoring system that estimates occupancy and directional flow using distributed, non-imaging sensor nodes with local processing. Each node is deployed at an entrance or transition point and performs local detection and direction inference. Processed data is transmitted wirelessly to a central gateway, which aggregates occupancy estimates, logs data, and presents live metrics through a user facing dashboard. The system emphasizes robustness to sensor noise and communication loss, and ease of deployment.

Solution Components:
1. Sensing Subsystem (Doorway Detection and Direction)

-Non-imaging sensors per entrance mounted with spatial separation.

-Direction inference using ordered sensor trigger

-Calibration procedures for mounting height, angle, and baseline noise conditions.

2. Embedded Processing Subsystem

-Microcontroller-based state machine for event detection, debouncing, and occupancy updates.

-Filtering and gating logic to handle common edge cases such as pausing in doorways, close following individuals, and short reversals.

-Node health monitoring, including sensor timeouts and heartbeat status.

3. Wireless Communication Subsystem

-Packet structure includes timestamp, IN/OUT counts, current occupancy estimate, and node status.

-Features such as retransmission, periodic heartbeats, and graceful degradation during packet loss.

4. Gateway and Data Logging Subsystem

-Gateway device (like Raspberry Pi) receives telemetry from sensor nodes.

-Maintains the system wide occupancy per entrance or room.

-Logs data to persistent storage (CSV) and manages node reconnection.

5. Dashboard and User Interface Subsystem

-Live dashboard displaying current occupancy, directional flow rate (people per minute), and recent trends.

-Visual indicators for “crowded” vs. “not crowded” states based on configurable thresholds.

6. Hardware and PCB Subsystem (Sensor Node)

-Custom PCB using a modular, low risk design approach

-Mechanical enclosure and mounting plan to ensure consistent and repeatable sensor placement.

Criterion for Success:
The project will be considered successful if the system can accurately demonstrate real time directional counting and occupancy estimation at one to two doorways using non imaging sensors. The system must correctly track entries and exits and maintain a live occupancy estimate that updates within one second of a doorway event. A functional dashboard should display current occupancy, flow rate, and node status in real time, while the gateway continuously logs data for at least one hour without interruption. Additionally, a custom designed PCB must be fabricated and used for at least one sensor node in the final demonstration. The system must remain stable and operational during temporary wireless packet loss events, demonstrating graceful degradation without crashes and automatic recovery once communication resumes. Node health and connectivity status should be clearly visible through the user interface to allow for basic monitoring and debugging. If time permits, additional success criteria include scaling the system to three or four sensor nodes covering multiple entrances or zones, improving robustness in challenging edge cases such as tailgating or closely spaced groups, and evaluating accuracy as a function of traffic rate. Further extensions may include implementing battery-powered sensor nodes with basic power optimization strategies or adding simple short term congestion prediction based on recent occupancy trends.

Microcontroller-based Occupancy Monitoring (MOM)

Vish Gopal Sekar, John Li, Franklin Moy

Microcontroller-based Occupancy Monitoring (MOM)

Featured Project

# Microcontroller-based Occupancy Monitoring (MOM)

Team Members:

- Franklin Moy (fmoy3)

- Vish Gopal Sekar (vg12)

- John Li (johnwl2)

# Problem

With the campus returning to normalcy from the pandemic, most, if not all, students have returned to campus for the school year. This means that more and more students will be going to the libraries to study, which in turn means that the limited space at the libraries will be filled up with the many students who are now back on campus. Even in the semesters during the pandemic, many students have entered libraries such as Grainger to find study space, only to leave 5 minutes later because all of the seats are taken. This is definitely a loss not only to someone's study time, but maybe also their motivation to study at that point in time.

# Solution

We plan on utilizing a fleet of microcontrollers that will scan for nearby Wi-Fi and Bluetooth network signals in different areas of a building. Since students nowadays will be using phones and/or laptops that emit Wi-Fi and Bluetooth signals, scanning for Wi-Fi and Bluetooth signals is a good way to estimate the fullness of a building. Our microcontrollers, which will be deployed in numerous dedicated areas of a building (called sectors), will be able to detect these connections. The microcontrollers will then conduct some light processing to compile the fullness data for its sector. We will then feed this data into an IoT core in the cloud which will process and interpret the data and send it to a web app that will display this information in a user-friendly format.

# Solution Components

## Microcontrollers with Radio Antenna Suite

Each microcontroller will scan for Wi-Fi and Bluetooth packets in its vicinity, then it will compile this data for a set timeframe and send its findings to the IoT Core in the Cloud subsystem. Each microcontroller will be programmed with custom software that will interface with its different radio antennas, compile the data of detected signals, and send this data to the IoT Core in the Cloud subsystem.

The microcontroller that would suit the job would be the ESP32. It can be programmed to run a suite of real-time operating systems, which are perfect for IoT applications such as this one. This enables straightforward software development and easy connectivity with our IoT Core in the Cloud. The ESP32 also comes equipped with a 2.4 GHz Wi-Fi transceiver, which will be used to connect to the IoT Core, and a Bluetooth Low Energy transceiver, which will be part of the radio antenna suite.

Most UIUC Wi-Fi access points are dual-band, meaning that they communicate using both the 2.4 GHz and 5 GHz frequencies. Because of this, we will need to connect a separate dual-band antenna to the ESP32. The simplest solution is to get a USB dual-band Wi-Fi transceiver, such as the TP-Link Nano AC600, and plug it into a USB Type-A breakout board that we will connect to each ESP32's GPIO pins. Our custom software will interface with the USB Wi-Fi transceiver to scan for Wi-Fi activity, while it will use the ESP32's own Bluetooth Low Energy transceiver to scan for Bluetooth activity.

## Battery Backup

It is possible that the power supply to a microcontroller could fail, either due to a faulty power supply or by human interference, such as pulling the plug. To mitigate the effects that this would have on the system, we plan on including a battery backup subsystem to each microcontroller. The battery backup subsystem will be able to not only power the microcontroller when it is unplugged, but it will also be able to charge the battery when it is plugged in.

Most ESP32 development boards, like the Adafruit HUZZAH32, have this subsystem built in. Should we decide to build this subsystem ourselves, we would use the following parts. Most, if not all, ESP32 microcontrollers use 3.3 volts as its operating voltage, so utilizing a 3.7 volt battery (in either an 18650 or LiPo form factor) with a voltage regulator would supply the necessary voltage for the microcontroller to operate. A battery charging circuit consisting of a charge management controller would also be needed to maintain battery safety and health.

## IoT Core in the Cloud

The IoT Core in the Cloud will handle the main processing of the data sent by the microcontrollers. Each microcontroller is connected to the IoT Core, which will likely be hosted on AWS, through the ESP32's included 2.4GHz Wi-Fi transceiver. We will also host on AWS the web app that interfaces with the IoT Core to display the fullness of the different sectors. This web app will initially be very simple and display only the estimated fullness. The web app will likely be built using a Python web framework such as Flask or Django.

# Criterion For Success

- Identify Wi-Fi and Bluetooth packets from a device and distinguish them from packets sent by different devices.

- Be able to estimate the occupancy of a sector within a reasonable margin of error (15%), as well as being able to compute its fullness relative to that sector's size.

- Display sector capacity information on the web app that is accurate within 5 minutes of a user accessing the page.

- Battery backup system keeps the microcontroller powered for at least 3 hours when the wall outlet is unplugged.

Project Videos