Requirements

L0: The device should be lightweight (Measurable)

1. L1: users might wear the device for an extended period of time, needs to be comfortable, lightweight, and not a hindrance to the use of an Oculus VR headset

L0: The device needs to be low power (Measurable)

1. L1: device needs to operate for an extended period of time while not having an external power source.
2. L1: due to the small size of the sensors the device can not house a big battery so the sensors must be low power.

L0: The device needs to be responsive (Measurable)

1. L1: Low Latency for Signal Transmission, Metrics need to be responsive and up to date, getting the information with the lowest delay is important.
2. L1: Low Bandwidth for signal. Packets sent from the device should be small and infrequent, signal bandwidth can be small to help save power

L0: The product needs to be cheap to manufacture (Observable)

1. L1: Oculus VR headsets are inexpensive the accessory device also needs to be inexpensive
2. L1: The product should be simple in design with bulk components to reduce manufacturing costs.

L0: Device measures temperature in F or C (Measurable)

1. L1: temperature should be within 90F to 110F
2. L1: Device signals headset to warn the user if body temperature is too high.

L0: The device needs to be made of safe materials (Measurable)

1. L1: Materials that make the exterior of the device shouldn’t be hazardous to human health
2. L1: Sensor measurements should be done non invasively

L0: The device needs to be sturdy and not easily broken (Observable)

1. L1: Made of cheap durable plastic. Should hold up against drops from around 10 feet without breaking
2. L1: User might accidentally step on the device, it should be able to hold 80-100lbs of weight to prevent damage
3. L1: Internal layout needs to be secure and rigid. If the motion sensors move in their housing that will mess up the measurement, all sensors need to be tightly kept in place even after drops.

L0: The device should be water-resistant. Sweat should not break sensors (Observable)

1. L1: produced needs to be sealed well on the inside with either rubber or a coating applied to the pieces

L0: Device needs status LEDs (Observable)

1. L1: Battery life indicator and power indicator are needed
2. L1: Sensor information will be displayed on the Oculus headset only

L0: Device needs USB port (Observable)

1. L1: The device needs to be able to communicate over USB. This is crucial for software updates and for debugging errors with the sensors during manufacturing or during an RMA

L0: Wireless transmission over Bluetooth (Neither)

1. L1: Bluetooth does have some latency however it should be low enough for the product
2. L1: Bluetooth is relatively low power and components for it are readily available

L0: Needs to track motion in real-time (Measurable)

1. L1: Motion Capture needs to be polled multiple times a second.
2. L1: High accuracy motion tracking is the highest priority sensor when sending data, other sensors can have slight delays without effect to user experience
3. L1: The device needs multiple sensors for tracking motion, having more sensors will give the product more accuracy in tracking and a better user experience in games
4. L1: the device just records the raw motion data and sends it wirelessly to the headset for processing, Having processing done on the biofeedback device would just negatively affect the battery life and add complexity

L0: The device can not be easily ingested or easily lost (Neither)

1. L1: The Device needs to be small enough to not hinder the user but also be big enough to not be accidentally eaten or lost by the end-user.

L0: The device needs a strap to secure to the user (Observable)

1. L1: The device should have a strap made of comfortable fabric and should be adjustable to many different sizes
2. L1: The strap needs to be comfortable

L0: Blood Oxygen level will be measured along with breathing rate (Measurable)

1. L1: SP02 will be measured by contact with the skin with an IR sensor
2. L1: Breathing rate can be measured from the motion sensors, the headset can pull out a consistent background movement rhythm from the motion sensor and from that calculate the breathing rate in breaths per minute

L0: Device needs to be able to send and transmit data (Observable)

1. L1: Small low power microcontroller onboard need to handle this
2. L1: Device only needs to be able to send, receive and measure data from the sensors. No processing needs to be done on the device itself

L0: The device needs to be reliable (Measurable)

1. L1: the device should be tested and proven not to fail any of these parameters

L0: The device software needs to be well integrated (Observable)

1. L1: Displaying the sensor output as well as communication between the headset and the sensor device needs to be robust, perform well, and be easy for the user to interface with.

L0: Final device internals should be as miniaturized as possible (Neither)

1. L1: Having everything as tightly packed together will reduce waste, and making the sensors as small as possible without losing the needed accuracy helps with that greatly.

L0: Movement and Sensor data must be used to sell advertisements (Neither)

1. L1: To offset the manufacturing costs of the headset and the sensor device, the sensors should collect as much data as possible and sell it all to advertisers.

**HardWare Blocks**

1. **SOC:** Handles processing to and from the device. Handles timing and collecting data from the various measurement sensors.
2. **Motion Sensor:** Collects in real time the motion of the device on the user. This data is transmited to the SOC to be set off device
3. **Antena:** Handles comunication to and from the sensor device. Is told by the SOC what data to send out
4. **Heart Rate Sensor:** Collects the users heart rate and transmites it to the SOC.

**Software Blocks**

**Sensor Software**

1. **Connect to Headset:** This code module handles setting up and restoring connection to the headset wirelessly
2. **Task Scheduler:** Decides which task to run on the SOC, All measurements are being collected at the same time and the scheduler is needed to prevent 1 task from blocking other critical tasks from running. Scheduler runs and resumes the measurement tasks as needed unless it recieves a lost connection interrupt. If this is received the Scheduler starts the connect to headset task again.
3. **Measure Motion:** Requests data from the motion sensor, once this data has been recieved it sends it to the measurement queue
4. **Measure Heart Rate:** Requests data from the heart beat sensor, once this data has been recieved it sends it to the measurement queue
5. **Stored Measurement Queue:** Holds the data collected from the sensors until it is ready to be transmited
6. **Transmit Data:** This module pulls the next packet of data to send to the headset, formats it to be transmited, and then initilizes the antena to transmit the data over to the headset

**Headset Software**

1. **Connect to Sensors:** This code module handles setting up and restoring connection to the sensors wirelessly
2. **Wait for Measurements + Check Time:** Code polls for measurements, if a large period has passed without measurements the headset pings the sensor module. Otherwise the headset waits for measurements.
3. **Recieve Measurements:** Once the headset has begun recieving data from the sensors it collects it and stores it for processing. This module splits up the measurements into motion and heart rate and passes them along to their specific processing modules.
4. **Calculate Heart Rate:** Takes in the raw sensor data and computes what the users heart rate is in BPM at that instance.
5. **Extract Breathing Rate:** Takes in the raw motion data that was captured and processes it to pull out the motion through space data as well as the motion from movements like breathing. A fast fouier transform is done on this breathing motion data to pull out the frequency.
6. **Format and Average Measurements:** Code averages the breathing and heart rate with previous data collected from a small recently updated sampling pool to get a more stable measurement. This average data is then formated and stored.
7. **Update Display:** Finalized measurement data is send to the display and drawn in a HUD for the user.