Project

# Title Team Members TA Documents Sponsor
46 BioSteady
Alisha Chakraborty
Asmita Pramanik
Pranav Nagarajan
Surya Vasanth design_document1.pdf
final_paper1.pdf
grading_sheet1.pdf
presentation1.pdf
proposal1.pdf
video1.mp4
**Team Members:**

Alisha Chakraborty (alishac4)

Asmita Pramanik (asmitap2)

Pranav Nagarajan (pranavn6)


**PROBLEM**

The rigor of student life has not only contributed to our rising stress levels, but also to our dependence on stimulants like caffeine to rapidly increase overall productivity. Furthermore, the wide availability of coffee shops in our school and workplaces make it easy for us to turn to such stimulants, without considering the detrimental combined effects of caffeine and stress on our health. Heightened levels of stress cause various physiological changes such as increased heart rate and skin conductance. Current research suggests that caffeine intake also exhibits similar physiological changes which introduces us to the problem of not being able to differentiate between the two. The ability to differentiate between the two will allow students to make informed decisions about the frequency of their caffeine consumption, consequently contributing to better physical and mental health.


**SOLUTION**

Our proposed solution is to integrate data collected from heart rate and galvanic skin conductance sensors to estimate and notify the user whether they are most likely experiencing physiological changes under stress or caffeine. Doing so will make it easier for them to decide whether it is wise to drink coffee in moments of high stress.
When we are affected by stress, the adrenaline release in our body immediately triggers a ‘fight or flight’ response, which causes a spike in heart rate. An additional bodily response is also that there are sudden spikes and drops in skin conductance with a general decrease. Under the effects of caffeine, the heart rate does increase but gradually over a couple of minutes. Its effect on skin conductance is that it is normal to low for about 200 seconds and then exhibits a steep increase. Using these facts, we will determine whether the user should consume coffee or not based on their general state of mind.

**SOLUTION COMPONENTS**

**1. Subsystem 1: Biomedical Sensing**

This subsystem will collect the user's physiological data like heart rate, oxygen levels, and skin conductivity and will transmit it to the MCU for data processing.

Heart Rate and Oximeter Sensor
Sensor : MAX30102

Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/max30102.pdf

Functionality : uses PPG (PhotoPlethysmoGraphy) to measure heart rate and oxygen saturation when processed through an MCU

Communication : I2C

Power Requirements : I2C pull-ups operate on 3.3 V and core operates on 1.8V

Galvanic Skin Response Sensor

Sensor: Elecbee GSR Skin sensor module

Datasheet : https://www.seeedstudio.com/Grove-GSR-sensor-p-1614.html?gad_source=1&gbraid=0AAAAACiAB45royCnyQi5xNgTS40BTYnFL&gclid=CjwKCAiAneK8BhAVEiwAoy2HYbC6TTsLlyUQMAoK6wCHRL13LKu2egu27oheSHQcOb3TPxl8o-h5IxoC6jQQAvD_BwE

Functionality : measures skin conductance to process physiological stress levels, higher voltage output = lower skin resistance which means more sweat

Communication : Analog output voltage changes based on the skin’s conductance
Power Requirements: 3.3V - 5V

**2. Subsystem 2 : MCU & Power management**

This subsystem will use the biometric data from the sensors for analysis as well as manage communication with external interfaces

Microcontroller : STM32L432KC

Datasheet : https://www.st.com/resource/en/datasheet/stm32l432kc.pdf

Interfaces : two I2C for MAX30102 and ADC for GSR sensor

Power Supply : 1.71 to 3.6 V for I/Os and 1.62V to 3.6V for ADCs

Functionality: This MCU will be used to collect the data from the sensors as well as use the USB to UART bridge for frontend web application

Voltage Regulators
LM39401-A : 5V to 3.3V Regulator for MCU and sensors
ASM1117-1.8 : 3.3V to 1.8V Regulator for MAX30102 Cores


**CRITERION FOR SUCCESS**

The system must reliably collect physiological data using the MAX30102 heart sensor and the GSR sensor, ensuring accurate measurement of heart rate, oxygen saturation and skin conductance.These values should be processed in real-time without errors or delays.

The microcontroller (STM32) must integrate the sensor data and differentiate between stress-induced changes (characterized by rapid spikes in heart rate and increased skin conductance) and caffeine-induced changes (characterized by gradual increases in heart rate with stable skin conductance).

Data transmission from the microcontroller to the web application should be a seamless process without any data-loss, ensuring real-time visualization of physiological states.

The web application must display the processed results in a clear, user-friendly format, allowing users to quickly interpret whether their physiological changes are stress- or caffeine-related.

The system must work reliably, right from the collection of data through the sensors to being able to display the results on a web application, ensuring it functions effectively in different scenarios.

The project should be able to let its users make informed decisions about their caffeine intake based on clear, actionable feedback provided by the system.

**REFERENCES**

Villarejo, María Viqueira, Begoña García Zapirain, and Amaia Méndez Zorrilla. 2012. "A Stress Sensor Based on Galvanic Skin Response (GSR) Controlled by ZigBee." Sensors 12 (5): 6075-6101.
https://doi.org/10.3390/s120506075.

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