element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Design For A Cause 2021
  • Challenges & Projects
  • Design Challenges
  • Design For A Cause 2021
  • More
  • Cancel
Design For A Cause 2021
Blog Vital Care - 06 Arduino IOT Cloud Integration
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: sunnyiut
  • Date Created: 28 May 2021 10:49 PM Date Created
  • Views 1442 views
  • Likes 5 likes
  • Comments 0 comments
  • arduino iot cloud
  • design for a cause 2021
  • nano 33 iot
  • vital care
Related
Recommended

Vital Care - 06 Arduino IOT Cloud Integration

sunnyiut
sunnyiut
28 May 2021

Title: Vital Care

By: Md. Kamrul Hussain

Project Category: Design Challenge

Project Name: Design For A Cause 2021

Blog post: 07

 

image

Previous Blogs:

Blog No.

Title

01

Introduction

02.a

SpO2 basics [PPG]

02.bSpO2 [MAX30102]
03Temperature
04ECG - AD8232
05Respiration

 

In this blog I'll share my experience of Integrating Arduino IOT Cloud in my project. Before that, I'll provide an update [modification] in the basic 'system model' of my project.

 

System Model:

The Vital Care is based on three modules providing four body parameters -

  • Plethysmograph -> SpO2
  • Single lead ECG -> Heart Rate
  • Temperature
  • Respiration

 

Modules -

Module01: Chest Strap --> ECG and Respiration

Module02: Wrist Band --> SpO2 and Body Temperature

Module03: IOT cloud dashboard or Android App

image

Previously,  the system model was like Module 01 will send the sensor data to Module 02 using BLE and then Module 02 will send all the data to Module 03 [Android or Cloud app] using WiFi. To do that, the NANO 33 IOT board of the Module 02 has to be operated in a mode where both BLE and WiFi exists simultaneously. Now, that needs some tricks. It is possible, but the WiFiNINA firmware of the board has to be modified. I could not get this option to be checked out. I'll do it later on.

Therefore, I modified the system model a little bit.

 

I am using MKR WiFi 1010 board in Module 01. This board is similar to NANO 33 IOT with the same processor and wireless chip from u-Blox.

So, according to my new plan both the Module 01 and Module 02 will send data to Cloud App using WiFi simultaneously.

I have used Arduino IOT Cloud where the dashboard can support multiple THINGS at a time but limited to 5 variables in the free version.

So, now I need two 'THINGS' assigned for Module 01 and Module 02.

Module 01 - Vital Care

Module 02 - Vital Care chest

 

Arduino IOT Cloud configuration

 

Create Things:

Two Things were created -

1. Vital Care - using NANO 33 IOT - with SpO2, PPG placement and Temperature variables to be displayed

2. Vital Care chest - using MKR WiFi 1010 - with ECG, Heart Rate, LEAD on/off and respiration variables to be displayed

 

image

 

Variables:

1. Vital Care -

 

{gallery} VitalCareThing

image

VitalCareThing Variables: 5 Variables are added - HeartRate, PlaceFinger [to detect whether PPG sensor position is ok or not], Respiratoin drived from PPG, SpO2 from MAX30102, Temperature from MAX30102. Only SpO2, PlaceFinger and Temperature are included in the final dashboard.

image

Variable - SpO2: defined as percentage variable with INT data type, Read only data fetched periodically at every 1 second

image

Variable - Temperature: defined as Float data type, Read only data fetched periodically at every 1 second

image

Variable - PlaceFinger: Boolean data type sends status whether finger is placed properly or the sensor is placed on wrist properly. Read only variable updates on value change.

 

 

2. Vital Care chest-

 

{gallery} VitalCareChest

image

VitalCareChest Variables: 3 Variables are added - HeartRate, ecgLEAD [to detect whether LEAD Electrodes are out], Respiratoin drived from ECG.

image

Variable - ecgLEAD: Boolean type to get the status of LEAD off detection. Read the value only when a LEAD off takes place.

image

Variable - HeartRate: Float type to read the heartRate from the processed ECG signal. Read the value only when a QRS complex is detected.

image

Variable - Respiration: Float type to read the Respiratory signal output from the filtered ECG signal. Read the value only when the R-peak value is changed to represent respiratory exhale / inhale.

 

 

Cloud Dashboard:

A dashboard was designed titled as 'Vital Care Cloud'

image

It contains six widgets -

  • SpO2 - Vital Care - Module01
  • Temperature 'C - Vital Care - Module01
  • PPG Placement - Vital Care - Module01
  • Hear Rate - Vital Care chest - Module02
  • ECG LEAD - Vital Care chest - Module02
  • Respiration - Vital Care chest - Module02

image

 

Output:

image

 

 

MQTT issues in NANO 33 IOT:

 

It has to be very straight forward using NANO 33 IOT board integrating with Arduino IOT Cloud. But actually I faced couple of issues regarding WiFi firmware and I2C communication with MAX30102.

At first the Nano 33 IOT board was unable to connect to the Arduino IOT Cloud through MQTT. Serial terminal printed -

 

ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to mqtts-sa.iot.arduino.cc:8883

ArduinoIoTCloudTCP::handle_ConnectMqttBroker 1 connection attempt at tick time 22591

 

I tried to update the onboard firmware using the stable version of Arduino IDE. But I found that it loads version 1.3.0 which is not supported for Arduino IOT Cloud. I had to use the BETA or hourly version of the IDE to update the WiFi firmware version 1.4.5.

 

But that was not the biggest issue. Even after updating the firmware I received errors -

ECCX08.begin() failed.

***** Arduino IoT Cloud - configuration info *****

Device ID:

Thing ID: cbb49fc3-c7f5-47cf-845b-2830320917a1

MQTT Broker: mqtts-sa.iot.arduino.cc:8883

  1. WiFi.status(): 0

Current WiFi Firmware: 1.4.5

The ECC608 Crypto authentication chip could not be initialized. It killed lots of my time and effort and eventually I found the MAX30102 module was creating the disturbance in the I2C line. I kept out the power pin Vin [3.3v] and that pulled down the SDA and SCK line voltage to 2.2v due to the pulled up resistors are populated both on the NANO33IOT and MAX30102 board. MAX30102 operates at 1.8v. Due to that, a voltage converter is placed to maintain the I2C communication with the host MCU operating at higher supply voltage.

  imageimage

Powering up the MAX30102 board properly during the MQTT initialization and putting appropriate delays solved the issue.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube