ESP32 Medical Device Schematic
0:00
Started implementing a plan
Goal: Create a comprehensive schematic for an ESP32-based device integrating ESP32 control, A4988 stepper driver + NEMA17 connector, ADS1115 ADC + SSD1306 OLED on shared I2C, sensor block (10k slide pot, 5x 940nm IR LEDs, BPW34 photodiode), and power blocks (12V->5V buck via LM2596, TP4056+18650 charging) with correct GPIO mapping.
Status / progress so far:
- Project renamed to "ESP32 Medical Device Controller".
- Major components added to schematic: ESP32-DEVKITC-32D (U1), A4988 module (U2), ADS1115 module (U3), 0.96" SSD1306 OLED (OLED1), LM2596S-5.0 (U4) with L1 and bulk/decoupling caps, TP4056 protected module (U5) + 18650 holder (BT1), BPW34 photodiode (D1), 5x TSAL6400 IR LEDs (D2–D6) with series resistors (R1–R5), slide pot (VR1), limit microswitch (SW1), battery switch (S1), I2C pull-ups (R8/R9), photodiode load resistor (R6), limit pull-up (R7), 12V input connector (J1), and a 4-pin motor connector (CN1).
- Created project doc [design-notes](https://www.flux.ai/shahdtarekk/silly-gray-robot-vacuum/files/design-notes~4c) capturing architecture + open ambiguities.
- Connected key nets:
- STEP: U1 IO23 -> U2 STEP
- DIR: U1 IO22 -> U2 DIR
- ENABLE: U1 IO21 -> U2 ~ENABLE
- LIMIT: U1 IO19 with pull-up R7 to 3V3 and SW1 contact to GND
- I2C bus: U1 IO18 -> SCL, U1 IO17 -> SDA; pull-ups R9/R8 to 3V3; connected to U3 and OLED1
- Sensor: VR1 wiper + BPW34 K + R6 -> ADS1115 A0; VR1 ends to 3V3/GND; BPW34 A to GND
- Power: J1 provides VIN_12V to LM2596 VIN and A4988 VMOT; LM2596 SW node -> L1 -> 5V rail feeding ESP32 EXT_5V, OLED1 5V, TP4056 IN+, IR LED anodes; bulk/decoupling caps connected.
- Battery subsystem wired locally: BT1 -> U5 BAT; U5 OUT+ -> S1 COM, S1 A = BAT_SW net (not yet used elsewhere).
Implementation plan (remaining work only):
1. Fix motor output wiring to the 4-pin motor connector CN1:
- Connect U2 1A/1B/2A/2B to CN1 pins 1–4 (define consistent coil pair mapping, e.g., 1A/1B = Coil A, 2A/2B = Coil B).
- Remove/clean any stale motor nets left from prior connector replacement.
2. Restore/verify 12V input connectivity after connector replacement:
- Confirm VIN_12V net still connects to J1 pins and to U4 VIN, U2 VMOT, and input bulk capacitor.
- If any VIN_12V connections were destroyed by J1 replacement, reconnect them.
3. Complete LM2596 power stage correctly for fixed 5V part:
- Tie U4 FEEDBACK to OUTPUT per LM2596 fixed-output datasheet (currently FEEDBACK is incorrectly tied to GND).
- Add/verify catch diode (Schottky) from switch node to ground and ensure correct polarity.
- Add/verify output/input capacitor ESR suitability (or at least add notes/properties if using generic caps).
4. I2C level-translation review:
- Confirm OLED module VCC pin is truly 3.3V-compatible or requires 5V; if module is 5V-only, add level shifter or power it from 3.3V and update rail accordingly.
5. Sensor block refinement (flagged ambiguity):
- Decide whether BPW34 needs a transimpedance amplifier (TIA) instead of simple load resistor; if yes, select op-amp and implement TIA + filtering.
- Confirm IR LED drive current targets; adjust R1–R5 values and consider adding a transistor/MOSFET driver if GPIO-controlled modulation is required.
6. Power-path architecture decision and schematic update:
- Decide whether battery should provide backup to system 5V (OR-ing/ideal diode) or remain standalone.
- If backup required, add power-path OR-ing (ideal diode controller or Schottky diodes) and connect BAT_SW into the system supply (likely into 5V rail via boost or into VIN via buck/boost), as appropriate.
7. Schematic QA:
- Run connectivity review: ensure all required pins are powered, grounds are common, unused pins are handled (MS1/MS2/MS3/reset/sleep already strapped), and no shorted nets.
- Add labels/notes for medical-device safety review (isolation/ESD/fusing) as needed.
Notes:
- Some earlier connections were miswired and corrected; re-check netlist around I2C and motor connector after final wiring.
- The power connector J1 was replaced mid-stream; verify VIN_12V net integrity.
Working on your request...
10:30
Architecture Decisions
Open Review Items
Reviews
Documents
Design Notes
Assets
Assets are files uploaded to this project which can be used in various ways.
Properties
Properties describe core aspects of the project.
Pricing & Availability
Distributor | Qty 1 |
|---|---|
Arrow | $8.14–$13.93 |
Digi-Key | $27.17–$30.02 |
LCSC | $9.22–$9.82 |
Mouser | $19.40–$19.48 |
TME | $6.64 |
Verical | $8.11–$32.06 |
Controls
Welcome 👋
Flux helps you build PCBs faster with an AI teammate!
Create your account to collaborate, stay updated, fork your own version, and get instant answers from our AI agent.

AI-Powered Component Placement
Let AI place your components intelligently. AI Placement analyzes your schematic and positions components for optimal routing, signal integrity, and board density.
From Schematic to Layout in Seconds
Skip the tedious manual placement. AI Placement generates a starting layout you can refine, saving hours of repetitive work on every new design.
Works With Auto-Layout
Pair AI Placement with Auto-Layout for a complete AI-driven PCB design flow — from component placement through trace routing, all with one click.