Project

# Title Team Members TA Documents Sponsor
31 Gamified Focus-Detection Tamagotchi
Khushi Murthy
Michael Yang
Noah Yi
Tim Jiang other1.pdf
proposal1.pdf
# Problem

We are currently living in a time where Gen Z’s attention span is being reduced due to short form media content and various social and technological distractions, leading to decreased productivity. As such, students who force themselves to sit through hours of studying will often find themselves struggling to stay motivated and on task. Methods such as the Pomodoro strategy have been shown to help increase productivity through structure, yet continuous accountability and immediate feedback when a user becomes distracted are still missing factors.

# Solution

We propose an interactive, desk-based smart companion inspired by a Tamagotchi. The device monitors several indicators of user focus and translates them into the emotional and physical behavior of a desktop pet. A host computer will collect simple focus-related signals, including active application information, keyboard and mouse activity, and whether the user is present at the desk. These signals will be combined into a focus score and transmitted to a microcontroller contained inside a 3D printed enclosure through USB serial communication. The microcontroller will maintain the pet's behavioral state and control its physical outputs. Sustained focus may cause the pet to appear happy or energetic, while extended inactivity or distraction may cause it to appear sad, tired, or perform a physical gesture such as waving its arms to attract the user’s attention. Therefore, our goal is for the companion to create an immediate, external feedback loop that gamifies focus and reinforces effective work habits.

The project is divided into three primary subsystems:

It will have 3 different subsystems:
Software Logic Subsystem: We will connect the board to the laptop to collect focus-related information from the host and compute a focus score.
Microcontroller Subsystem: The embedded controller itself that manages the pet’s behavioral state machine and controls the hardware outputs.
The Display: Provides the user-facing visual and mechanical feedback for the pet’s state

# Solution Components

## Subsystem 1 : Software Logic Subsystem

Description: Runs in the background on the host computer to monitor focus. It tracks active application titles, keyboard/mouse input activity, and uses the host webcam to detect desk presence via basic face tracking. To keep the image-processing component feasible, the webcam will not attempt complex activity, emotion, or identity recognition. It will perform a constrained presence-detection task using an existing computer-vision library such as OpenCV or MediaPipe. The system will assume a relatively fixed webcam position and desk environment. It aggregates these metrics into a scoring metric that represents focus state and sends periodic command packets over USB-serial to the hardware. The main software design challenge of this subsystem will be the fusion of multiple imperfect signals into a reliable and explainable focus metric, rather than relying on computer vision alone.

Parts:
Host PC
Software packages

## Subsystem 2 : Microcontroller and Custom Control PCB Subsystem

Description: A custom PCB will integrate the Raspberry Pi Pico with the system's power distribution, display interface, actuator-control circuitry, peripheral connectors, and protection components. The board will receive focus-state information from the host computer over USB and generate the electrical control signals required by the display and mechanical actuators.
Parts:
Microcontroller Board: Raspberry Pi Pico (Part #: SC0915)
USB interface
Voltage regulation and power distribution circuitry
Servo control interfaces
Display communication interface

## Subsystem 3 : Display and Actuation Subsystem

Description: Provides the physical feedback that makes the device function as a desktop companion. A small display will show animated facial expressions corresponding to the current behavioral state of the pet. One or more servo motors will provide additional mechanical feedback by moving physical components such as the pet's arms.

Parts:
Small OLED or TFT display
Micro servo motors
Mechanical arm linkage
3D-printed enclosure
Supporting power and signal circuitry

# Criterion For Success

Success would consist of meeting our objectives for both the hardware and software portion of the project. The software must successfully collect application activity, keyboard/mouse activity, and webcam-based desk-presence information and combine these inputs into a reproducible focus score or state. The host computer must successfully transmit low-latency focus-state updates to the hardware with outputs being shown within 1-2 seconds. The microcontroller must reliably maintain at least four distinct behavioral states, with each state transition determined by documented focus-score thresholds and timing conditions. Finally, Given the same sequence of focus inputs, the system should produce the same behavioral response. Every pet expression and mechanical action should therefore be traceable to a specific focus metric or state-machine transition.

Team Heart Restart

Brian Chiang, Will Mendez, Ethan Moraleda

Featured Project

Team Heart Restart

Team Members:

- William Mendez (wmendez2)

- Ethan Moraleda (ethannm2)

- Brian Chiang (brianc11)

Problem:

Research has found that defibrillators delivering a single shock have a lower survival rate (13.3%) compared to Double Sequential External Defibrillators (DSED), which achieve a survival rate of 30.4%. To deliver a double shock, two separate defibrillators are required. Since ambulances typically carry only one defibrillator/cardiac monitor, DSED is currently not feasible in the field. Current Defibrillators do not have impedance readings which limits their accessibility to different body types.

Solution:

Our solution is to create a singular device that can deliver two sequential shocks. As we now need a total of four pads to administer 2 consecutive shocks, we are now able to read the impedance of the patient, allowing us to calculate a more accurate time and power of the shocks to increase survivability.

Our first subsystem will be our custom PCB board. This board will contain 3 main elements: the electrocardiogram (EKG), the Impedance sensor, and the power supply. The EKG will be used to read the electric signals within the heart from the anterior-posterior (AP) and the anterior-lateral (AL) positions. This will utilize 4 hospital-grade electrode tabs as the sensors. These electrical signals will allow us to understand how the heart is functioning, and when we would initiate the sequential shocks. The impedance sensor will measure the body impedance of the patient. This measurement is essential as it is required to calculate how much power is needed behind each shock and the time between each shock. Different body types require different levels of power to reset their hearts. Lastly, the power supply will be used to supply power to the PCB board and our other subsystems.

Our Second subsystem will be an external microcontroller board. This microcontroller will be in charge of our inputs and outputs. Our three inputs are the EKG reading, the Impedance reading, and the start/stop button. Our output will be an HDMI display, which will display the heart rate and impedance in real time with high accuracy.

For safety and to keep the scope of the project realistic, we will be implementing only the EKG and impedance sensor. A future senior design project can implement our project into a full defibrillator device that can execute sequential shocks. We will be documenting our work to hand it off appropriately.

Solution Components

Subsystem 1 - Main board

Subsystem 1.1 - ECG (Amplifiers and Filters)

The electrocardiogram will comprise multiple filters, which can be built using breadboards and over-the-counter small electronic components. This filter will be placed on a PCB board, which will be connected to the microcontroller. The PCB will most likely have a differential amplifier, with a low-pass filter and a notch filter. This will eliminate a lot of noise and disregard all the higher frequencies that do not occur in the human body.

Subsystem 1.2 - Impedance sensor

High-pass filter: Based on previous research, higher frequencies are used to find the human body’s impedance, which means we will need a high-pass filter to filter out the lower frequencies.

Amplifier: Currents that are traveling through the body will be very sensitive and small. To combat this and make the readings readable, an amplifier will be needed.

Subsystem 1.3 - Power Supply

Power Supply: The Power Supply will take a Power output from a Battery and step it down to the voltages needed to supply the electrocardiogram, impedance sensor, and microcontroller. This will likely use LDOs and/or buck converters.

Subsystem 2 - Microcontroller board

This board will take in the outputs from the ECG, Impedance sensor, and power. The ECG and Impedance sensor readings will then be processed and converted to display to a separate screen.

Criterion For Success

Goal 1: Display heart rate via a graph in real time.

Goal 2: Display impedance readings via a graph in real time.

Goal 3: Design circuitry for EKG and Impedance and implement via PCB

Goal 4: Design a board that can step down power from a battery for EKG and Impedance circuitry

Goal 5: Utilize a microcontroller to process readings

Goal 6: Work with medical students/mentors

Goal 7: Document how to implement this project for future expansion.

Project Videos