# ESP32 PPG Battery Device
## Description
Battery-powered ESP32-WROOM-32 design with MAX30102 PPG sensor, MCP73871 single-cell Li-ion charging and power-path management, 3.3V regulation, and two low-current output terminals.
## Project Details
- **Owner:** solvinn
- **Created:** 4/4/2026
- **Last Updated:** 4/4/2026
- **Visibility:** Public
- **Power Requirements:** Single-cell Li-ion/LiPo battery with charger input and regulated 3.3V logic rail
- **Human Interface:** PPG optical sensing input and two low-current output terminals
- **Connectivity:** WiFi/BLE via ESP32-WROOM-32; I2C sensor interface
- **Operating Voltage:** 3.7V
- **Implementation Details:** Architecture: LiPo battery -> MCP73871 power-path charger -> VSYS -> MIC5219-3.3 LDO -> 3.3V rail -> ESP32 and MAX30102 logic. MAX30102 LED rail tied to VSYS. Two output terminals driven from ESP32 GPIOs through 1.5k series resistors for low-current output capability. First-pass schematic is suitable for review and PCB preparation.
## Key Components
### D1 — [PRTR5V0U2X,215](https://www.flux.ai/openpartlist/prtr5v0u2xc215~f8.md)
- Manufacturer Name: Nexperia USA Inc.
- Package: SOT-143B
- Manufacturer Part Number: PRTR5V0U2X,215
- Role: ESD Protection
- Part Type: Protection
- Role Details: USB input protection device placed at the connector side for VBUS surge and ESD suppression.
- License: https://creativecommons.org/licenses/by/4.0/
- Datasheet URL: https://assets.nexperia.com/documents/data-sheet/PRTR5V0U2X.pdf
**Pins:**
- GND [pin 1]
- I/O1 [pin 2]
- I/O2 [pin 3]
- VCC [pin 4]
### IC1 — [B2B-PH-SM4-TB](https://www.flux.ai/vasyl/b2b-ph-sm4-tb~ly.md)
- Manufacturer Name: JST
- Datasheet URL: https://www.snapeda.com/parts/B2B-PH-SM4-TB(LF)(SN)/JST%20Sales/datasheet/
- Role: Battery Connector
- Manufacturer Part Number: B2B-PH-SM4-TB
- Implementation Details: Single-cell LiPo connector. Pin 1 used as battery positive, pin 2 used as battery negative/ground.
- Part Type: Connector
- Package: JST-PH-2-SMD
- Role Details: Single-cell 3.7V LiPo battery input connector
**Pins:**
- 1
- 2
### J1 — [1546215-2](https://www.flux.ai/adrian95/1546215-2~xhw.md)
- Datasheet URL: https://www.te.com/usa-en/product-1546215-2.datasheet.pdf
- Role: Output Connector
- Part Type: Connector
- License: https://creativecommons.org/licenses/by/4.0/
- Role Details: External connection for two controlled outputs
- Manufacturer Part Number: 1546215-2
- Package: 2-position terminal
- Implementation Details: Two independent low-current outputs from ESP32 through series resistors, intended for up to about 2mA source drive each into external loads referenced to ground.
- Manufacturer Name: TE Connectivity AMP Connectors
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
### J2 — [USB4235-03-C](https://www.flux.ai/cherepanyadima/usb4235-03-c~sn.md)
- Role Details: Optional 5V USB-C sink connector for charger input; power-only use with CC pull-downs and no USB data routing.
- Manufacturer Name: GST
- Role: USB-C Power Input
- Part Type: Connectors
- Datasheet URL: https://gct.co/files/specs/usb4235-spec.pdf
- Manufacturer Part Number: USB4235-03-C_REVA
- Package: USB Type-C 16 pin power only
**Pins:**
- CC1 [pin A5]
- CC2 [pin B5]
- DN1 [pin A7]
- DN2 [pin B7]
- DP1 [pin A6]
- DP2 [pin B6]
- GND_A [pin A1]
- GND_A__1 [pin A12]
- GND_B [pin B1]
- GND_B__1 [pin B12]
- SBU1 [pin A8]
- SBU2 [pin B8]
- SHIELD [pin SH1]
- SHIELD__1 [pin SH2]
- VBUS_A [pin A4]
- VBUS_A__1 [pin A9]
- VBUS_B [pin B4]
- VBUS_B__1 [pin B9]
### U1 — [ESP32-WROOM-32](https://www.flux.ai/vasyl/esp32-wroom-32~siz.md)
- Manufacturer Name: Espressif Systems
- Manufacturer Part Number: ESP32-WROOM-32
- Part Type: RF module
- Implementation Details: Use IO21/IO22 for I2C sensor bus, IO25/IO26 for low-current outputs, IO34 for PPG interrupt; leave unused GPIOs available as test or expansion pins. Module boot pins kept in safe defaults with EN pull-up and decoupling.
- Role Details: Battery-powered main controller for PPG sensing and dual low-current outputs
- Datasheet URL: https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32_datasheet_en.pdf
- Package: Module
- Role: MCU
**Pins:**
- EN [pin 3]
- GND [pin 38]
- GND [pin 39]
- GND [pin 1]
- GND [pin 15]
- IO0 [pin 25]
- IO12 [pin 14]
- IO13 [pin 16]
- IO14 [pin 13]
- IO15 [pin 23]
- IO16 [pin 27]
- IO17 [pin 28]
- IO18 [pin 30]
- IO19 [pin 31]
- IO2 [pin 24]
- IO21 [pin 33]
- IO22 [pin 36]
- IO23 [pin 37]
- IO25 [pin 10]
- IO26 [pin 11]
- IO27 [pin 12]
- IO32 [pin 8]
- IO33 [pin 9]
- IO34 [pin 6]
- IO35 [pin 7]
- IO4 [pin 26]
- IO5 [pin 29]
- NC [pin 32]
- RXD0/IO3 [pin 34]
- SCK/CLK [pin 20]
- SCS/CMD [pin 19]
- SDI/SD1 [pin 22]
- SDO/SD0 [pin 21]
- SENSOR_VN [pin 5]
- SENSOR_VP [pin 4]
- SHD/SD2 [pin 17]
- SWP/SD3 [pin 18]
- TXD0/IO1 [pin 35]
- VDD [pin 2]
### U2 — [MAX30102EFD+T](https://www.flux.ai/adrian95/max30102efdplust~tfq.md)
- Manufacturer Name: Analog Devices Inc./Maxim Integrated
- Package: OLGA-14
- Implementation Details: PPG sensor on I2C. VDD on 3.3V rail, LED supply on VSYS for headroom, interrupt to ESP32 GPIO34. Requires local decoupling and careful analog-friendly placement.
- License: https://creativecommons.org/licenses/by/4.0/
- Role Details: Optical pulse and heart-rate sensing interface over I2C
- Manufacturer Part Number: MAX30102EFD+T
- Role: PPG Sensor
- Part Type: Sensor
- Datasheet URL: https://www.analog.com/media/en/technical-documentation/data-sheets/MAX30102.pdf
**Pins:**
- ~INT [pin 13]
- GND [pin 12]
- PGND [pin 4]
- SCL [pin 2]
- SDA [pin 3]
- VDD [pin 11]
- VLED+ [pin 10]
- VLED+ [pin 9]
### U3 — [MCP73871-2CCI/ML](https://www.flux.ai/adrian95/mcp73871-2cciml~xz9.md)
- Package: QFN
- Role: Battery Charger
- Datasheet URL: https://ww1.microchip.com/downloads/en/DeviceDoc/MCP73871-Data-Sheet-20002090E.pdf
- Part Type: Integrated Circuit
- Manufacturer Part Number: MCP73871-2CCI/ML
- Role Details: Single-cell Li-ion charging and system power-path management
- Implementation Details: Single-cell Li-ion charger with power-path. BAT tied to JST battery connector, OUT feeds system rail and LDO input, CE tied high, SEL tied low, THERM tied low as simplified default, VPCC tied to battery node, PROG1 resistor currently used to set charge current; optional status pins left available.
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Name: Microchip Technology
**Pins:**
- ~PG [pin 6]
- ~TE [pin 9]
- CE [pin 17]
- EP [pin 21]
- IN_1 [pin 18]
- IN_2 [pin 19]
- OUT_1 [pin 1]
- OUT_2 [pin 20]
- PROG1 [pin 13]
- PROG2 [pin 4]
- PROG3 [pin 12]
- SEL [pin 3]
- STAT1/~LBO [pin 8]
- STAT2 [pin 7]
- THERM [pin 5]
- VBAT_1 [pin 14]
- VBAT_2 [pin 15]
- VBAT_SENSE [pin 16]
- VPCC [pin 2]
- VSS_1 [pin 10]
- VSS_2 [pin 11]
### U4 — [MIC5219-3.3YM5-TR](https://www.flux.ai/adrian95/mic5219-33ym5-tr~imj.md)
- Datasheet URL: https://ww1.microchip.com/downloads/en/DeviceDoc/MIC5219-500mA-Peak-Output-LDO-Regulator-DS20006021A.pdf
- Role: LDO
- Manufacturer Name: Microchip
- Implementation Details: 3.3V LDO from VSYS to ESP32 and sensor logic rail. EN tied to VSYS. BP bypass capacitor fitted for noise reduction.
- Package: SOT-23-5
- Manufacturer Part Number: MIC5219-3.3YM5-TR
- Part Type: Integrated Circuit
- Role Details: Generates regulated 3.3V rail from battery system rail
- License: https://creativecommons.org/licenses/by/4.0/
**Pins:**
- BP [pin 4]
- EN [pin 3]
- GND [pin 2]
- IN [pin 1]
- OUT [pin 5]
*The full schematic, PCB layout, bill of materials, and interactive design are available at [https://www.flux.ai/solvinn/esp32-ppg-battery-device~ys](https://www.flux.ai/solvinn/esp32-ppg-battery-device~ys).*
---
*Generated from [https://www.flux.ai/solvinn/esp32-ppg-battery-device~ys](https://www.flux.ai/solvinn/esp32-ppg-battery-device~ys)*