Blog 2 - HRV Demo

Lab 2 - Simple Heartrate Sensor Demo

For the second lab, our task was to explore the capabilities of the Micro-Bit platform by connecting an external sensor to the microcontroller through its' GPIO pins. Readings were aquired through a simple serial read script created in Microsoft Makecode.

In this case, the external sensor measures heart rate / pulse by shining a bright green LED light into skin tissue and measuring the light reflected back. As the heart circulates blood around the body, a small variation in pressure occurs within blood vessels, arteries and capillaries. This pressure variation can absorb more or less light at various stages of the heartbeat and is the primary mechanism of the HRV sensor. By detecting fluctuations in light reflected back from the body, it is possible to get an acurate reading on our heartbeat. A similar mechanism of measuring bloodflow is used in other 'smart' technology such as smart watches, fitness bracelets and even in professional medical equiptment.

This script is essentially an infinite while loop that polls the microcontroller for updates on the GPIO pin P0 and outputs the data via the microbit's serial interface.


An intermediary 'mapping' step was made in this example in order to convert raw data from the sensor (values ranging; 0 - 1024) into a more conventional value range (0 - 255). This makes the data more straightforward to process and parse in later prototypes as the upper limit: 255 commonly used in digital systems.


In conclusion, this experiment demonstrates how simple it is to aquire detailed heartrate data with the Micro Bit platform. The next step is to send this data to a different source in order to make it available anywhere in the world (as long as there is internet of course!)

Comments

Popular posts from this blog

Iteration 2 | Jack | HRV Micro:bit Research

Iteration 5.2 | Lock In | Jack

Week 1: HRV Review