Lock-In Final Iteration
Lock-In Final Iteration
Dominik Martynski 20094523
Before the lock-in itself, as a team we brainstormed the specifics of said lock-in, so that everyone knew what team they were on, what functionality to work on and a general breakdown of all the features we hoped to get working during it.
We worked on three pieces of hardware, the wearable (what you put on your finger), a wave machine (the main visualizer for your heartbeat) and a teddy bear whose belly moves up and down imitating a breathing motion using the HRV.
One of the main ideas we came up with for the project was that of a wave machine that would visualise the HRV using a bottle being lifted up and down using a motor linked to the HRV values, mostly based off of the Hughes Wave Motion machine we were shown in class as inspiration. The rocking and intensity of the waves was determined by the HRV, but instead of a massive tank of liquid we opted for a more realistic water bottle filled with food colouring and baby oil, as it had a good density and visual aspect for what we were going for.
https://www.youtube.com/watch?v=UveQ75XMya8
I was assigned to work on the wearable artifact pictured below, but I was only able to attend for the final day of the lockdown as I got conflicting information about the lock-in date, showing up on the 8th of March assuming it was the first day of the lock-in.
Because the wearable was already 3d printed the day before (shown below), I instead went on to help on the wave machine team, prototyping the 2nd iteration of it. Before moving on I will write a bit about the wearable itself. It uses a clip design that you put on your finger with the HRV sensor slotting into the bottom, comfortably resting against your skin not too soft and not too hard, which was the main issue of using the sensor by itself. The wearable also adheres to something you would see in a real hospital, slotting on the tip of your finger.
The first prototype was a great proof of concept and functional, with a proto pulley system, a motor attached to a fishing wire which pulled the bottle of liquid up and down based on the data it received. One of the design aspects that isn't visual that was improved on the final prototype was that of the pulley system, with Adam 3d printing three pulleys whose design was found on thingiverse making it so that the motor could comfortably lift the bottle up and down without breaking, as the pulleys took most of the bottle's weight. The line we used was upgraded from a fishing hook to a string we bought in Tesco. The supports for the bottle and the rest of the build took the form of screws and bolts we attached to the folder, making sure the bottle didn't fall out of place during motion, whilst also lying mostly perpendicular to the folder the prototype was built onto.
The motor itself had to accomodate for a 180 spin whilst also fitting into the prototype and connecting to a microbit, as the motor's function was to interpret the HRV data and spin accordingly. A servo mount was 3d printed shown below, letting us slot the motor onto the build.
A logo in the shape of a heart with a heartbeat was 3d printed for visual flair as we moved onto integrating the prototype with IFTTT and MQTT. Our team mostly changed the code relating to servo control as that was the main thing interacting with our prototype, with both teams working on code for the wearable and the cloud board, mostly the cloud board, as that was the main way for data from the HRV to communicate with IFTTT and MQTT.
THE WEARABLE
The main code we altered that pertained to the wearable was the measuring of the HRV, more specifically the calibration aspect of it. Towards the end of the lock-in Jason gave us code he was working on which included improved calibration, letting us get better HRV values more consistently without the risk of the sensor data going under/over the thresholds that used to be hardcoded into the project. The code is linked below.
https://makecode.microbit.org/S41300-61778-87747-59619
THE CLOUDBOARD
The cloudboard code was mostly unchanged during the project by my team atleast, from what I can remember, with the other team working on it far more, but I will link what I remember to be the latest implementation of it below. I have gone over certain details of this code before but the main gist of it is, the cloud board serves as the main method of communication between the microbits who have the HRV sensor on them. A radio group is set up, through which the microbits send and receive data to and from the cloudboard. The cloudboard itself hooks up to an MQTT broker and an IFTTT broker, parsing and sending the data it has received from the HRVs. The cloudboard also receives data from MQTT and IFTTT, sending that data back to the microbits, with the microbits printing their respective values received, showing off the infrastructure we have developed.
https://makecode.microbit.org/S52204-05448-45653-23574
THE SERVO MOTOR
The code pertaining to the servo motor was changed to better accompany the changing HRV, with different values corresponding to different angles that the motor would turn at, shown and linked below.
https://makecode.microbit.org/S30033-60774-44432-88231
CONCLUSION
For the lock-in, since my main job was that of creating the wearable, and that task was completed by the time I arrived, I instead helped out with everything in minor ways, mostly during the building and testing processes, handling of the water bottle the pulley design, testing the code, working with the wearable. Me not being able to attend the first day of the lock-in is also a contributing factor to this, but regardless, I think that over the course of the blog entries I have shown my clear understanding of the architecture and function of the project.
I want to thank the entire class, Jason, Adam, Hasan, Eric, Conor, Emma and Jack for making this module an enjoyable experience and the project work feel like a breeze. I think I learned a lot from this class, mainly to do with IFTTT and more indepth MQTT, while also getting used to the constant trial and error state of IoT where a project will just work/stop working out of nowhere. This class felt like a break from the constant stress of the other modules, while also feeling like really good practice for working in the field of IoT in the future.
Comments
Post a Comment