How to Interface the MAX30003WING ECG AFE with the MAX32630FTHR

Abstract

This quick start guide explains how to set up the MAX30003WING to interface with the MAX32630FTHR to run example demo programs.

Introduction

The MAX30003WING is a rapid development prototyping board designed for quick integration with other Maxim Feather and Wing evaluation boards. The MAX30003 ECG analog front-end (AFE) can collect and display biopotential signals. The internal ADC digitizes biopotential measurements and calculates the user's heart rate. This quick start guide explains how pair the MAX30003WING with the MAX32630FTHR platform to stream serial data to a PC, enabling the display of relevant IC information and reconstruction of the QRS complex. Functional demonstrations are broken up into two example programs: MAX30003WING_Demo_Debug is intended for debugging and contains print statements that demonstrate how interrupts, FIFO data, and heart-rate measurements are handled; MAX30003WING_Demo_QRS is intended to graphically reproduce the QRS complex measured. Follow the below steps to set up the demonstrations.


Required Equipment


  • Computer with two USB ports
  • MAX32630FTHR microcontroller
  • Any Mbed programmer, MAX32625PICO recommended
  • MAX30003WING ECG AFE
  • Three ECG leads
  • One fine-pitch, 10-pin ribbon cable, included with the MAX32630FTHR
  • Two USB cables to connect the MAX32625PICO and MAX32630FTHR to a computer

Hardware Assembly


  1. Connect the MAX32625PICO to the MAX32630FTHR using the 10-pin ribbon cable used for programming and communication. The 10-pin header on the MAX32630FTHR and MAX32625PICO boards have a mating groove and can only connect in the proper orientation.
  2. Stack the MAX30003WING on top of the MAX32630FTHR. The MAX30003WING form factor has 16 pins on one side of the board and 12 pins on the other. Make sure the 16-pin header (H1) and 12-pin header (H3) align on each board when stacking. Figure 1 shows the MAX30003WING stacking on the MAX32630FTHR.
  3. Figure 1. Displays stacking the MAX30003WING on top of the MAX32630FTHR.

    Figure 1. Displays stacking the MAX30003WING on top of the MAX32630FTHR.

  4. Connect the ECG leads to the MAX30003WING. The leads plug into the J1 junction.
  5. To attach the leads for heart monitoring:
    1. Attach an electrode to the user's left and right sides of the chest as well as the user's lower left ribcage.
    2. Connect the black lead to the left side electrode on the user's chest, the white lead to the right-side electrode on the user's chest, and the red lead to the electrode on the left ribcage.
  6. Connect the MAX32625PICO and MAX32630FTHR to a PC using the USB cables.

Software Configuration


  1. Go to os.mbed.com and log in. If you do not have an account, create one.
  2. After signing in, navigate to the MAX32630FTHR Mbed landing page by clicking the following link, os.mbed.com/platforms/MAX32630FTHR. On the right-hand side, click the Add to your Mbed compiler button to add the MAX32630FTHR as a target microcontroller board to your compiler. Figure 2 highlights the Add to your Mbed compiler button with a red box on the MAX32630FTHR landing page.
  3. Figure 2. Highlights the Add to your Mbed Compiler button in a red box on the MAX32630FTHR Mbed landing page.

    Figure 2. Highlights the Add to your Mbed Compiler button in a red box on the MAX32630FTHR Mbed landing page.

  4. Install the Windows OS driver for Mbed microcontrollers by scrolling down the MAX32630FTHR Mbed landing page to reach the PC Configuration section; follow the installation instructions. Figure 3 displays the PC Configuration section.
  5. Figure 3. Displays PC Configuration section of the MAX32630FTHR Mbed landing page.

    Figure 3. Displays PC Configuration section of the MAX32630FTHR Mbed landing page.

  6. Import the desired example program into the compiler program work space. Navigate to the program repositories by visiting the program link.
    1. MAX30003WING_Demo_Debug
    2. MAX30003WING_Demo_QRS
  7. Figure 4 highlights the import button on the MAX30003WING_Demo_QRS repository page with a red box. Click the Import to Compiler button; this automatically opens the Mbed compiler in a new window. When this window opens, select Import to import the program.
  8. Figure 4. Highlights the Import into Compiler button with a red box on the MAX30003WING_Demo_QRS repository.

    Figure 4. Highlights the Import into Compiler button with a red box on the MAX30003WING_Demo_QRS repository.

  9. Select the desired example program in your program work space. In the upper right corner, the target microcontroller is displayed. Confirm the MAX32630FTHR is the target microcontroller. Figure 5 highlights the location of the target microcontroller on the compiler webpage with a red box. If the MAX32630FTHR is not selected, click this area to select a target microcontroller. Once clicked, the selection window appears; select the MAX32630FTHR.
  10. Figure 5. Highlights the target microcontroller selection area of the Mbed compiler window.

    Figure 5. Highlights the target microcontroller selection area of the Mbed compiler window.

  11. With the desired example program selected in the program work space, click the Compile button in the command banner at the top of the screen. Figure 6 highlights the Compile button. This initiates the download of the program’s binary file.
  12. Figure 6. Highlights the Compile command button in the Mbed compiler with a red box.

    Figure 6. Highlights the Compile command button in the Mbed compiler with a red box.

  13. The MAX32625PICO board appears as a USB drive with the name DAPLINK in your native file navigation program. Figure 7 highlights the DAPLINK drive with a red box. Program the MAX32630FTHR by dragging the binary file onto the DAPLINK drive. Red LEDs flash on the MAX32625PICO until programming is complete. This typically takes a few seconds.
  14. Figure 7. Drag the binary file onto the DAPLINK drive to program the microcontroller.

    Figure 7. Drag the binary file onto the DAPLINK drive to program the microcontroller.

  15. If the desired program is MAX30003WING_Demo_Debug, install the serial terminal program Tera Term by visiting this link and following the installation instructions: https://osdn.net/projects/ttssh2/releases/. Skip to step 12 if the desired program is the MAX30003WING_Demo_QRS.
  16. Open Tera Term and select the Serial radio button and the Mbed device from the pull-down menu, as shown in Figure 8. The Mbed device could be on a different COM port than what is shown in Figure 8. Click OK.
  17. Figure 8. Tera Term opening window. Select the Serial radio button and the mbed Serial Port from the drop-down menu.

    Figure 8. Tera Term opening window. Select the Serial radio button and the mbed Serial Port from the drop-down menu.

  18. Set the baud rate to 115200bps by navigating to Setup/Serial Port. This opens a new configuration window. Select 115200 in the Baud rate pull-down menu, as shown in Figure 9.
  19. Figure 9. Displays 115200bps baud rate selected in Tera Term.

    Figure 9. Displays 115200bps baud rate selected in Tera Term.

  20. If the desired example program is the MAX30003WING_Demo_QRS, install the Arduino IDE by visiting this link and following the installation instructions, https://www.arduino.cc/en/Main/Software. Skip to step 16 if using the MAX30003WING_Demo_Debug.
  21. Select the port to monitor in the Arduino IDE by navigating to Tools/Port: and select the desired COM port. To find what COM port the Mbed serial device is on, go to the PC's Device Manager and expand the Ports (COM & LPT) drop-down menu. The Mbed serial device is displayed, as seen in Figure 10. The Mbed device could be on a different COM port than what is shown in Figure 10.
  22. Figure 10. The COM port for the Mbed Serial Port can be found by opening the Device Manager and navigating to Ports(COM & LPT).

    Figure 10. The COM port for the Mbed Serial Port can be found by opening the Device Manager and navigating to Ports(COM & LPT).

  23. Launch the Arduino IDE and open the serial plot by navigating to Tools/Serial Plotter; this launches a new window, as displayed in Figure 11.
  24. Change the baud rate to 115200bps by clicking the drop-down menu in the lower right-hand corner, as highlighted in Figure 11. Select 115200.
  25. Figure 11. Displays the Arduino IDE serial plotter. The baud rate selection is highlighted with a red box.

    Figure 11. Displays the Arduino IDE serial plotter. The baud rate selection is highlighted with a red box.

  26. Press the reset (SW1) button on the MAX32630FTHR, as displayed in Figure 12.
  27. Figure 12. The reset button is SW1 on the MAX32630FTHR.

    Figure 12. The reset button is SW1 on the MAX32630FTHR.

  28. If using the MAX30003WING_Demo_Debug, data begins streaming to the serial terminal, as shown in Figure 13.
  29. Figure 13. Serial output of the MAX30003WING_Demo_Debug program.

    Figure 13. Serial output of the MAX30003WING_Demo_Debug program.

  30. If using the MAX30003WING_Demo_QRS, the bipotential data begins plotting in the Arduino serial plotter, as shown in Figure 14.
  31. Figure 14. Example output from the MAX30003WING_Demo_QRS program.

    Figure 14. Example output from the MAX30003WING_Demo_QRS program.

This completes the integration and set up of the MAX30003WING with the MAX32630FTHR. Please continue to use this quick start as an example for making your own applications using the MAX30003 ECG AFE. Maxim has several Wing evaluation boards to enable rapid development of entire systems. Check out Maxim's Feather and Wing solutions for your next project!