Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

Today, I want to share an interesting project designed by our old friend, HonestQiao, which is a portable vital signs monitor prototype based on the ESP32-S3-B and EPC001.

Doesn’t it sound impressive? Let’s take a look at how this vital signs monitor works, how it processes the data it collects, and how it displays the information on the ESP32-S3-Box-Lite.

The project has been uploaded to the Electronic Forest:

https://www.eetree.cn/project/detail/1889

EPC001 Development Board Introduction

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

The EPC001 development board is a multi-parameter vital signs detection board based on the EPC001 chip. The chip integrates analog front ends for detecting pulse wave signals and ECG signals with an ADC precision of 24 bits, which is very high. With the official software, you can obtain data collected by the EPC001 through the serial port, including waveforms such as pulse wave, blood oxygen waveform, ECG, EMG, and EEG, and can update parameters like heart rate, blood oxygen, blood pressure, and arrhythmia index in real-time.

Design Concept

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001
Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

The ESP32-S3-Box-Lite uses the ESP32-S3 as the main control unit, has a 320×240 TTF screen, and offers PMOD interfaces to connect with the EPC001 development board’s serial port for data collection and transmission.

Combining the ESP32-S3-Box-Lite with the EPC001 development board allows the EPC001 to collect data while the ESP32-S3-Box-Lite handles data reading and display. This project implements basic control of the EPC001 development board to detect waveform signals and display SP02 data. Since this is a prototype development, the system program is developed based on MicroPython, and the interface uses LVGL.

Development Board Serial Connection

Refer to the development board manual to understand the serial communication pins on the EPC001 development board. Install data collection software according to the manual and prepare the connections.

Pins 7 and 3 located at J3:

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

This serial port can be connected to a computer using the official USB2TTL, allowing control of the EPC001 development board and data reading using the official upper computer software. In this project, it connects with GPIO11 and GPIO13 on the PMOD of the ESP32-S3-Box-Lite to achieve serial communication.

Data Parsing Rules

To better understand the communication protocol described in the technical manual, a logic analyzer was used for analysis. Below is the ECG interface from the official upper computer software:

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

Using a logic analyzer, the data returned by the EPC001 can be clearly seen:

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

Communication Protocol

The specific communication protocol is divided into two parts: control command sending and command return.

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

After sending control commands, the EPC001 will respond to the corresponding control command, indicating receipt. When using the waveform collection command, in addition to returning a success response for the control command, it will continue to automatically upload the detected data.

The specific data upload packet includes command return and data upload parts; the command return part is mainly for communication handshake, while the data upload part is mainly for uploading collected waveform data and calculated parameters.

By understanding the communication protocol through the technical manual and logic analyzer, I also used serial debugging tools to send corresponding control commands and receive returned data. Once these are clarified, the specific development work can begin.

Reading Serial Data

In the system program of the ESP32-S3-Box-Lite, serial communication with the EPC001 is performed:

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

In MicroPython, handling serial communication is very quick and convenient. First, define the serial communication pins, then use uart.write() to send data, uart.any() to check if data has been received, and uart.read() to read data. Different waveform data is obtained using different commands, and commands can be defined as needed. After sending the corresponding waveform collection control commands, data upload can be received. Once the data is read, it can be parsed.

Data Parsing

  1. The header and footer of the data packet should be 0x21 and 0x0A, indicating valid ECG data.

  2. Calculate the checksum of the content of the data packet before the checksum bit and compare it with the received checksum; if they match, the data is valid.

  3. Then obtain the waveform data part from the data for further processing.

For detailed data acquisition and processing code, please refer to the project report.

Display Interface Processing

The interface processing focuses on simplicity and speed, with the basic settings as follows:

  • The first screen displayed upon startup.

  • Pressing the middle button enters the waveform collection and display interface.

  • On this interface, you can pause and resume the display by pressing the middle button.

  • Pressing the left and right buttons enters the waveform interface and SP02 data display interface, respectively.

  • Pressing the BOOT button in the upper right corner returns to the main screen.

Using LVGL for interface development allows for easy use of LVGL components to present specific interfaces.

Main screen: Using LVGL’s image component to display images:

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

Function Demonstration

Main screen:

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

Waveform interface:

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

SP02 data display:

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

Future Plans

With deeper use of the EPC001 and proficiency in using LVGL in MicroPython, some plans for the second version have been made.

Functionally:

  • Enhance support for existing waveform data:

  • Adopt a modular structure for data parsing.

  • Implement control and reading of PPG-green light, PPG-red light, ECG, PPG+ECG, EMG, EEG, BP waveform data, and SP02 data.

On the display interface:

  • Use a Screen/Tab method for easier switching operations.

This concludes today’s project sharing. For more project details and important code snippets, you should refer to the complete project report for better understanding. Click “Read Original” to view the project!

END

Hardcore Academy

The Hardcore team is dedicated to providing standardized core skill courses for electronic engineers and students in related fields, helping everyone effectively enhance their professional capabilities at various stages of learning and work.

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

Hardcore Academy

Let’s explore together in the field of electronics.

Follow Hardcore’s public account to reach the classroom anytime.

Portable Vital Signs Monitor Prototype Using ESP32-S3 and EPC001

Click to read the original text for more.

Leave a Comment