# ESP32 Medical Device Controller ## Description Welcome to your new project. Imagine what you can build here. ## Project Details - **Owner:** shahdtarekk - **Created:** 4/23/2026 - **Last Updated:** 4/25/2026 - **Visibility:** Public ## Key Components ### BT1 — [BH-18650-B1BA002](https://www.flux.ai/markwuflux/bh-18650-b1ba002~i9.md) - Role Details: Single-cell 18650 Li-ion battery holder for backup power subsystem - Package: Battery Holder - Datasheet URL: https://datasheet.lcsc.com/lcsc/2204021730_MYOUNG-BH-18650-B1BA002_C2988620.pdf - Manufacturer Part Number: BH-18650-B1BA002 - Manufacturer Name: ASE Technology Holding Co. Ltd. (ASX) - DPN: C2988620 - Role: Battery **Pins:** - - [pin 2] - + [pin 1] ### CN1 — [B4B-PH-K-S(LF)(SN)](https://www.flux.ai/lcsc/b4b-ph-k-slfsn~0ffw.md) - JLCPCB Part Class: Extended Part - Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/2304140030_JST-B4B-PH-K-S-LF-SN_C131334.pdf - Connector Positions: 4 - Manufacturer Part Number: B4B-PH-K-S(LF)(SN) - LCSC Part Number: C131334 - Connector Pitch: 2mm - Connector Rows: 1 - Package: THT - Package or Case Code: CONN-TH_B4B-PH-K-S - Role: Motor Connector - Part Type: Wire To Board / Wire To Wire Connector - Role Details: 4-pin connector for bipolar NEMA17 stepper motor coils - Product Info Url: https://lcsc.com/product-detail/PH-Connectors_JST_B4B-PH-K-S-LF-SN_B4B-PH-K-S-LF-SN_C131334.html - Connector Gender: Female - Manufacturer Name: JST - Connector Type: Board to Wire **Pins:** - 1 [pin 1] - 2 [pin 2] - 3 [pin 3] - 4 [pin 4] ### D1 — [BPW34](https://www.flux.ai/vasy_skral/bpw34~008.md) - Part Type: Photodiode - Package: 2-DIP - Manufacturer Part Number: BPW34 - Role: Photodiode - Role Details: BPW34 photodiode front-end for reflected IR sensing into ADS1115 - Datasheet URL: https://dammedia.osram.info/media/resource/hires/osram-dam-5488305/BPW%2034_EN.pdf - Manufacturer Name: OSRAM Opto Semiconductors Inc. **Pins:** - A [pin 2] - K [pin 1] ### D2 — [TSAL6400](https://www.flux.ai/adrian95/tsal6400~wp0.md) - License: https://creativecommons.org/licenses/by/4.0/ - Package: THT - Role: IR Emitter - Manufacturer Part Number: TSAL6400 - Role Details: 940nm IR LED emitters for sensor illumination - Manufacturer Name: Vishay Semiconductor Opto Division - Part Type: LED - Datasheet URL: https://www.vishay.com/docs/81011/tsal6400.pdf **Pins:** - P1 [pin 1] - P2 [pin 2] ### D3 — [TSAL6400](https://www.flux.ai/adrian95/tsal6400~wp0.md) - Role: IR Emitter - Part Type: LED - Datasheet URL: https://www.vishay.com/docs/81011/tsal6400.pdf - Role Details: 940nm IR LED emitters for sensor illumination - Manufacturer Name: Vishay Semiconductor Opto Division - Manufacturer Part Number: TSAL6400 - License: https://creativecommons.org/licenses/by/4.0/ - Package: THT **Pins:** - P1 [pin 1] - P2 [pin 2] ### D4 — [TSAL6400](https://www.flux.ai/adrian95/tsal6400~wp0.md) - License: https://creativecommons.org/licenses/by/4.0/ - Manufacturer Part Number: TSAL6400 - Manufacturer Name: Vishay Semiconductor Opto Division - Role: IR Emitter - Part Type: LED - Datasheet URL: https://www.vishay.com/docs/81011/tsal6400.pdf - Role Details: 940nm IR LED emitters for sensor illumination - Package: THT **Pins:** - P1 [pin 1] - P2 [pin 2] ### D5 — [TSAL6400](https://www.flux.ai/adrian95/tsal6400~wp0.md) - Role: IR Emitter - Package: THT - Part Type: LED - Datasheet URL: https://www.vishay.com/docs/81011/tsal6400.pdf - Manufacturer Part Number: TSAL6400 - Manufacturer Name: Vishay Semiconductor Opto Division - License: https://creativecommons.org/licenses/by/4.0/ - Role Details: 940nm IR LED emitters for sensor illumination **Pins:** - P1 [pin 1] - P2 [pin 2] ### D6 — [TSAL6400](https://www.flux.ai/adrian95/tsal6400~wp0.md) - Manufacturer Name: Vishay Semiconductor Opto Division - Package: THT - Manufacturer Part Number: TSAL6400 - Role: IR Emitter - License: https://creativecommons.org/licenses/by/4.0/ - Role Details: 940nm IR LED emitters for sensor illumination - Part Type: LED - Datasheet URL: https://www.vishay.com/docs/81011/tsal6400.pdf **Pins:** - P1 [pin 1] - P2 [pin 2] ### D7 — [SS34](https://www.flux.ai/lcsc/ss34~6q67.md) - Forward Voltage: 0.3V to 0.45V - JLCPCB Part Class: Extended Part - Role Details: Schottky freewheel diode for LM2596 12V to 5V buck regulator - Package or Case Code: SMB_L4.3-W3.6-LS5.4-RD - Manufacturer Name: UMW(友台半导体) - Manufacturer Part Number: SS34 - Reverse Voltage: 40V - LCSC Part Number: C2758511 - Diode Type: Schottky - Part Type: Schottky Barrier Diodes (SBD) - Role: Buck Catch Diode - Package: SMD **Pins:** - A [pin 2] - K [pin 1] ### J1 — [S2B-XH-A(LF)(SN)](https://www.flux.ai/jecstronic/s2b-xh-alfsn~mfn.md) - Manufacturer Part Number: S2B-XH-A(LF)(SN) - Role: Power Input - Manufacturer Name: JST - Package: THT - Implementation Details: Add external input fuse and TVS diode at 12V entry before production or clinical prototype use. - License: https://creativecommons.org/licenses/by/4.0/ - Role Details: External 12V input connector feeding LM2596 input and A4988 VMOT rail - Datasheet URL: https://www.jst-mfg.com/product/pdf/eng/eXH.pdf - Part Type: Connector **Pins:** - Pin_1 [pin 1] - Pin_2 [pin 2] ### SW1 — [D2HW-A201D](https://www.flux.ai/adrian95/d2hw-a201d~o2w.md) - Role Details: SPDT mechanical end-stop switch for GPIO19 homing input using common and normally-open contacts - Manufacturer Name: Omron Electronics Inc-EMC Div - Datasheet URL: https://omronfs.omron.com/en_US/ecb/products/pdf/en-d2hw.pdf - Role: Limit Switch - Part Type: Switch - Package: Through Hole - License: https://creativecommons.org/licenses/by/4.0/ - Manufacturer Part Number: D2HW-A201D **Pins:** - 1 [pin 1] - 2 [pin 2] - 3 [pin 3] ### U1 — [ESP32-DEVKITC-32D](https://www.flux.ai/vasyl/esp32-devkitc-32d~8yy.md) - Role Details: Main ESP32 control board using GPIO23 STEP, GPIO22 DIR, GPIO21 ENABLE, GPIO19 limit switch, and shared I2C bus - Manufacturer Part Number: ESP32-DEVKITC-32D - Datasheet URL: https://www.snapeda.com/parts/ESP32-DEVKITC-32D/Espressif%20Systems/datasheet/ - Manufacturer Name: Espressif Systems - Part Type: RF Moule - Role: Controller - Package: Module **Pins:** - 3V3 [pin 1] - CLK [pin 38] - CMD [pin 18] - EN [pin 2] - EXT_5V [pin 19] - GND1 [pin 14] - GND2 [pin 26] - GND3 [pin 20] - IO0 [pin 33] - IO12 [pin 13] - IO13 [pin 15] - IO14 [pin 12] - IO15 [pin 35] - IO16 [pin 31] - IO17 [pin 30] - IO18 [pin 28] - IO19 [pin 27] - IO2 [pin 34] - IO21 [pin 25] - IO22 [pin 22] - IO23 [pin 21] - IO25 [pin 9] - IO26 [pin 10] - IO27 [pin 11] - IO32 [pin 7] - IO33 [pin 8] - IO34 [pin 5] - IO35 [pin 6] - IO4 [pin 32] - IO5 [pin 29] - RXD0 [pin 24] - SD0 [pin 37] - SD1 [pin 36] - SD2 [pin 16] - SD3 [pin 17] - SENSOR_VN [pin 4] - SENSOR_VP [pin 3] - TXD0 [pin 23] ### U2 — [A4988_STEPPER_MOTOR](https://www.flux.ai/jecstronic/a4988steppermotor~0x9.md) - Role Details: A4988 module driven by ESP32 STEP DIR ENABLE signals with VMOT decoupling - Part Type: module - License: https://creativecommons.org/licenses/by/4.0/ - Role: Motor Driver - Manufacturer Part Number: A4988_STEPPER_MOTOR_DRIVER_CARRIER - Package: Module **Pins:** - ~ENABLE [pin 1] - ~RESET [pin 5] - ~SLEEP [pin 6] - 1A [pin 12] - 1B [pin 11] - 2A [pin 13] - 2B [pin 14] - DIR [pin 8] - GND [pin 9] - GND [pin 15] - MS1 [pin 2] - MS2 [pin 3] - MS3 [pin 4] - STEP [pin 7] - VDD [pin 10] - VMOT [pin 16] ### U4 — [LM2596S-5.0/NOPB](https://www.flux.ai/adrian95/lm2596s-5p0nopb~ji8.md) - License: https://creativecommons.org/licenses/by/4.0/ - Manufacturer Part Number: LM2596S-5.0/NOPB - Manufacturer Name: Texas Instruments - Part Type: Integrated Circuit - Role Details: Primary 12V to 5V conversion for ESP32 and peripherals - Role: Buck Regulator - Datasheet URL: https://www.ti.com/lit/ds/symlink/lm2596.pdf - Package: TO-263-6 **Pins:** - ~ON~/OFF [pin 5] - FEEDBACK [pin 4] - GND_TAB [pin 6] - GROUND [pin 3] - OUTPUT [pin 2] - VIN [pin 1] ### U5 — [TP4056_Module](https://www.flux.ai/wolfxpac/tp4056module~ap.md) - Part Type: Module - Implementation Details: Battery charger remains isolated from main system rail pending explicit backup-power architecture decision. - Role: Battery Charger - Role Details: 5V-input TP4056 charger module for 18650 battery subsystem with protection - Package: Module - License: https://creativecommons.org/licenses/by/4.0/ - Manufacturer Name: Generic - Datasheet URL: https://robocraze.com/products/tp4056-lithium-battery-charging-board **Pins:** - BAT- [pin 5] - BAT+ [pin 6] - IN- [pin 1] - IN+ [pin 2] - OUT- [pin 3] - OUT+ [pin 4] ### U6 — [OPA333AIDBVT](https://www.flux.ai/adrian95/opa333aidbvt~q3u.md) - Manufacturer Part Number: OPA333AIDBVT - Package: SOT-23-5 - Datasheet URL: https://www.ti.com/general/docs/suppproductinfo.tsp?distId=10&gotoUrl=https%3A%2F%2Fwww.ti.com%2Flit%2Fgpn%2Fopa333 - Manufacturer Name: Texas Instruments - Role: Photodiode TIA - License: https://creativecommons.org/licenses/by/4.0/ - Part Type: Integrated Circuit - Role Details: Single-supply rail-to-rail op-amp used as BPW34 transimpedance amplifier feeding ADS1115 **Pins:** - -IN [pin 4] - +IN [pin 3] - OUT [pin 1] - V- [pin 2] - V+ [pin 5] ### U7 — [PCA9306DCUT](https://www.flux.ai/jecstronic/pca9306dcut~atk.md) - Datasheet URL: https://www.ti.com/general/docs/suppproductinfo.tsp?distId=10&gotoUrl=https%3A%2F%2Fwww.ti.com%2Flit%2Fgpn%2Fpca9306 - License: https://creativecommons.org/licenses/by/4.0/ - Manufacturer Part Number: PCA9306DCUT - Package: VSSOP-8 - Manufacturer Name: Texas Instruments - Part Type: Integrated Circuit - Role Details: Optional 3.3V to 5V bidirectional I2C level translator for OLED module compatibility review - Role: I2C Level Shifter **Pins:** - EN [pin 8] - GND [pin 4] - SCL1 [pin 2] - SCL2 [pin 6] - SDA1 [pin 3] - SDA2 [pin 5] - VREF1 [pin 1] - VREF2 [pin 7] ### VR1 — [PTA6043-2015DPB103](https://www.flux.ai/adrian95/pta6043-2015dpb103~icc.md) - License: https://creativecommons.org/licenses/by/4.0/ - Package or Case Code: PTA6043 - Manufacturer Name: Bourns Inc. - Part Type: Variable Resistor - Role Details: 10k linear slide potentiometer connected between 3.3V and GND with wiper to ADS1115 A0 - Package: Through Hole - Role: Position Sensor - Datasheet URL: https://www.bourns.com/docs/Product-Datasheets/pta.pdf - Manufacturer Part Number: PTA6043-2015DPB103 **Pins:** - 1 [pin 1] - 2 [pin 2] - 3 [pin 3] *The full schematic, PCB layout, bill of materials, and interactive design are available at [https://www.flux.ai/shahdtarekk/esp32-medical-device-controller~ec](https://www.flux.ai/shahdtarekk/esp32-medical-device-controller~ec).* --- *Generated from [https://www.flux.ai/shahdtarekk/esp32-medical-device-controller~ec](https://www.flux.ai/shahdtarekk/esp32-medical-device-controller~ec)*