Iteration 5 -- Brainstorm and Lock-in -- Conor Gleeson

 Iteration 5 Brainstorm and Lock-in

  

The Brainstorm

As the end of the semseter approached we made plans for a "lock-in" this was where at the end of the semester after all of our other projects and assignments were finished and before our exams started where we would set aside time to focus only on the  HRV project. We set a date for the 7th and 8th of May where we would all come together so work on the project and get it all the parts we'd worked on so far put together into one package. 

We began with a brainstorm a few weeks before the lock-in would take place. This brainstorm had several parts to it. One was to come up with ideas for how we could include biofeedback to the user as to the state of their HRV. The other was to divy up the work into who would work on which parts of the projects. 


This was the final result of the brainstorm. Here we had laid out what we knew about our design pattern for sending and reciving data wirelessly which we had been working on for the semseter. We decided on two versions of biofeedback for the lock-in. One would be based on a wave-machine, we came accross videos of a wave machine on Youtube and decided that by changing the ferequency and intenssity of the waves could be used to show the current status of a users HRV. 

https://youtu.be/WVzH6fd3bjI?si=ntUZehjcu10ZmIpO

Here is an example of a wave machine, it is made by mixing coloured water and some kind of oil to give a satisfying and mesmerising effect.

The other biofeedback option was for a teddy bear.  The idea was for the teddy to "breath" using a motor to follow the useres HRV and give feedback on its current state. The teddy would breath faster or slower based on the current situation of the users HRV. The teddy we decided to go with was an otter (cute 'lil guy) that already had had breathing functionality built in.

https://image.smythstoys.com/zoom/175826_1.webp 

We then broke down the tasks that needed to be done and devied up the groups to work on the two versions. I would be working on the teddy. 

The Lock-in

With the plan made we could get started on our two day lock-in. Our first port of call was to make sure we could control the motor from the teddy with our Microbits. With the motor removed from the teddy we could then connect it up to a Mircrobit breakout board that would allow us to control the motor, along with a simple bit of code we could get the motor moving using inputs from the Microbit.


 https://youtu.be/aKuaCDnbW2I

With the basic movement down we could begin looking towards the HRV side of things. Adam had been busy 3D printing a selection of options to hold the pulse sensor to the users finger including, a ring, a wristband and a clamp to go on the tip of the finger. In the end we chose the clamp as it gave the most consistent results and was the most simple to use. 
 
Now with a finalised way of getting the HRV results I began working on getting the HRV sensor to our MQTT server so we could view the results on our phones, and then send it to the teddy so it could respond to changes in the values. This involved combing our existing code for monitoring HRV and the code that we had used for the MQTT devlopment that origninally sent the roll value of the Microbit to the MQTT server and app. 
 
The HRV logic remained unchanged with the useful feature for calibrating the max and min of the heart rate that was devised earlier. 

Here is the output from the HRV monitoring Microbit with the users heart rate displayed at the bottom and the HRV displayed at the top which is rising and falling in time with the users breathing.

Then I added in the Roll sending code that we had been using before and with some minor changes to the values it output it would now send out the HRV values to the server instead of the roll. With this done we could now view the HRV values in our MQTT apps and begin working on sending these values from the server to the teddy Microbit. 
 
Here is an example of the output to our MQTT app. In the input tab which is taking the messages sent from the HRV Microbit the HRV values can be seen next to "i1" which is out Microbit. These are fist sent to our Microbit cloud boatd before going to the server. 
 
 Next we moved to getting the HRV values to the teddy. This was done by modifying the server code to now send out the HRV values after recieving them over radio and then use our already developed code to recieve these on the teddy Microbit. 

Emma and Eric added the code to the teddy bear to use the recived values to control the motor of the teddy. We decided on a series of range of values for the HRV to control the motor. Run the motor at a slow speed to show a good HRV value and run the motor faster and faster as the users HRV got to a worse range. This was activated by pressing the "A" button on the Microbit. By pressing the "B" button the teddy enters a "pacer" mode, this was based off of our first motor code, this mode allows the user to follow a square breating techinique.
 
 
This helps the user to slow their heart rate and relax thus improving their HRV.  This took some work with the speed of the motor and the pauses in betweent o get it into a good square breating rythm. 

Here is a video of our project in action 


https://youtu.be/rTVNX7Sjkco


Conclusion

 


Comments

Popular posts from this blog

Blog 2 - HRV Demo

Week 1: HRV Review

Blog 5 - FFT & HRV