Customer Problem
Our project will be designed to help University of Waterloo students who are subject to a surprise panic attack. According to the National College Health Assessment in Spring 2019, 16.8% of University of Waterloo students had been diagnosed or treated by a professional for an anxiety disorder in the previous 12 months, and 64.5% of them had felt overwhelming anxiety in the previous 12 months [1]. In a sample conducted by The Journal of Nervous and Mental Disease, 39.4% of patients with generalized anxiety disorder had experienced an unexpected panic attack before [2]. Waterloo’s student body in Fall 2022 was 42,000 students [3]. By applying generalized anxiety disorder to 16.8% of the student body, we can predict that about 2,780 students will experience a surprise panic attack.
Surprise panic attacks are a problem faced by many University of Waterloo students, especially those who have a history with anxiety. According to Anxiety Canada, “a panic attack is a sudden surge of intense fear or discomfort that comes on fast, reaches a peak within minutes,” and includes at least four of several symptoms, including heart palpitations, sweating, and a fear of going crazy or dying [4]. Panic attacks are very unenjoyable, and a person going through a panic attack will be unable to think and function properly, which can create a dangerous situation for the person and the people around them. Additionally, a panic attack may result in the victim feeling extremely tired afterward [5]. If the problem of panic attacks is solved, people who are subject to surprise anxiety attacks will have to worry less about a sudden panic attack complicating their lives, improving their quality of life.
Our project attempts to dampen the effects of panic attacks with two approaches: early detection and mitigation. Based on changes in the user’s body and behaviour, we will try to detect panic attacks up to one hour before they happen. When the panic attack itself starts, we will create an environment that soothes the user, allowing them to feel safe and in control.
Stakeholders:
- The graduate TA student: as a fellow UWaterloo student, the TA could also be positively affected by the project. The main concern of the TA is that the project adheres to the requirements and guidelines outlined by the ECE 198 course. Our responsibility to the TA is to attend all meetings and submit all deliverables.
- University of Waterloo student body: the main customer of the project, including all part-time and full-time undergraduate and graduate students. The primary goal of the students is to have a successful academic career, and therefore our project should help them with that. By improving their mental health and response to panic attacks, we are helping students academically.
- University of Waterloo: the university must approve the device. In order to do so, it needs to make sure that the device is beneficial towards the students and the general function of the university. As the device is designed to benefit students directly, there should be no problem getting the device approved as long as its quality is high enough.
- Suppliers: the project will be built using STM32 boards and hardware, and therefore the suppliers to the client will be the parts suppliers for all the hardware that we use. Their main concern, to profit from their products, should be satisfied as the product will use purchased parts. It is acceptable to mostly ignore the suppliers’ role as a stakeholder since they are just a static vendor for the project parts.
- The public: With a growing concern for mental health propagating throughout the world, the public should respond positively to our project’s vision. The public should not have any major concerns about the device, as long as the project continues to improve people’s lives
- The government: In Canada, a license is required to sell a medical device. Any company that wishes to sell a medical device must have a Medical Device Establishment License. Furthermore, if a device is deemed risky enough to be a Class II, III, or IV device, then the device specifically must also have a Medical Device License [6]. If we were to begin selling or distributing the device, we would have to consider government regulations.
Initial Requirements
Functional Requirements:
- The design is expected to be able to detect imminent panic attacks and feelings of overwhelm based on the changes shown in the user’s heart rate before the panic attack [7].
- A LCD screen of the design is expected to display one of 25 randomized inspirational messages that are intended to calm the user and alleviate their anxiety during a panic attack.
- The design is expected to offer the user calming music to promote relaxation and aid the user in regulating their breathing through the 4-7-8 breathing technique (inhaling for 4 seconds, holding for 7 seconds, exhaling for 8 seconds), which is proven to aid in recovering from panic attacks [8].
- The design is expected to have a soft blue light that calms the user and promotes positive emotions of relaxation and happiness [9].
Technical Requirements:
- The speaker must output sound that is both audible and interpretable to humans. Must create at least a minimum pressure of 20 micropascals (0db) at the ear [20]
- The design must have the ability to read heart rates ranging from 50 to 200 bpm [7].
- The LCD screen must be capable of displaying text with a minimum of 30 characters.
- The SD card must have a storage capacity of greater than 38.4 MB to enable the audio file to be transmitted to the speakers. The MCU will interact with the SD card through the STM32 FATFS (FAT File System) API
- The wiring must be longer than 5m to ensure it can effectively connect to the microcontroller on the wall.
- Must use the Microsoft WAVE standard to store uncompressed audio [10].
- Must use the STM32 DSP library [21] to execute Fourier Analysis which will allow us to determine the heart rate and breathing rate.
Safety Requirements:
- The design must not consume, transfer, discharge, or otherwise expend more than 30W of power at any point in time and within any component of the design during its operation.
- The design must not store or otherwise contain more than 500mJ of energy at any point in time.
Principles
1. Heart rate → Scientific principle
A normal resting heart rate is from 60 to 100 beats per minute (bpm) [11]. During exercise and during activations of the sympathetic nervous system (colloquially known as the fight-or-flight response), the heart rate will further approach one’s maximum heart rate. According to A. E. Meuret et al [14], Heart rate briefly peaks 40-50 minutes before the panic attack, drops back down to normal, and gradually increases until the panic attack occurs. We can use this information in order to predict a panic attack before it occurs and warn the user of it.

(Left is before and during a panic attack, right is regular rate with no panic attack)
2. Breathing rate → Scientific principle