ESP32-Powered PPG Signal Acquisition: Open-Source Hardware and Software for Research and Education
Abstract
1. Introduction
- The compact, portable hardware is based on the ESP32 microcontroller and integrates an ADC and processing capabilities, allowing for a standalone, portable PPG acquisition system.
- The open-source software provides access to a wide range of libraries for filtering, peak detection, real-time HRV offline analysis, and real-time data acquisition and visualization.
- Its low power consumption makes it suitable for wearable or continuous monitoring setups.
- Its cost-effective, simple sensor design uses an infrared LED as a photosensor.
1.1. Related Works
1.2. Working Principles of PPG
2. Design
- An ESP32-WROOM-32 module was used for analog signal acquisition and serial data transmission.
- A PPG sensor using an LED as the photosensor was connected to the ESP32’s ADC input for bio signal acquisition.
- The system was powered via USB or a regulated 3.3V external supply.
2.1. Hardware Implementation
- Infrared LED: Emits infrared light at 940 nm.
- Infrared LED used as a photosensor: Detects reflected infrared light at 940 nm.
- Transistor JFET 2N5457: Provides initial signal amplification.
- LM358 Op-Amps: Performs further amplification.
- Resistors and Capacitors: Controls signal filtering and amplification.
2.2. Firmware Implementation
2.3. Graphical User Interface
3. Build Instructions
4. Operating Instructions
- Environment Setup
- PyQt5—Graphical user-interface toolkit. Install with pip install PyQt5.
- NumPy—Library for numerical computing, array manipulation, and linear-algebra operations. Install with pip install numpy.
- pandas—Library for data manipulation and CSV/table input–output. Install with pip install pandas.
- pyqtgraph—Library for real-time plotting and visualization. Install with pip install pyqtgraph. Note: pyqtgraph depends on PyQt5 and NumPy.
- SciPy—Collection of scientific computing tools, including signal-processing routines. Install with pip install scipy.
- serial (found at site-packages\serial)—This corresponds to the PySerial package; install with pip install pyserial.
- Launching the GUI
- To launch the GUI application, users may proceed in one of the following ways:
- Option 1: Run the script directly using Python by executing the following command in the terminal:
- python main.py
- Option 2: Alternatively, the application can be launched by executing the standalone binary file (gui.exe) included in the Supplementary Materials. No Python installation is required for this option.
- Device Connection
- Starting Streaming PPG
- Start Capture
- Stopping and Disconnecting
- HRV Analysis from Captures folder
- Ensure that the sensor is properly attached to the measurement site (e.g., fingertip) and that environmental noise is minimized for optimal signal quality.
5. Validation
6. Conclusions
Supplementary Materials
| Name | Type | Description |
| S1 | bpm_detector (.py) | Script of python source code used |
| S2 | data_capture (.py) | Script of python source code used |
| S3 | gui (.py) | Script of python source code used |
| S4 | main (.py) | Script of python source code used |
| S5 | ppg_plot_widget (.py) | Script of python source code used |
| S6 | serial_utils (.py) | Script of python source code used |
| S7 | Style (.py) | Script of python source code used |
| S8 | images (Folder) | supplementary files (video, images and captures of GUI in use) |
| S9 | Capture (Folder) | Optionally or automatically generated (.Csv files captured) |
| S10 | firmware_esp32wroom Arduino file (Ino) | Firmware use for ESP32-WROOM-32 |
| S11 | Subject_1 (.Csv) | 10 captures of Subject_1 |
| S12 | Subject_2 (.Csv) | 10 captures of Subject_1 |
| S13 | Subject_3 (.Csv) | 10 captures of Subject_1 |
| S14 | Subject_4 (.Csv) | 10 captures of Subject_1 |
| S15 | hrv_batch (.py) | Script for HRV analysis offline from Python IDLE |
| S16 | Video (.mov) | Video demonstrating the hardware in use |
| S17 | gui (.exe) | Executable file of the GUI |
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Caturano, A. (Ed.) Cardiovascular and Metabolic Disease: New Treatment and Future Directions 2.0; MDPI Books: Basel, Switzerland, 2024; Available online: https://www.mdpi.com/books/reprint/9573 (accessed on 1 May 2025).
- Scardulla, F.; Cosoli, G.; Spinsante, S.; Poli, A.; Iadarola, G.; Pernice, R.; Busacca, A.; Pasta, S.; Scalise, L.; D’Acquisto, L. Photoplethysmograhic sensors, potential and limitations: Is it time for regulation? A comprehensive review. Measurement 2023, 218, 113150. [Google Scholar] [CrossRef]
- Castiglioni, P.; Meriggi, P.; Di Rienzo, M.; Lombardi, C.; Parati, G.; Faini, A. Heart Rate Variability from Wearable Photoplethysmography Systems: Implications in Sleep Studies at High Altitude. Sensors 2022, 22, 2891. [Google Scholar] [CrossRef] [PubMed]
- Cui, H.; Wang, Z.; Yu, B.; Jiang, F.; Geng, N.; Li, Y.; Xu, L.; Zheng, D.; Zhang, B.; Lu, P.; et al. Statistical Analysis of the Consistency of HRV Analysis Using BCG or Pulse Wave Signals. Sensors 2022, 22, 2423. [Google Scholar] [CrossRef] [PubMed]
- Abdullah, S.; Hafid, A.; Folke, M.; Lindén, M.; Kristoffersson, A. PPGFeat: A novel MATLAB toolbox for extracting PPG fiducial points. Front. Bioeng. Biotechnol. 2023, 11, 1199604. [Google Scholar] [CrossRef] [PubMed]
- Tang, Q.; Chen, Z.; Menon, C.; Ward, R.; Elgendi, M. PPGTempStitch: A MATLAB Toolbox for Augmenting Annotated Photoplethsmogram Signals. Sensors 2021, 21, 4007. [Google Scholar] [CrossRef] [PubMed]
- Tang, Q.; Chen, Z.; Allen, J.; Alian, A.; Menon, C.; Ward, R.; Elgendi, M. PPGSynth: An innovative toolbox for synthesizing regular and irregular photoplethysmography waveforms. Front. Med. 2020, 7, 597774. [Google Scholar] [CrossRef] [PubMed]
- Boccignone, G.; Conte, D.; Cuculo, V.; D’Amelio, A.; Grossi, G.; Lanzarotti, R.; Mortara, E. pyVHR: A Python framework for remote photoplethysmography. PeerJ Comput. Sci. 2022, 8, e929. [Google Scholar] [CrossRef] [PubMed]
- Le, V.D.; Ho, H.B.; Karolcik, S.; Hernandez, B.; Greeff, H.; Nguyen, V.H.; Phan, N.Q.K.; Le, T.P.; Thwaites, L.; Georgiou, P.; et al. vital_sqi: A Python package for physiological signal quality control. Front. Physiol. 2022, 13, 1020458. [Google Scholar] [PubMed]
- Goda, M.Á.; Charlton, P.H.; Behar, J.A. pyPPG: A Python toolbox for comprehensive photoplethysmography signal analysis. Physiol. Meas. 2024, 45, 045001. [Google Scholar] [CrossRef] [PubMed]
- Yamane, N.; Mishra, V.; Goodwin, M.S. HeartView: An Extensible, Open-Source, Web-Based Signal Quality Assessment Pipeline for Ambulatory Cardiovascular Data. In Proceedings of the International Conference on Pervasive Computing Technologies for Healthcare, Malmö, Sweden, 27–29 November 2023; pp. 107–123. [Google Scholar]
- Fogarty, J.S. LOTUS Software to Process Wearable EmbracePlus Data. Sensors 2024, 24, 7462. [Google Scholar] [CrossRef] [PubMed]
- Cusini, I.; Rinaldi, R.; Castiglioni, P.; Faini, A.; Villa, F. Multi-wavelength SPAD photoplethysmography for cardio-respiratory monitoring. Front. Phys. 2023, 11, 952103. [Google Scholar] [CrossRef]
- Roldan, M.; Kyriacou, P.A. A Non-Invasive Optical Multimodal Photoplethysmography-Near Infrared Spectroscopy Sensor for Measuring Intracranial Pressure and Cerebral Oxygenation in Traumatic Brain Injury. Appl. Sci. 2023, 13, 5211. [Google Scholar] [CrossRef]
- Přibil, J.; Přibilová, A.; Frollo, I. Comparative Measurement of the PPG Signal on Different Human Body Positions by Sensors Working in Reflection and Transmission Modes. Eng. Proc. 2020, 2, 69. [Google Scholar] [CrossRef]
- Chatterjee, S.; Kyriacou, P.A. Monte Carlo Analysis of Optical Interactions in Reflectance and Transmittance Finger Photoplethysmography. Sensors 2019, 19, 789. [Google Scholar] [CrossRef]
- Hernandez, S.M.; Bulut, E. Wifi sensing on the edge: Signal processing techniques and challenges for real-world systems. IEEE Commun. Surv. Tutor. 2022, 25, 46–76. [Google Scholar] [CrossRef]
- Khalid, W.; Jamil, M.; Khan, A.A.; Awais, Q. Open-source Internet of Things-based supervisory control and data acquisition system for photovoltaic monitoring and control using HTTP and TCP/IP protocols. Energies 2024, 17, 4083. [Google Scholar] [CrossRef]











| Quantity | Component | Source of Materials | Material Type | Cost |
|---|---|---|---|---|
| 1 | ESP32 WROOM 32 | Digikey | MCU | $ 8.09 |
| 1 | 2N5457 | Digikey | Transistor | $ 0.70 |
| 1 | LM358 | Digikey | Opamp | $ 1.00 |
| 2 | Irled 940 nm | Digikey | LED | $ 0.55 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Miranda-Vega, J.E.; Nuñez-Patrón, E.Y.; Prieto-Avalos, G.; Flores-Fuentes, W.; Sergiyenko, O.; García-González, W.; Márquez-Ramirez, L.V.; Castro-Contreras, R.; Ayala-Figueroa, R.I. ESP32-Powered PPG Signal Acquisition: Open-Source Hardware and Software for Research and Education. Hardware 2025, 3, 15. https://doi.org/10.3390/hardware3040015
Miranda-Vega JE, Nuñez-Patrón EY, Prieto-Avalos G, Flores-Fuentes W, Sergiyenko O, García-González W, Márquez-Ramirez LV, Castro-Contreras R, Ayala-Figueroa RI. ESP32-Powered PPG Signal Acquisition: Open-Source Hardware and Software for Research and Education. Hardware. 2025; 3(4):15. https://doi.org/10.3390/hardware3040015
Chicago/Turabian StyleMiranda-Vega, Jesús E., Erick Y. Nuñez-Patrón, Guillermo Prieto-Avalos, Wendy Flores-Fuentes, Oleg Sergiyenko, Wendy García-González, Loriz Victoria Márquez-Ramirez, Rubén Castro-Contreras, and Rafael I. Ayala-Figueroa. 2025. "ESP32-Powered PPG Signal Acquisition: Open-Source Hardware and Software for Research and Education" Hardware 3, no. 4: 15. https://doi.org/10.3390/hardware3040015
APA StyleMiranda-Vega, J. E., Nuñez-Patrón, E. Y., Prieto-Avalos, G., Flores-Fuentes, W., Sergiyenko, O., García-González, W., Márquez-Ramirez, L. V., Castro-Contreras, R., & Ayala-Figueroa, R. I. (2025). ESP32-Powered PPG Signal Acquisition: Open-Source Hardware and Software for Research and Education. Hardware, 3(4), 15. https://doi.org/10.3390/hardware3040015

