Como construir um monitor de saúde portátil

How to Build a Portable Health Monitor

Medical equipment for health monitoring is typically expensive, but there is an option. If you simply want to keep an eye on your heart rate or are caring for someone with health issues that should be monitored, there is an option you can create yourself.

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

  • AD8232 ECG Sensor
  • MLX90614 Body Temperature Sensor
  • MAX30100 pulse oximeter
  • Heart rate sensor

All of these sensors are relatively cheap and readily available. The microcontroller used in the project is the ESP32. Alternatively, Arduino NANO 33 IoT or any small form factor capable microcontroller can be used. Vital signs monitored by the sensors are displayed on an SSD1306 OLED screen.

The device is prototyped on a breadboard. It can be connected to a perforated panel and placed in a suitable case to be used as a portable device.

Required components

  1. ESP32 x1
  2. AD8232 ECG sensor x1
  3. MLX90614 Body Temperature Sensor
  4. MAX30100 Pulse Oximeter Sensor
  5. Test board
  6. Connecting wires or Dupont wires

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

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

AD8232 is a single-lead electrocardiogram (ECG or EKG) sensor designed to monitor cardiac 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 detection and consumer electronics.

The MLX90614 includes a thermopile sensor for measuring temperature and a separate ambient temperature sensor. Both sensors work to compensate for ambient temperature, increasing the accuracy of temperature measurements. The sensor comes factory calibrated, simplifying the integration process for easy use. The sensor communicates with a microcontroller via 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 main 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 SpO2.

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

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

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

To interface the AD8232 ECG sensor, connect its 3.3V and GND pins to the 3.3V and GND pins of the ESPE32. Then connect the sensor output terminal to one of the ESP32's analog input pins, such as A0.

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

These connections are demonstrated in the circuit diagram below.

The necessary libraries
Fortunately, we already have libraries to work with the MAX30100 and MLX90614 sensors. The other required libraries 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 don't already have these libraries installed, go to Tools->Manage Libraries in the Arduino IDE. You may need to download the MAX30100_PulseOximeter library from GitHub (use this link ) and install the library by going to Sketch->Add 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 the user's heart rate, oxygen level, body temperature and heart rate. The ESP32 receives the raw ECG value from the AD8232 ECG sensor output terminal. This value is obtained from the ESP32 analog input pin. The MLX90614 and MAX30100 sensors communicate their values ​​via the I2C interface.

The values ​​received from both sensors are retrieved through functions from their respective libraries. The MLX90614 transmits body temperature in Celsius, and the MAX30100 transmits SPO2 (in percentage) and heart rate (in BPM) values. The ESP32 measures all of a person's vital signs through these sensors. They are transmitted to the serial console and displayed on the SSD1306's 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. Libraries must first be installed via the library manager in the Arduino IDE or as a ZIP. Wire.h is required to handle data communication over the I2C interface. The Adafruit_GFX.h and Adafruit_SSD1306.h libraries are used for the SSD1306 OLED display. MAX30100_PulseOximeter.h is the library for the MAX30100 body temperature sensor, and Adafruit_MLX90614.h works with the MLX90614 oximeter sensor.

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

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

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

Results

Conteúdo Relacionado

How to Troubleshoot Common ESP32-CAM Problems
ESP32-CAM is a compact camera module that combines the...
How to choose an e-bike controller
The motor controller is one of the most important...
What is the role of automotive sensors in modern vehicles?
A network of sensors is embedded in every vehicle,...
A guide to USB standards from 1.0 to USB4
A evolução dos padrões USB foi fundamental para moldar...
Schurter aprimora série de seletores de tensão com revestimento prateado
A SCHURTER anuncia um aprimoramento para sua conhecida série...
A interface serial PCI fornece conectividade confiável em ambientes extremos
A Sealevel Systems anuncia o lançamento da Interface Serial...
STMicroelectronics expande portfólio de conversão de energia com diodos Trench Schottky de 100 V
A STMicroelectronics introduziu Diodos retificadores Schottky de trincheira de...
O que são Sistemas Globais de Navegação por Satélite (GNSS) e como são usados?
Determinar uma localização precisa é necessário em várias indústrias...
O conversor GaN de 50 W da STMicroelectronics permite projetos de energia de alta eficiência
O novo VIPerGaN50 da STMicroelectronics simplifica a construção de...
Samsung e Red Hat farão parceria em software de memória de próxima geração
A Samsung Electronics, fornecedora de tecnologia de memória avançada,...
Primeiro MPU single-core com interface de câmera MIPI CSI-2 e áudio
O mercado embarcado tem uma necessidade de soluções de...
Understanding Support Insulators in Electrical Systems
You probably have a support insulator if you've noticed...
Explore Stay Insulator – safety, installation and maintenance
You've probably seen stand an insulator sit on power...
More safety and efficiency with the shackle isolator
You've probably seen shackle insulators enthroned on electricity poles,...
Discover the power of latching relays for energy efficiency and more
You have probably experienced situations where controlling a circuit...
Capacitando Tecnologia: Um Guia para Relés Eletromagnéticos
Você pode não pensar nisso com frequência, mas relés...
Back to blog

Leave a comment

Please note, comments need to be approved before they are published.