Project

# Title Team Members TA Documents Sponsor
32 Insight: Cardiovascular Screening Device
Ethan Pereira
Jay Nathan
Rishab Iyer
Weiman Yan design_document1.pdf
final_paper1.pdf
photo1.jpeg
presentation1.pptx
proposal1.pdf
After discussing with both Professor Rakesh Kumar and Professor Arne Filthelt, we have addressed some limitations and concerns regarding our initial project proposal. Here is our revised proposal.

# Insight: Cardiovascular Screening Device
## Team Members:
Jay Nathan (jayrn2)
Rishab Iyer (riyer20)
Ethan Pereira (ethanrp2)


# Problem
Cardiovascular disease (CVD) is the leading cause of death worldwide, responsible for nearly 20 million deaths annually, about one in three deaths overall. A significant share of these fatalities occur without prior diagnosis: approximately 45% of sudden cardiac deaths happen in individuals with no previously recognized heart disease, while nearly 20% of adults with hypertension and up to 23% of those with atrial fibrillation remain undiagnosed. These silent conditions, such as hypertension, arrhythmias, and sinus bradycardia risk factors, drive the majority of preventable CVDs.

Current solutions remain fragmented, while comprehensive screening still requires multiple expensive clinical visits, such as blood pressure measurement, lipid panels, ECGs, and rhythm monitoring, creating barriers for uninsured or underserved populations. The impact is most severe in rural communities, where mortality rates are 20% higher than in urban areas due to limited access to screening. Yet the challenge extends to cities as well, where preventive tests are often costly, not covered by insurance, and therefore underutilized. Consumer devices like blood pressure cuffs, smartwatches, and single-lead ECGs are disjointed, expensive, and difficult to interpret. Critically, there is no affordable, comprehensive, and user-friendly screening solution that can detect CVD risks.


# Solution
We propose a low-cost, cardiovascular screener to detect the leading drivers of CVD: hypertension, atrial fibrillation (AFib), and sinus bradycardia (SB). The device combines Electrocardiogram (ECG), Photoplethysmography (PPG), and accelerometer-based noise correction for accurate measurements. Mathematical regression-based models will then analyze the digital signals and generate comprehensible readings.

Technically, the system consists of a single custom PCB with built-in ECG and PPG sensors plus an accelerometer to capture physiological signals simultaneously. Both the ECG and PPG sensors will be placed on the board to focus on immediate automated screening. A data acquisition board with an Atmega microcontroller synchronizes and packages the data for transmission via USB. A connected PC runs lightweight mathematical regression models for hypertension, AFib, and SB detection. Results are displayed through a simple web dashboard for easy interpretation.


# Solution Components

## Subsystem 1: Data Acquisition System (DAS)
Function: The system captures physiological data from both an ECG and a PPG sensor (both on board). An accelerometer is also connected to support motion-based denoising of the signal. The microcontroller processes the data we’re reading and sends it into the ML pipeline on the PC through a USB port.

Components:
- ECG Sensor: AD8232 Analog Front End for ECG
- PPG Sensor: MAX30102
- Accelerometer: Adafruit LIS3DH
- Microcontroller: ATmega328P MCU
- Comm Port: USB



## Subsystem 2: Firmware & Communication
Function: Firmware handles ADC sampling, calibration routines, and packaging data for transmission. Supports firmware for reading data from both sensors. USB-based serial communication happens between the ATmega on the DAS board and the host PC. The firmware will send ECG/PPG data as formatted CSV files to be processed by the models.

Components:
- Microcontroller: ATmega328P MCU
- Sensor Buses: SPI/I²C
- Comm Port: USBC or micro-USB connector on the DAS PCB
- Host Software: an application on the PC to receive and display data on the web app


## Subsystem 3: Backend Processing and ML Inference
Function 1: Use ECG/PPG-derived HRV(heart rate variability) and irregularity features to classify AFib vs. normal rhythm using a lightweight classifier on RR(beat-to-beat intervals) sequences.

Function 2: Compute mean HR and rhythm regularity from ECG/PPG to flag sinus bradycardia when < 60 bpm using simple threshold logic (no training needed).

Function 3: Combine PTT (ECG→PPG latency) and PPG features to classify Normal/Elevated/Hypertensive risk levels using a classifier trained with cuff labels.

Components:
- Compute: PC(Laptop) for computation.
- ML Libraries: PyTorch, scikit-learn, XGBoost, MLflow
- Preprocessing module: filtering, motion gating, feature extraction (RR, PP, PTT, HRV, PPG morphology).
- Models: AFib classifier, Brady threshold logic, BP-risk classifier.
- Calibration & Decision Layer: Produces JSON outputs with labels, confidence, and window duration



# Criterion For Success
## Functional Affordable Prototype:
A working hardware prototype integrating both ECG and PPG on the same board, and collecting, processing, and displaying data in real time. Target total cost remains < $70.


## Signal Processing with Baseline Accuracy:
The system will have noise filtering and feature extraction (heart rate and rhythm patterns) on baseline ECG and PPG datasets from a sampled group of individuals. Success criteria include:

Accuracy Benchmarks: Heart rate estimated within ±5 bpm of reference values in ≥80% of trials, and rhythm classification achieving ≥75% agreement with reference annotations.

Literature-based Targets: Based on literature, we should aim for AFib detection AUC ≥ 0.95 (high ability to differentiate AFib from normal rhythm), Sinus Bradycardia detection F1 ≥ 0.95 (recall for slow, regular rhythms), and hypertension classification Macro-F1 ≥ 0.80 with one calibration reading (accuracy across Normal/Elevated/Hypertensive categories when compared to a real reference).


Dataset Training & Validation: We will validate performance through repeated training and testing, comparing our outputs against certified standards for consistency. Evaluation will be conducted using publicly available medical datasets such as MIT-BIH (ECG) and PPG-DaLiA (PPG) to test reliability across diverse conditions.


Noise Mitigation: Integration of accelerometer inputs for motion-based denoising.


## ML Interpretation:
Backend ML models must correctly interpret ECG/PPG readings to achieve at least 85% classification accuracy on validation datasets for AFib detection and hypertension risk classification, showing that the models can reliably separate normal from abnormal conditions when tested against certified public medical datasets.



## Repeatability & Sensor Placement:
The same individual tested five times in a row should yield similar results, with differences within a 10% margin for all key metrics (heart rate, rhythm classification, BP risk). For standard ECG lead & sensor placement, we will use standard placement (as shown in LITFL ECG Lead Positioning) to reduce variability caused by electrode misplacement.



# Resources:
ECG Lead positioning: https://litfl.com/ecg-lead-positioning/


Atrial Fibrillation: https://pmc.ncbi.nlm.nih.gov/articles/PMC11262392/

Sinus Bradycardia: https://www.researchgate.net/publication/377965437_Detecting_Sinus_Bradycardia_From_ECG_Signals_Using_Signal_Processing_And_Machine_Learning

Hypertension: https://pmc.ncbi.nlm.nih.gov/articles/PMC11904724/#S10

Monitor for Dough and Sourdough Starter

Jake Hayes, Abhitya Krishnaraj, Alec Thompson

Monitor for Dough and Sourdough Starter

Featured Project

Team Members:

- Jake Hayes (jhayes)

- Abhitya Krishnaraj (abhitya2)

- Alec Thompson (alect3)

# Problem

Making bread at home, especially sourdough, has become very popular because it is an affordable way to get fresh-baked bread that's free of preservatives and other ingredients that many people are not comfortable with. Sourdough also has other health benefits such as a lower glycemic index and greater bioavailability of nutrients.

However, the bulk fermentation process (letting the dough rise) can be tricky and requires a lot of attention, which leads to many people giving up on making sourdough. Ideally, the dough should be kept at around 80 degrees F, which is warmer than most people keep their homes, so many people try to find a warm place in their home such as in an oven with a light on; but it's hard to know if the dough is kept at a good temperature. Other steps need to be taken when the dough has risen enough, but rise time varies greatly, so you can't just set a timer; and if you wait too long the dough can start to shrink again. In the case of activating dehydrated sourdough starter, this rise and fall is normal and must happen several times; and its peak volume is what tells you when it's ready to use.

# Solution

Our solution is to design a device with a distance sensor (probably ultrasonic) and a temperature sensor that can be attached to the underside of most types of lids, probably with magnets. The sensors would be controlled with a microcontroller; and a display (probably LCD) would show the minimum, current, and maximum heights of the dough along with the temperature. This way the user can see at a glance how much the dough has risen, whether it has already peaked and started to shrink, and whether the temperature is acceptable or not. There is no need to remove it from its warm place and uncover it, introducing cold air; and there is no need to puncture it to measure its height or use some other awkward method.

The device would require a PCB, microcontroller, sensors, display, and maybe some type of wireless communication. Other features could be added, such as an audible alarm or a graph of dough height and/or temperature over time.

# Solution Components

## Height and Temperature Sensors

Sensors would be placed on the part of the device that attaches to the underside of a lid. A temperature sensor would measure the ambient temperature near the dough to ensure the dough is kept at an acceptable temperature. A proximity sensor or sensors would first measure the height of the container, then begin measuring the height of the dough periodically. If we can achieve acceptable accuracy with one distance sensor, that would be ideal; otherwise we could use 2-4 sensors.

Possible temperature sensor: [Texas Instruments LM61BIZ/LFT3](https://www.digikey.com/en/products/detail/texas-instruments/LM61BIZ%252FLFT3/12324753)

Proximity sensors could be ultrasonic, infrared LED, or VCSEL.\

Ultrasonic: [Adafruit ULTRASONIC SENSOR SONAR DISTANCE 3942](https://www.digikey.com/en/products/detail/adafruit-industries-llc/3942/9658069)\

IR LED: [Vishay VCNL3020-GS18](https://www.mouser.com/ProductDetail/Vishay-Semiconductors/VCNL3020-GS18?qs=5csRq1wdUj612SFHAvx1XQ%3D%3D)\

VCSEL: [Vishay VCNL36826S](https://www.mouser.com/ProductDetail/Vishay-Semiconductors/VCNL36826S?qs=d0WKAl%252BL4KbhexPI0ncp8A%3D%3D)

## MCU

An MCU reads data from the sensors and displays it in an easily understandable format on the LCD display. It also reads input from the user interface and adjusts the operation and/or output accordingly. For example, when the user presses the button to reset the minimum dough height, the MCU sends a signal to the proximity sensor to measure the distance, then the MCU reads the data, calculates the height, and makes the display show it as the minimum height.

Possible MCU: [STM32F303K8T6TR](https://www.mouser.com/ProductDetail/STMicroelectronics/STM32F303K8T6TR?qs=sPbYRqrBIVk%252Bs3Q4t9a02w%3D%3D)

## Digital Display

- A [4x16 Character LCD](https://newhavendisplay.com/4x16-character-lcd-stn-blue-display-with-white-side-backlight/) would attach to the top of the lid and display the lowest height, current height, maximum height, and temperature.

## User Interface

The UI would attach to the top of the lid and consist of a number of simple switches and push buttons to control the device. For example, a switch to turn the device on and off, a button to measure the height of the container, a button to reset the minimum dough height, etc.

Possible switch: [E-Switch RA1113112R](https://www.digikey.com/en/products/detail/e-switch/RA1113112R/3778055)\

Possible button: [CUI Devices TS02-66-50-BK-160-LCR-D](https://www.digikey.com/en/products/detail/cui-devices/TS02-66-50-BK-160-LCR-D/15634352)

## Power

- Rechargeable Lithium Ion battery capable of staying on for a few rounds of dough ([2000 mAh](https://www.microcenter.com/product/503621/Lithium_Ion_Battery_-_37v_2000mAh) or more) along with a USB charging port and the necessary circuitry to charge the battery. The two halves of the device (top and underside of lid) would probably be wired together to share power and send and receive data.

## (stretch goal) Wireless Notification System

- Push notifications to a user’s phone whenever the dough has peaked. This would likely be an add-on achieved with a Raspberry Pi Zero, Gotify, and Tailscale.

# Criterion For Success

- Charge the battery and operate on battery power for at least 10 hours, but ideally a few days for wider use cases and convenience.

- Accurately read (within a centimeter) and store distance values, convert distance to dough height, and display the minimum, maximum, and current height values on a display.

- Accurately read and report the temperature to the display.

- (stretch goal) Inform the user when the dough has peaked (visual, audio, or app based).

Project Videos