Hello!
Its been 3 weeks since my last blog, 2 reasons contributed to the delay mainly -
- I got infected with the Coronavirus
- My challenger's kit got delayed by a couple of weeks
Anyway, I am fine and well now ready for the next challenge. I have also received the Arduino Nano 33 IOT kit and it looks great I am telling you -
This board has a lot of features and packs a lot of power -
- The board's main processor is a low-power Arm
Cortex
-M0 32-bit SAMD21.
- WiFi 2.4G and Bluetooth
connectivity is provided by the U-Blox NINA-W102 low-power chipset.
- The WiFi / BT module antenna is made in the form of a metal fitting, protected from anti-vibration by a drop of thermal glue.
- Microchip
ATECC608A crypto chip ensures secure communication
- 6 axis IMU LSM6DS3
The Arduino libraries required to run this board's onboard peripherals are -
- Arduino SAMD boards
- Arduino_LSM6DS3 or sparkfun LSM6DS3 Breakout (for advanced usage)
- Arduino WifiNINA
There are a few things about this board that need to be known before using this board, they are mentioned here.
In this blog, we will try to interface the MAX30102 sensor and the onboard LSM6DS3 with the Arduino Nano 33 IOT and use it's wifi to send the data the captured data to the Arduino IOT cloud.
The MAX30102 is also a Microchip based sensor module, that is an upgrade to the MAX30100 sensor used to measure the pulse and blood oxygen levels of a person. It uses a concept called PhotoPlethysmography to measure vital stats. We will try measuring an additional parameter - HRV or Heart rate variability. I have used both the sensors before and according to me, the MAX30100 library performed better in SPO2 measurement but missed out on heartbeats, while the MAX30102 library performed better in HR measurement and sucked at SPO2 measurement, giving me readings like 20, 40, and even 120. The problem with the MAX30100 was that it was not fast enough to capture more than 30-40 beats per minute. Hence it showed no change even after exercising. The problem with MAX30102 was that the formula and method used to calculate SPO2 levels is erroneous. There are many ways and room for improvement here, especially since the MAX30102 should perform much better than the MAX30100 if you compare the hardware capabilities of the 2 sensors. The MAX30102 has a green LED as well which can help in increasing the measurement accuracy. Here is an instructable that applies mean centering and baseline leveling to improve the MAX30102 performance.
The second problem was with the Arduino IOT cloud. For some reason, I just could not make it past step 3 of configuration. Then I updated the Wifi firmware to the latest version and Voila! it worked!! (Though I am not sure it was updating the wifi firmware that caused things to work out). Excluding the not working part, the process of the configuration itself is quite simple and automated. You will have to download the Arduino Create Agent first, though.
The wizard automatically detects the arduino nano 33 IOT and the configuration is automated as well.
Once done, you can add a few variables like Heart Beat and SPO2 and then configure the network with your wifi credentials.
Then you can proceed to add the remaining sketch. All steps are explained in detail here. However, I couldn't get anything on the Serial monitor directly and I feel it will still take some time to interface the first sensor with the cloud. I will continue in the next blog, this much content seems enough for a single blog and we don't want to make things unnecessarily lengthy :-)