Heart Rate & Environmental BLE Wearable using STM32WB5MMG
Perform heart rate tracking and environmental sensing in real-time over BLE. Based on a STM32WB5MMG with data synchronised to a smart app.
As the Elektor project page does not allow embedded pictures, please see my document here for better readability. Thank you!
https://docs.google.com/document/d/1HeZh1p6H5J0EIEbztn-TaEm5Mn0s-Pnj3tXLUutz8as/
-----------------
Introduction
My project is a Heart Rate & Environmental wearable sensor kit based on STM32 BLE. Heart rate detection is important for real-time medical and healthcare tracking. Any anomalies can be detected and analysed before any serious symptoms develop. I will first create a prototype using the STM32WB5MM-DK and an additional MAX30102. Firstly I will share the experiment with the STM32WB5MM and its low-power BLE capabilities. The BLE communication will allow data to be synchronised to a smart app. Subsequently, I created a first revision of an integrated and wearable PCB after the prototype stage.
[See Figure 1]
Writeup
First let us identify the useful cases on the STM32WB5MM-DK. The schematic for the Discovery board is provided here by STMicro:
A summary of the technical specs are as follows:
[See Figure 2]
For the program, STM32duino is a quick way to get started using Arduino language. It can be installed in the board manager.
[See Figure 3]
We can also prototype with BLE support using the library STM32duinoBLE.
[See Figure 4]
The OLED display is also compatible with SSD1306 driver from the U8g2 library.
[See Figure 5]
The functions of the code are shown in the following figures:
1. The system is able to detect body temperature using the environmental sensor, and emergency situations using body acceleration. The data is updated live on the OLED display for easy debugging.
[See Figure 6]
2. In addition I added an external MAX30102 module for heart rate monitoring.
[See Figure 7]
3. I am able to visualize the heartbeat pattern over the serial plotter.
[See Figure 8]
The code for the Discovery board is published on my Github:
Moving forward, the prototype has proven to be promising, so I decided to create the following integrated PCB. Here is the 3D rendering of the circuit board.
[See Figure 9]
The PCB consists of the following components:
[See Figure 10 & Figure 11]
The external MAX30102 module is soldered using wires.
[See Figure 12]
The next step is to integrate Bluetooth LE interface for wireless communication.
⇒ The program was made to have interoperability with the Nordic UART BLE service which has become a de-facto standard. The advantage of this is that it is also compatible with the Adafruit Bluefruit Connect mobile app.
In the below figures, the STM32 Kit is being detected and I am able to visualize my heart rate in real-time wirelessly.
[See Figure 13A, 13B, 13C]
Although this integrated PCB is small, there is still more room for further miniaturization, which can be explored in a future project.
[See Figure 14]
The final code is published at this link:
Thank you for reading my article and I hope to hear of your comments.
https://docs.google.com/document/d/1HeZh1p6H5J0EIEbztn-TaEm5Mn0s-Pnj3tXLUutz8as/
-----------------
Introduction
My project is a Heart Rate & Environmental wearable sensor kit based on STM32 BLE. Heart rate detection is important for real-time medical and healthcare tracking. Any anomalies can be detected and analysed before any serious symptoms develop. I will first create a prototype using the STM32WB5MM-DK and an additional MAX30102. Firstly I will share the experiment with the STM32WB5MM and its low-power BLE capabilities. The BLE communication will allow data to be synchronised to a smart app. Subsequently, I created a first revision of an integrated and wearable PCB after the prototype stage.
[See Figure 1]
Writeup
First let us identify the useful cases on the STM32WB5MM-DK. The schematic for the Discovery board is provided here by STMicro:
- https://www.st.com/resource/en/schematic_pack/mb1292-wb5mm-b01_schematic.pdfFrom the schematic, I have identified the following devices of interest to the wearable device. An accelerometer to monitor the user’s orientation, and it can detect emergency situations such as a person falling down, or staying motionless and unconscious for long periods of time. It can also monitor environmental conditions such as temperature. Lastly there is an OLED screen for possible application of a smartwatch
A summary of the technical specs are as follows:
[See Figure 2]
For the program, STM32duino is a quick way to get started using Arduino language. It can be installed in the board manager.
[See Figure 3]
We can also prototype with BLE support using the library STM32duinoBLE.
[See Figure 4]
The OLED display is also compatible with SSD1306 driver from the U8g2 library.
[See Figure 5]
The functions of the code are shown in the following figures:
1. The system is able to detect body temperature using the environmental sensor, and emergency situations using body acceleration. The data is updated live on the OLED display for easy debugging.
[See Figure 6]
2. In addition I added an external MAX30102 module for heart rate monitoring.
[See Figure 7]
3. I am able to visualize the heartbeat pattern over the serial plotter.
[See Figure 8]
The code for the Discovery board is published on my Github:
Moving forward, the prototype has proven to be promising, so I decided to create the following integrated PCB. Here is the 3D rendering of the circuit board.
[See Figure 9]
The PCB consists of the following components:
- STM32WB5MMG (ultra-low-power and small form factor certified wireless module)
- ASM330 (6-axis IMU with embedded ML operation)
- HTU21D (digital sensor for relative humidity and temperature)
- VEML7700 (transparent package ambient light sensor)The schematic is also open source on my GitHub repo at this link:
- https://github.com/zst123/elektor_wearable_2024/blob/main/sensornode/stm32wb5mmg-sensor-node-Schematic.pdf In addition, the USB-C connector allows for easy plug-and-play programming using STM32 DFU mode. This is the PCB after soldering the on-board components.
[See Figure 10 & Figure 11]
The external MAX30102 module is soldered using wires.
[See Figure 12]
The next step is to integrate Bluetooth LE interface for wireless communication.
⇒ The program was made to have interoperability with the Nordic UART BLE service which has become a de-facto standard. The advantage of this is that it is also compatible with the Adafruit Bluefruit Connect mobile app.
In the below figures, the STM32 Kit is being detected and I am able to visualize my heart rate in real-time wirelessly.
[See Figure 13A, 13B, 13C]
Although this integrated PCB is small, there is still more room for further miniaturization, which can be explored in a future project.
[See Figure 14]
The final code is published at this link:
Thank you for reading my article and I hope to hear of your comments.
Updates van de auteur