Smart Room Implementation Guide
Smart Room Implementation Guide
Suggested enhancements include adding support for multiple user MAC addresses, integrating a real-time clock for accurate timing, displaying visit history on a web dashboard, and incorporating mood lights with relay modules. These improvements could diversify user interactions, enable detailed historical data viewing, and create dynamic environments through lighting changes, enhancing overall user experience and system capabilities .
The project uses a PIR motion sensor to detect movement and then initiates a Bluetooth scan using the ESP32. If the detected Bluetooth device matches a predefined MAC address of a smartphone, it identifies the specific user. This match triggers personalized interactions, such as displaying a welcome message on the OLED display .
The project requires the Arduino IDE and specific libraries: Adafruit_SSD1306 for OLED display functionality, BLEDevice for Bluetooth scanning, and EEPROM for memory operations. The ESP32 board support must be installed in the IDE. Each library handles different aspects; the Adafruit library manages graphical outputs on the OLED, BLEDevice handles device detection through Bluetooth, and EEPROM facilitates memory storage and retrieval operations to log user visits .
Bluetooth-based identification provides a seamless and user-friendly way to recognize individuals based on their smartphone presence. This method avoids the need for additional user interaction, such as card swipes or passwords. However, it may present limitations such as privacy concerns, potential interference from other Bluetooth devices, and dependency on users having Bluetooth enabled on their devices. Additionally, Bluetooth range might limit its effectiveness in larger spaces .
To handle multiple users, the system could be modified to store multiple MAC addresses in a list or array structure. During Bluetooth scanning, the system would check each detected device against this list. Potential challenges include increased memory usage, complexity in managing a dynamic list for entry and removal of user devices, and ensuring real-time performance as the list grows. Managing unique data for each user, such as personalized messages and logs, would also increase the complexity of data handling and retrieval .
The essential hardware components include an ESP32 for its Bluetooth capabilities, a PIR motion sensor for detecting movement, an OLED display for showing messages, a power supply to power the components, and optionally a buzzer or LED for feedback. ESP32 is crucial as it supports Bluetooth, which is required for device scanning. The PIR sensor detects motion to trigger the Bluetooth scan, the OLED displays messages to users, and the power supply powers the entire setup .
The buzzer provides auditory feedback when a recognized device is detected. Upon successful identification of a user, the buzzer emits a tone, signaling recognition and welcoming the user. This auditory cue complements the visual message on the OLED, offering an immediate, perceptible form of feedback indicating system activation and user acknowledgment .
Integrating an RTC would enhance the system by providing precise timestamping for user entries. This would allow the system to accurately log entry times and calculate the duration since the last visit. It could improve the personalization aspect by displaying detailed interaction history and potentially adapting responses based on the time of day. RTC integration would also enable more advanced features like setting time-based rules or alerts .
The EEPROM is utilized to store entry timestamps in the project. When a recognized device is detected, the system logs the current time to the EEPROM. This logging allows the system to display the time elapsed since the last entry, creating a more personalized user experience by referencing past interactions .
The Arduino code snippet defines a callback function that checks if the advertised Bluetooth device's MAC address matches the predefined known device MAC address. If a match is found, it sets a flag that triggers the OLED display to show a personalized welcome message. This logic ensures the system responds correctly based on whether the MAC address of the detected device is recognized .