How to Create a Remote Medical Sensing System Using Maxim Integrated’s IoT Development Platform

Abstract

Maxim Integrated’s IoT Health Monitoring System is a rapid prototyping platform that enables quick and easy integration of the MAX11301WING, MAX30003WING, MAX30101WING, MAX30205EVSYS, and MAX32630FTHR boards. The FeatherWing® form factor simplifies integration to enable a plug-and-play functionality of the individual boards. This tutorial demonstrates how to integrate the sensor modules with each other using Maxim Integrated developed firmware libraries and example programs. At the end of this tutorial, a fully functional remote medical sensing system is realized that can display measured data around the world.

Introduction

Maxim Integrated brings the convenience of remote health monitoring to your fingertips. The modular architecture allows for a variety of systems to be assembled quickly and easily within a couple of minutes. The system flexibility stems from the FeatherWing® form factor that provides a plug-and-play interface by adding or removing desired sensors, enabling or disabling a particular sensor, and the frequency data transmission to an online dashboard. The system is built on a Maxim Integrated low-power microcontroller to ensure minimum power consumption for designs on the go.

Overview of connections with two FeatherWings

Figure 1. Overview of connections with two FeatherWings.

Overview of connections with three FeatherWings and temperature sensor

Figure 2. Overview of connections with three FeatherWings and temperature sensor.

Requirements

  • MAX32630FTHR board
  • MAX11301WING board
  • MAX30003WING board
  • MAX30101WING board
  • MAX30205EVSYS board
  • Any mbed® programmer, MAX32625PICO is recommended
  • Two micro-USB cables
  • 10-pin ribbon cable
  • 10-pin flex cable
  • FeatherWing Tripler (alternately, jumper cables can be used)
  • Computer with at least two USB ports and an Internet connection (not included in the kit)
  • Bluetooth and Internet enabled Android device (not included in the kit)
  • IoT Health Monitor Android app
  • A serial port terminal program like Tera Term: https://osdn.net/projects/ttssh2/releases/

Hardware Assembly

  1. Connect the MAX32625PICO to the MAX32630FTHR using the 10-pin ribbon cable. The 10-pin header on both boards has a mating groove to connect it in the proper orientation.
  2. Connect and mount all the boards on the FeatherWing Tripler as shown in Figure 2. The boards can be rearranged as convenient. Ensure to align the pins exactly on the headers.
  3. Connect the MAX32630FTHR and the MAX32625PICO, in order, to a computer using the micro USB cables provided.

Software Configuration & Demo

  1. Download and install a serial port terminal program such as Tera Term. It can be downloaded from here: https://osdn.net/projects/ttssh2/releases/
  2. In a browser, go to https://os.mbed.com/ and log in or sign up for a new account.
  3. After signing in, navigate to the MAX32630FTHR mbed landing page by clicking (or typing) the following link: https://os.mbed.com/platforms/MAX32630FTHR/. From the right sidebar, click the Add to your mbed compiler button as shown in Figure 3, to add the MAX32630FTHR as a target microcontroller board to the online compiler.
  4. The MAX32630FTHR mbed landing page

    Figure 3. The MAX32630FTHR mbed landing page.

  5. On the same page, follow the instructions in the PC Configuration section to install the Windows® OS driver for mbed microcontrollers. See Figure 4.
  6. PC Configuration; Windows drivers.

    Figure 4. PC Configuration; Windows drivers.

  7. In a browser, go to the following link and click the Import to Compiler button as shown in Figure 5. https://os.mbed.com/teams/MaximIntegrated/code/MAX_IOT_KIT/
  8. Import program into mbed compiler.

    Figure 5. Import program into mbed compiler.

  9. This opens the mbed compiler in a new window. When this window opens, click Import to import the program as shown in Figure 6.
  10. Import program into mbed compiler

    Figure 6. Import program.

  11. In the upper right corner, confirm the MAX32630FTHR is selected as a target platform. If the MAX32630FTHR is not selected, click on the currently selected platform and change it to MAX32630FTHR. See Figure 7.
  12. Select the target platform

    Figure 7. Select the target platform.

  13. Make sure MAX_IoT_KIT is selected in the Program Workspace (or the relevant name if it has been changed). Click the Compile button in the command banner as shown in Figure 8. Once the program is compiled, it initiates a download of the binary file (e.g.: MAX_IoT_KIT.MAX32630FTHR.bin).
  14. Compile the program

    Figure 8. Compile the program.

  15. Run the Tera Term program. Select the Serial Radio button and then select the COM port from the drop-down menu. The mbed device could be on a different COM port number than the one shown in Figure 9.
  16. On Windows 10, the COM port is named as USB Serial Device when using natively installed drivers. On earlier versions of Windows, it is named as mbed Serial port if you have installed ARM® drivers as mentioned earlier.
  17. Tera Term – Open serial port

    Figure 9. Tera Term – Open serial port.

  18. In the File Explorer, look for DAPLINK drive as shown in Figure 10. The MAX32625PICO board appears as a USB drive once connected to the computer. Drag-n-Drop (copy-paste) the downloaded binary file onto the DAPLINK drive. Notice the red LED flash on the MAX32625PICO for few seconds while the MAX32630FTHR is being programmed.
  19. DAPLINK USB drive

    Figure 10. DAPLINK USB drive.

  20. Press the RESET(SW1) button on the MAX32630FTHR as shown in Figure 11. This runs the application and starts streaming data to the Tera Term terminal. See the example data in Figure 12.
  21. Reset button on MAX32630FTHR

    Figure 11. Reset button on MAX32630FTHR.

    Tera Term sample output

    Figure 12. Tera Term sample output.

  22. Open the IoT Health Monitor app, turn on Bluetooth and connect to Maxim HMS from a list of available devices. See Figure 13.
  23. Connect to Maxim HMS from IoT Health Monitor app

    Figure 13. Connect to Maxim HMS from IoT Health Monitor app.

  24. In the app, tap on the ID which opens a drop-down list of all the available sensors as in Figure 14. See Table 1 below that maps the Sensor Name to the Characteristic UUID (first eight digits) and the Board.
  25. List of sensors.

    Figure 14. List of sensors.

    Table 1: List of Characteristic UUID, Sensor Name and Board.
    Characteristic UUID Sensor Name Board
    00001522 Push Button MAX32630FTHR
    00001523 LED MAX32630FTHR
    00001524 BPM MAX30003WING
    00001525 Heart Rate MAX30101WING
    00001526 SPO2 MAX30003WING
    00001527 ADC Voltage MAX11301WING
    00001528 Temperature MAX30205EVSYS
  26. A one-time connection to Adafruit IO is required after every Bluetooth connection to send sensor data for remote visibility. Adafruit IO is a platform to stream, log and interact with the data.
  27. In a browser, go to https://io.adafruit.com and sign in or sign up for a new account. Click on Adafruit IO Key in the top right corner. See Figure 15.
  28. View Adafruit IO Key

    Figure 15. View Adafruit IO Key.

  29. In the app, tap on menu, then tap Cloud Connect and enter your username as you see on YOUR Adafruit IO KEY window on the website. See Figure 16.
  30. Make sure you are connected to the internet from the Android device.
  31. Tap on the QR code icon to scan the QR code from the website. This syncs the IO Key between the app and the website.
  32. Tap on Connect, then tap on Close.
  33. Connect to Adafruit IO account

    Figure 16. Connect to Adafruit IO account.

  34. To read a sensor value, tap on a sensor name, make sure it has READ under Properties, then tap on the Read button to read the current sensor value.
  35. Any sensor with NOTIFY under Properties can be subscribed and connected to Adafruit. Tap on the Subscribe button to enable notification from the sensor at the specified rate, in seconds, from the config.h file. See the section Modifying the Firmware Parameters below for details. Tap on Attach to send the notifications from the app to the Adafruit IO platform periodically. Note: Feed Name can only be changed from the Adafruit website after the senor has been connected.
  36. To connect additional sensors, tap on the sensor name to open it and repeat the procedure.
  37. On your Adafruit account, go to Feeds under the Default group. All the Feeds that were attached/connected from the app are available as shown in Figure 17.

    Adafruit IO Feeds page

    Figure 17. Adafruit IO Feeds page.

  38. Optionally, a dashboard can be created for a visual representation of the feeds. A sample dashboard is shown in Figure 18.

    Check out the Adafruit tutorial on Dashboards here: https://learn.adafruit.com/adafruit-io-basics-dashboards/overview.

    Adafruit IO sample dashboard

    Figure 18. Adafruit IO sample dashboard.


This completes the setup and demo of the MAXIoTKIT. The next section provides instructions on modifying the firmware for this example. Modify the example or create your own applications using the IoT HMS. Maxim Integrated has several Wing evaluation boards to enable the rapid development of entire systems. Check Maxim Integrated Feather and Wing solutions for your next project!

Modifying the Firmware

There are a few simple modifications possible to the firmware using the 'config.h' file located at the root of your project. See Figure 19<. It can be accessed from the Program Workspace on the mbed OS compiler. This file only contains defines in the format #define NAME VALUE. The user should only change the values that currently exist.

After making any change, it is necessary to compile, and re-program the MAX32630FTHR board to bring changes into effect.

Locating the config file

Figure 19. Locating the config file.

  1. Modifying the Bluetooth broadcast name

    Change the text value in the quotes next to the name MAXIM_PLATFORM_NAME. For example:

    Default: #define MAXIM_PLATFORM_NAME "Maxim HMS"

    Modified: #define MAXIM_PLATFORM_NAME "Health Monitor"

  2. Modifying the BLE notification time

    Change the numeric value next to the corresponding Wing board name. The BLE notification time-related defines are suffixed with _BLE_NOTIFY_PERIOD_SEC. The time must be specified in seconds. The below example is shown for the MAX30205 wing.

    Default: #define MAX30205_BLE_NOTIFY_PERIOD_SEC 15

    Modified: #define MAX30205_BLE_NOTIFY_PERIOD_SEC 20

  3. Excluding a Wing board

    If one or more Wing boards are unused, they can be excluded from being compiled with the firmware by adding two forward slashes "//" before the #define for the library and the BLE notification time.

    Default:

    #define LIB_MAX30205

    #define MAX30205_BLE_NOTIFY_PERIOD_SEC 15

    Modified:

    // #define LIB_MAX30205

    // #define MAX30205_BLE_NOTIFY_PERIOD_SEC 15