CE351 Lab 2023 Spring
Lab 2 - A Heart Rate Monitoring System Task 3
Name: Simon Gorman
Email: sbgorman@fortlewis.edu

1.
A Heart Rate Monitoring System Task 3

2. Introduction
Used the MAX30102 sensor and the SSD1306 OLED module to display the BPM, SPO2, and waveform plot on the OLED display all at the same time.

3. Materials and Methods

Materials Quantity
Arduino Uno R3 board (or similar model)
1
Arduino Nano bootloader board
1
MAX30102 Heart Rate Sensor and Oximeter Module
1
SSD1306 OLED Display (0.96 inch)
1
Arduino Nano board
1
Breadboard (half or full-size)
1
Pushbutton 1
Breadboard/Jumper wires
5-6

Used the following videos as a guide: MOUNT DYNAMICS and DKARDU*

*The coding from the MOUNT DYNAMICS required extensive troubleshooting, so use MOUNT DYNAMICS wiring scheme with DKARDU's arduino code.

Burned the bootloader to the Arduino Nano board using the Arduino UNO R3 board with a custom board (will be provided by instructor) by following this tutorial from the yilectronics.com page and How to Burn the Bootloader into Arduino by NT Tronix:

Instead of connecting the Arduino Nano to the Arduino Uno via jumper wires, use the Arduino Nano bootloader board like this:
Bootloader board attached to Arduino Uno
Bootloader board attached to Arduino Uno side connection 01
Bootloader board attached to Arduino Uno side connection 02
Figure 01: Attached Arduino Nano bootloader board to Arduino Uno R3

After burning the bootloader and testing the Nano board with the Arduino - Blink example, attached the Arduino Nano board to the breadboard and made the following wiring connections to the OLED display, switch, and MAX30102:
  Breadboard wiring of all the devices
Figure 02: Breadboard wiring of the Arduino Nano, OLED display, and MAX30102 from the MOUNT DYNAMICS video

Next I used DKARDU's code to test the MAX30102 sensor.

To access DKARDU's code:
  1. Visit the DKARDU/heartrateNbloodoxygen github site for the arduino code package.
  2. Then click the green box labeled "code" and click "Download ZIP". Save the .zip file somewhere you can easily find it (like the desktop or personal thumbdrive).
  3. Open the Arduino application and make sure your settings match your device
  4. Right-click the .zip file and click "extract all"
  5. In the Arduino application, go to File>Open and open the "heartrateNbloodoxygen-main" folder then select the "NanoPulsePPG.ino" file to be opened.
  6. Arduino will say that the file needs to be in a folder so select "ok" and it will open the Arduino code.
  7. If you upload the code to the Arduino Nano there will be an error saying it can't find the "ssd1306.h" file which means you don't have the header files saved in the same place (or "directory") as the "NanoPulsePPG.ino" file. Go to your new folder "heartrateNbloodoxygen-main" folder then copy all the files and paste them into the "NanoPulsePPG" folder.
  8. Now the Arduino application will show that you have different files tabbed alongside the NanoPulsePPG.ino file
  9. Connect the Arduino Nano to the computer, make sure your settings match your board type, comm port, and processor type then upload the NanoPulsePPG.ino file.
  10. The Arduino application will say "done uploading" and your devices will light up (success!)
  11. Now your ready to test the MAX30102 sensor!

4. Results

Video 01: youtube video of testing the sensor

5. Discussion
The MAX10302 sensor was a great way to learn how to use Arduino code and Arduino devices. The sensor is still not recommended as a replacement for medical grade oximeters but it's a great way to visualize the oximeter circuitry and to expand our understanding on IR sensors.