Posts

Showing posts from February, 2024

Iteration 3 | Jack | HRV

Image
Iteration 3 - HRV Relative to Breathing To kick off the third iteration of this project, we spent Monday's class implementing the new auto-calibration code block into our existing Micro:bit design. The Setup The setup was simple enough, and didn't change much from the previous iteration. It consisted of: A Micro:Bit v2 A Micro:Bit extension breakout board, housing the Micro:Bit A heart rate sensor, connected to the breakout board Our MakeCode codebase The Use of Local Display An important topic discussed during the class was just how valuable the use of a local display can be. When building a project, especially one like this, it makes life considerably easier when you can gauge things with a quick glance at the Micro: Bit's LED screen, rather than go into your browser, and load up MakeCode, and log in, and select the right project, and hook everything up, etc. etc. In this project, we use the basic 25-LED screen to: Indicate the Micro: bit is on, and the project loaded ont...

Week 3 HRV Iteration

Image
Iteration 3: For this week we went about improving the HRV sensor by making it easier to take readings of our heartrate. A large problem with the previous design was the constant changing of the range between the peaks of our values; one person's peaks and lows could be 800 and 500 on a certain spot on their finger while being 900 and 600 between another, making a change in the code necessary for the HRV to work. We were supplied with code which let us scale the peak values at will with the press of the A button, partially fixing the issue of the hassle involved in getting proper readings off of the HRV sensor. New Code: On start the HRV declares all of its variables and connects to the pulse sensor via pin P2 on our breadboards.   The forever loop turns a light on and off at the 2,2 coordinate at every heartbeat recorded, giving us a visual indication of if the HRV is properly calibrated with its peaks and valleys and remains unlit if uncalibrated.   The code for pressing but...

Week 3 Iteration - Hasan Berk

Image
    Big Heart SETU  19/02/2024 Week Three Iteration Reflection This weeks iteration consisted of semi-auto calibration of heart beat detection, in order to get a more accurate range for our HRV Values. One the pulse sensor was correctly aligned with a user's finger, button A was pressed on the Micro:bit to detect peaks, which was then auto-calibrated. In my own setup, this helped me get the most accurate reading to date. Setup The setup for the semi-auto calibration was the same as the previous iteration, with the only difference being the code. The setup consisted of: Micro:bit V2 Breakout Board 3.3-5V Pulse Sensor Code This is the code Jason provided us with for this weeks iteration: A quick breakdown : Contains a breathing pacer of 4 in - 6 out. Read and display bar graph of pulse on the local display  - very important When button A is pressed it stores the max and min values of heartbeat - for calibration Calculate the time between pulses in ms, delta_t ,also the...

Week Three Iteration - Eric Butler

Image
Iteration 3 Reflections During this week's iteration, we started to conduct different tests using the code base seen below. These kinds of tests included applying different pressures to the sensor to ensure better consistency, trying different sensors, and different fingers, and comparing wearing the sensor on your finger vs your wrist. We also had discussions which will be talked about below on many different factors such as:     > How can we improve the sensor?     > Getting the micro bit to interact with our breaths (Phase in and Phase out)     > Negative observations were noticed when carrying out the testing      In the code below we start but setting our variables, most notably setting the max and min pulse to read on P2 of the microbit. We also have a piece of code that will reset the calibration when the A button is pressed, this is to ensure that when a different person puts on the sensor it can calibrate to them rather than...

Emma Nolan Iteration 3

Image
                                                                                           HRV  Visualization  The graphical representation above corresponds to the code implementation provided below. In this visual depiction, the blue line signifies the Heart Rate Variability (HRV), capturing the variations in the time intervals between consecutive heartbeats. Meanwhile, the red line represents the Breath Pacer, which follows a specific breathing pattern characterized by a cycle of 4 seconds inhalation followed by 6 seconds exhalation. - The graph shows how my Heart Rate Variability (blue line) and Breath Pacer (red line) work together. It helps me understand how my body responds in real-time. The code and grap...

Iteration 3 Conor Gleeson

Image
Iteration 3  Improvments to this iteration This week we began with a new version of the code to test. This latest version included a display on the microbit showing th epulse rate of th user and helps the user apply the correct amount of pressure to the sensor and get their postioning correct. With this done they can then press the A button to calibrate the readings to the highest and lowest points in order to get an even HRV reading. The code now also includes a 4 second in 6 second out pacer on the serial output to help the user focus on their breathing. When everything is set up correctly and the pacer is being followed the HRV can be seen to come closer in phase to the breathing pacer showing the effect of breathing on HRV. Even if the two readings cannot be gotten into phase the user can see the HRV graph adjust as their breathing changes, as they slow it, speed up, yawn or talk. It was also clear that the pressure and positiong needed for a clear reading varied greatly from p...

Week 3 - Investigation of HRV Codebase

Image
 Week 3 - Investigation of HRV Codebase HRV with Pacer. HRV Peak and Low pulses. At the beginning of the Week 3 Iteration the group took a look at the HRV code base which includes the following features: - Manual peak detection on button A press. - Pacer graph alongside HRV measurement. - Delta_t : Time between pulses. - Local display using Micro: Bit LED Matrix. From using the lab testing that was done the following conclusions were made: - For Bio-Feedback the idea of attaching LED's to Balloons was proposed. - Pulse sensor is hard to get a good reading from but when it does it looks very good          This is because the sensor works ideally when the user is static because it is a Photoelectric type sensor.  Because of this issue i decided to take a closer look at the type of sensor the team is using along with the pros and cons.                Ref[1] Ref[1] From the research done on the Reflection type s...

Iteration 2 Emma Nolan

Image
  Breathing Pacer: When you press Button A on the micro:bit, the code runs a loop three times ( three cycles of a breathing exercise) Inhalation Phase: It plays a noise sound and displays a visual representation of a "breath" using LED lights. The LED lights create a pattern resembling a '#' symbol. It pauses for 500 milliseconds (half a second). Hold Breath Phase: It shows a small diamond icon on the micro:bit's LED matrix. Pauses for another 500 milliseconds. Exhalation Phase: It shows a diamond icon, creating a visual cue for exhaling. Pauses for 2 seconds (2000 milliseconds). Plays a square wave sound. Hold Breath Again Phase: Displays a small diamond icon. Pauses for another 2 seconds (2000 milliseconds). Rest Phase: Clears the LED matrix, giving a pause before the next cycle. Pauses for 4 seconds (4000 milliseconds). Overall Breathing Exercise: The entire sequence above repeats three times due to the outer loop. Audio Feedback: During inhalation and exhalati...

Iteration 2 Conor Gleeson

Image
HRV Monitor Iteration 2  This week we began the first implementation of a pulse sensor into the MicroBit to record a users heart rate and heart rate variability (HRV) The pulse sensor is connected to the MicroBit through a breakout board.  This allowed us to use a premade pulse monitor repository to modify to display the HRV This allows us to use the "delta_t" value to display the HRV written to the data display  The display shows the users heart rate and we can also see the HRV rising and falling in time with breathing.  One of the difficulties with this set up is the need for the if statement values to be adjusted depending on the user and even how hard they are pressing their finger to the pulse sensor. This value needs to be changed based on the values being output to have the if statement trigger correctly, the triggering of this if statement during operation was tested by toggling one of the LEDs in time with the if statement. One of the issues noticed during t...