Project Title: StudySense – Smart Study Room Management System
Team Members: Ben Hill, Kashif Chopra
Course: ECE 414 – Embedded Systems
Project Overview
StudySense addresses the issue of misused study rooms at Lafayette College, where reserved rooms often remain unoccupied, preventing other students from using them. This project created an innovative sensor-based system to manage study room occupancy efficiently. The system allows students to “sign in” to their reserved room using an RFID fob and uses motion sensors to monitor occupancy. If a room remains vacant for an extended period after check-in, the booking is automatically canceled and the room is marked as available for others, ensuring optimal resource utilization.
Key Features & Objectives
The system was designed with the following core capabilities:
-
RFID Check-In: Students can check into a study room with a single scan of their unique RFID fob.
-
Automated No-Show Cancellation: Bookings are automatically canceled if the user does not check in within 30 minutes of the reservation start time.
-
Occupancy Monitoring: A PIR motion sensor tracks activity inside the room after check-in.
-
Intelligent Booking Management: If no motion is detected for a continuous 30-minute period, the reservation is canceled to free up the room.
-
Long-Range Communication: Data between sensor units is transmitted wirelessly using LoRaWAN for reliable, low-power communication.
-
Real-Time Status Display: An LCD screen outside the room shows the current status (Available, Booked, Welcome) and occupancy, updating in real-time.
Technical Implementation
System Architecture:
The system is split into two main units that communicate via LoRa:
-
Sensor Unit (Inside the room): Houses a PIR motion sensor and a Raspberry Pi Pico with a LoRa transmitter.
-
RFID Unit (Outside the room): Contains an RFID reader, an LCD display, a second Raspberry Pi Pico, and a LoRa receiver.
Hardware Core:
-
Microcontrollers: Two Raspberry Pi Pico boards.
-
Sensors: MFRC522 RFID Reader, HC-SR501 PIR Motion Sensor.
-
Communication: Adafruit RFM9x LoRa Radio Transceivers (915 MHz).
-
User Interface: Adafruit ILI9341 2.4″ TFT LCD Display.
-
Power: Standard Micro-USB connections from wall outlets.
Software & Framework:
-
Framework: Arduino
-
Key Modules:
-
PIR Sensing: Implements a debouncing algorithm and a Finite State Machine (FSM) to accurately determine human presence.
-
RFID FSM: Manages the check-in process and room state (Available, Welcome, Booked).
-
LoRa Communication: Handles wireless data transmission of occupancy status between units.
-
Display Driver: Controls the LCD to show room status, user welcome messages, and booking timers.
-
Challenges & Adaptations
The project involved several engineering challenges that were successfully overcome:
-
Sensor Data Accuracy: The raw data from the PIR sensor was inconsistent. A custom debouncing algorithm was developed that samples data over a 5-second window to produce a stable and reliable occupancy signal.
-
Wireless Communication: Establishing a robust LoRa link required careful configuration. The team switched to the Arduino IDE to leverage well-supported libraries, which streamlined development.
-
System Integration: Coordinating the software modules (RFID, PIR, LoRa, Display) across two separate microcontrollers required meticulous debugging and timing management.
-
Hardware Design: Designing and building the physical units, including 3D-printed enclosures, presented challenges in managing size constraints and ensuring reliable circuit connections.
Results & Demonstration
The fully implemented StudySense system successfully:
-
Registers student check-ins with a single RFID scan.
-
Accurately tracks room occupancy using the debounced motion sensor.
-
Automatically cancels bookings after periods of inactivity.
-
Relays occupancy data wirelessly from the inside sensor to the outside display unit.
-
Updates the LCD status screen in real-time to reflect the current room state.
Conclusion & Future Work
This project provided comprehensive hands-on experience in embedded systems design, integrating hardware and software components to solve a real-world problem. The team successfully applied concepts including Finite State Machines, SPI communication, wireless data transmission, and sensor interfacing. The result is a robust and functional prototype that meets all initial requirements.
Potential future enhancements include:
-
Integrating the system with a centralized campus booking platform.
-
Implementing a battery backup to maintain functionality during power outages.
-
Adding support for multiple rooms managed by a single network.
-
Developing a mobile app interface for remote status checking and booking.
