Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

How to build a portable health monitor

By Nikhil Agnihotri December 10, 2023

Medical equipment for health monitoring is typically costly, but there is an option. Whether you simply want to be aware of your heart rate or are caring for someone with health conditions that must be monitored, there’s an option that you can build yourself.

In this project, we’ll design a portable health monitor that can be used to monitor the vital signs. The device can be used at home or when traveling. It’s built using the following:

  • AD8232 ECG sensor
  • MLX90614 body temperature sensor
  • MAX30100 pulse oximeter
  • Heart rate sensor

All of these sensors are relatively low-cost and easily available. The microcontroller used in the project is ESP32. Alternatively, Arduino NANO 33 IoT or any capable microcontroller of a small form factor can be used. The vitals monitored from the sensors are displayed on an SSD1306 OLED screen.

The device is prototyped on a breadboard. It can be hardwired on a perfboard and enclosed in a suitable casing to use as a portable gadget.

Components required

  1. ESP32 x1
  2. AD8232 ECG sensor x1
  3. MLX90614 body temperature sensor
  4. MAX30100 pulse oximeter sensor
  5. Breadboard
  6. Connecting wires or Dupont wires

AD8232 ECG sensor
AD8232 is a single-lead electrocardiogram (ECG or EKG) sensor designed for monitoring heart activity. Developed by Analog Devices, the AD8232 is commonly used in various applications, including health and fitness devices, medical monitoring equipment, and wearable technology. It’s designed for single-lead ECG monitoring and is suitable for basic heart rate monitoring and rhythm analysis. 

The low-power sensor includes integrated analog signal conditioning circuitry, which filters and amplifies the raw ECG signal. The sensor supports various electrode configurations, of which adhesive electrodes on the chest or other convenient locations for single-lead ECG measurement is the most common. The sensor communicates with a microcontroller over an SPI interface.

AD8232 is a single-lead electrocardiogram (ECG or EKG) sensor designed for monitoring heart activity

MLX90614 body temperature sensor
MLX90614 is an infrared thermometer sensor developed by Melexis for non-contact temperature measurements, including body temperature. The sensor is used in many applications, including medical devices, industrial temperature sensing, and consumer electronics.

MLX90614 includes a thermopile sensor for measuring the temperature and a separate ambient temperature sensor. Both sensors work to compensate for the ambient temperature, enhancing the accuracy of temperature measurements. The sensor comes factory-calibrated, simplifying the integration process for easy use. The sensor communicates with a microcontroller through the I2C interface.

MLX90614 infrared thermometer sensor for non-contact temperature measurements.

MAX30100 pulse oximeter sensor
Developed by Maxim Integrated, the MAX30100 is a versatile sensor module for pulse oximetry and heart-rate monitoring. Its primary function is to measure heart rate and blood oxygen saturation (SpO2). It uses a red LED to measure heart rate and an infrared (IR) LED to measure the SpO2.

A photodetector receives the light transmitted through or reflected from the user’s skin. Ambient light cancellation algorithms eliminate interference from external light sources, ensuring accurate readings. The sensor communicates with a microcontroller through an I2C interface.

MAX30100 sensor module designed for pulse oximetry and heart-rate monitoring.

Circuit connections
To build this monitoring device, we must interface the AD8232 ECG sensor, the MLX90614 body temperature sensor, and the MAX30100 pulse oximeter sensor with ESP32. The SSD1306 OLED must be interfaced with the microcontroller to display the user’s vitals. The AD8232 sensor has an analog output, while MLX90614 and MAX30100 communicate sensor data over an I2C interface.

To interface the AD8232 ECG sensor, connect its 3.3V and GND pins with ESPE32’s 3.3V and GND pins. Next, connect the sensor’s output terminal with one of ESP32’s analog input pin, such as A0.

To interface the MLX90614 sensor, connect its 3.3V and GND pins to ESP32’s 3.3V and GND pins. Connect the MLX90614’s SDA and SCL pins with ESP32’s D21 and D22 pins. Now repeat these same steps for the MAX30100 and SSD1306 sensors (with the I2C interface).

These connections are demonstrated in the below circuit diagram.

The required libraries
Fortunately, we already have libraries to work with the MAX30100 and MLX90614 sensors. The other libraries required include:

  • The Adafruit MLX90614 library is required for the MLX90614 sensor.
  • The MAX30100_PulseOximeter library for the MAX30100.
  • The Adafruit_SSD1306 and Adafruit_GFX libraries are required to work with the SSD1306 OLED display.

If you do not yet have these libraries installed, do so by going to Tools-> Manage Libraries in Arduino IDE. You might need to download the MAX30100_PulseOximeter library from GitHub (use this link) and install the library by going to Sketch-> Include Library -> Add .ZIP Library.

For your convenience, the MAX30100_PulseOximeter library is attached below as a zip file.
Arduino-MAX30100-master

Arduino sketch

How it works
The portable health monitor tracks a user’s pulse rate, oxygen level, body temperature, and heart rate. ESP32 receives the raw ECG value from the output terminal of the AD8232 ECG sensor. This value is obtained at the analog input pin of ESP32. The MLX90614 and MAX30100 sensors communicate their values through the I2C interface.

The values received from both sensors are retrieved through functions from their respective libraries. The MLX90614 transmits the body temperature in Celsius, and the MAX30100 transmits the SPO2 (in percentage) and the heart rate (in BPM) values. The ESP32 measures all of a person’s vitals through these sensors. They’re transmitted to the serial console and displayed on the SSD1306 OLED screen

The code
The sketch begins by importing the Wire.h, Adafruit_GFX.h, Adafruit_SSD1306.h, MAX30100_PulseOximeter.h, and Adafruit_MLX90614.h libraries. The libraries must first be installed via the library manager in Arduino IDE or as a ZIP. Wire.h is required to handle the data communication over the I2C interface. The Adafruit_GFX.h and Adafruit_SSD1306.h libraries are used for the SSD1306 OLED display. The MAX30100_PulseOximeter.h is the library for the MAX30100 body temperature sensor, and the Adafruit_MLX90614.h works with MLX90614 oximeter sensor.

The variables are declared for the pin assignment with the AD8232 sensor and the SSD1306 OLED. An object of the Adafruit_SSD1306 class is instantiated, followed by the instantiation of objects of the PulseOximeter and Adafruit_MLX90614 classes.

In the setup() function, the baud rate for serial debug is set to 115200 bps. The SSD1306 OLED and the MLX90614 sensor are initialized, and if they’re working correctly, a message is transmitted to the serial console. Finally, the pulse oximeter is initialized.

In the loop() function, ESP32 reads values from the AD8232, MAX30100, and MLX90614. The temperature, heart rate, oxygen level, and ECG (raw) values are transmitted to the serial console. The same values are displayed on SSD1306 OLED.

Results

 

You may also like:


  • What is IFTTT and how does it work?

  • What are the top technologies enabling M2M in 2023?

  • What to expect from microcontrollers in 2023

  • What are different types of biometric sensors?

  • How to use a flex sensor with Arduino

  • How to use an oximeter and heart-rate monitor with Arduino

Filed Under: Applications, Medical Electronics, Tech Articles
Tagged With: ESP32, monitor, sensors, vitals
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • High Side current sensing
  • Multiple DC/DC converters and a single input source
  • MOSFET thermal noise in Weak vs Strong inversion
  • Xiaomi Mijia 1C Robot problem of going backwards while working
  • Will this TL084C based current clamp circuit work?

RSS Electro-Tech-Online.com Discussions

  • Curved lines in PCB design
  • using a RTC in SF basic
  • Parts required for a personal project
  • Wideband matching an electrically short bowtie antenna; 50 ohm, 434 MHz
  • PIC KIT 3 not able to program dsPIC

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection
  • Convection-cooled power controller integrates EtherCat connectivity

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe