Project

# Title Team Members TA Documents Sponsor
67 Roomify: A Smart Room System
Benjamin Chang
Owen Wang
Warren Lam
Lukas Dumasius proposal1.pdf
# _Roomify_: A Smart Room System

*Team Members:*
- Warren Lam (wklam2)
- Benjamin Chang (bchang)
- Owen Wang (owenw2)

# Problem

Room decor (LED lights, music, desk decorations, etc.) is hard to coordinate, leading to unsynchronized room vibes (e.g. slow music and flashing lights) and an excess of handheld remotes. The smart home industry is projected to grow from 127.8 billion to 537.3 billion by 2030. However, there are currently limited products and systems for smart rooms and apartments. The products that exist are developed independently, each with its own remote, controls, and settings. There is no easy way to coordinate all of these devices, creating the need for a centralized room system.

# Solution

_Roomify_ is a centralized room control system where users can easily operate devices in their room like LED lights, TV remotes, Spotify, or other remote-controlled decorations and displays. For example, users will be able to press a single button on their phone/on the Roomify circular display and turn on their TV to the cooking channel, put on yellow lights, and play jazz music, all in one click. _Roomify_ removes the need for multiple remotes and coordinates independent, IR-controlled devices.

_Roomify_ will appear like a vinyl player with a hinged wooden box, with a round RGB TTL TFT display driven by an ESP32-S3 board. The core functionality of the board will be controlling the round display, IR signal receiving and decoding (to store device remote codes), WI-FI communication (to make Spotify API calls), and omni-directional NEC protocol IR transmission (to transmit remote codes). In addition, we will design “repeaters” that can receive and relay IR signals to increase effective range and spatial coverage.

By "copying" and storing IR remote codes, users can map buttons on their phone to IR signals that interact with devices in the room. Roomify will have an "Add Remote" mode where users can store device remote information within _Roomify_. For example, a user would add the "red" button on a LED string light remote by aiming the remote at the _Roomify_ box. After _Roomify_ decodes the signal, users can label and save the button code data. The user could then repeat the process for other buttons on the remote. Any device that uses a NEC protocol remote or has an API (like Spotify) will be operable with _Roomify_.

After adding all room device remotes to _Roomify_, users will be able to create quick-start presets (e.g. green lights with Christmas music and a Snoopy Gif display). When the user selects a preset, _Roomify_ will transmit the necessary IR signals in all directions (14 IR LEDS, 6 to cover the three primary axes, and 8 pointed along the center of each octant) and make Spotify API calls. Aside from using presets, users can also change individual settings, avoiding the necessity of using multiple remotes or apps.

_Roomify_ is an extensible, centralized room system that allows for full control over decorations, lights, and sound, allowing students and apartment owners to all of their devices and transform their room into a smart room.

# Comparison to Existing Solutions
While smart home products like Google Nest or Amazon Alexa exist, only compatible smart devices can be connected. Roomify is a much more lightweight and cheap solution designed to work with everyday products without requiring any special integration.

# Solution Components

## Subsystem : Power

### Function:
The power control unit will consist of an AC-DC converter that allows our unit (the main control box) to pull power from an AC wall outlet. Our estimated peak power consumption of our device will draw around 8 Watts of power. We aim to have the power unit draw the 120VAC and step it down to 12VDC. From there, we will have other power converters, like an LDO, to power our MCU. The 12V line will go to the DC motor that opens and closes the box.

### Features:
In our power module, we will have an AC-DC converter with a flyback topology. This will be paired with an active PFC to control it such that we will be able to get a good power factor for our system. In addition to this, the transformer will allow us to isolate the high voltage side from our low voltage and all the other parts of our circuit. After our AC-DC converter, we have an LDO to act as a linear voltage source for our MCU in order to provide clean power. Our motor will pull from the AC-DC converter.

## Subsystem 2: IR Remote Signal Receiving and Transmission

### Function:
The IR subsystem in the main control unit copies and stores device remote signals to transmit later (via app control).

### Features:
- Receive and decode IR signals when in “pairing” mode
- Store IR signal in Roomify database
- Send omni-directional IR signal after receiving an HTTP POST request (from web-app)
- Transmit a device remote signal (hex code) to control room devices

### Implementation:
- Receiver: The receiver LED will connect to one of the GPIO ports on our MCU in order for our MCU to read and see any digital high or lows from the IR signal. To connect it, the MCU, we will have the LED connected in series with a resistor and connected to the power and GPIO.
- Transmitter: 14 IR LEDs ( 6 to cover the three primary axes, and 8 pointed along the center of each octant) driven by MCU (NEC data encoding). The topology will be similar to the receiver: the IR LED will connect to a resistor in series and will turn on and off depending on the GPIO outputs from our MCU.
- Control: ESP32-S3 for Wi-Fi to receive requests from web-app

## Subsystem 3: IR Repeaters

### Function:
Extend the effective range and spatial coverage of Roomify by receiving transmitted IR commands, conditioning the signal, and re-emitting it to reach devices outside the direct line-of-sight of the main unit.

### Features:
- Reception of NEC-protocol IR signals from the main Roomify unit
- Signal amplification to restore IR carrier strength
- Bandpass filtering centered at 38 kHz to reject ambient light and noise
- Re-transmission of conditioned IR signals via high-power IR LEDs
- Enables modular and scalable coverage for larger rooms or obstructed layouts

### Implementation:
Each IR repeater will consist of an IR receiver module tuned to the 38 kHz carrier frequency, followed by an analog amplification stage to restore signal amplitude. A bandpass filter will be used to isolate the IR carrier and suppress noise from ambient lighting sources. The conditioned signal will then drive one or more IR LEDs through a transistor-based driver, re-emitting the original command with sufficient radiant intensity to propagate further into the room. The repeater operates transparently and does not decode or modify the IR protocol, minimizing latency and system complexity.

## Subsystem 4: Web application

### Function:
The web application is the primary user interface for configuring and controlling _Roomify_. It allows users to add remotes, label and map IR commands, create presets, and trigger synchronized room actions. The app communicates with the ESP32-S3 over Wi-Fi using lightweight HTTP requests.

### Features:
- Users place _Roomify_ in IR-learning mode via the web app. When an IR signal is received and decoded, the user labels and saves the command such as “Power”, “Red”, or “Brightness Up.”

- Create presets that bundle multiple actions, including IR transmissions, Spotify API calls, and display updates.

- Manually control individual IR or API actions without presets.

### Implementation:
- Frontend: Browser-based UI (Next.js, Tailwind CSS, ShadCN UI)
- Backend: REST server (FastAPI, Postgres)
- External Integration: Spotify Web API for music control

## Subsystem 5: Control Box (“Wooden Vinyl Player”)
### Function:
The control box is the housing unit for the round TTL display screen and ESP32-S3. The box will be constructed from wood and painted to look like a hinged vintage wooden vinyl player. The round TTL display screen will have a spinning display to look like a spinning record.

### Features:
- Wooden finish
- Motor-controlled hinges to open and close the box
- Round display screen with spinning display (to look like a vinyl player)

### Implementation:
- Box will be constructed from wood (laser cut)
- The way we control the hinges will be through DC brushed motors. We will implement these motors to spin a gear that will slowly open and close the box.
- RGB-666 interface standard driven by ESP32-S3

# Criterion For Success

- ### IR Learning and Storage
Successfully decode and store at least 10 unique NEC-protocol IR commands from external remotes.
Test: Verify that learned codes match signals sent from the original remote using a second IR receiver.

- ### Omnidirectional IR Control
Control at least two distinct IR-based devices from multiple orientations within a standard dorm room.
Test: Activate each device using Roomify without moving the unit or the device.

- ### Web Application Functionality
Web app can reliably trigger IR commands and Spotify API actions over Wi-Fi with latency < 1 s.
Test: Measure response time between user action in the web app and device execution.

- ### Preset Execution
Presets must execute multiple actions (IR commands + API calls + display updates) simultaneously.
Test: Verify synchronized execution of all actions using multiple devices and a test Spotify account.

- ### Hardware Stability
System operates continuously for at least 2 hours without resets, Wi-Fi drops, or overheating.
Test: Run a continuous preset cycle or manual control session while monitoring temperature, power draw, and connectivity.

- ### Standalone Operation
All functionality works without original remotes or external apps.
Test: Operate devices and execute presets after disconnecting original remotes and external control devices.

- ### Safety and Power Compliance
The device operates within safe current limits and maintains stable voltages.
Test: Measure voltage and current under typical operation with a benchtop power supply.

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