Lower board: phototransistor and pulldown, aligned mechanically with LEDs.
Interfaces and Connections
USB-C: VBUS, GND, D+, D-, CC1, CC2.
USB data: D+ to ESP32-C3 GPIO19, D- to GPIO18.
I2C: OLED SDA to GPIO8, SCL to GPIO9.
LED outputs: GPIO4 red, GPIO5 IR.
ADC input: phototransistor emitter node to GPIO0.
Inter-board connector: 3.3 V, GND, ADC signal.
Power and Runtime Expectations
USB-C 5 V input when charging/programming.
LiPo battery powers device through switch and 3.3 V LDO.
Low-power firmware should duty-cycle LEDs, OLED, and radios.
Power Tree and Power Budget
Initial estimate to be updated from datasheets during implementation: USB-C 5 V -> charger/protection -> LiPo -> switch -> AP2112K 3.3 V -> ESP32-C3, OLED, LEDs, phototransistor.
Manufacturing and Assembly Expectations
Compact SMD design suitable for consumer prototype. Two small PCBs connected by 3-wire cable/JST connector. Antenna keepout required for ESP32-C3 module.
Firmware-Relevant Hardware Requirements
Native USB programming on GPIO18/GPIO19.
ADC sampling on GPIO0.
I2C OLED on GPIO8/GPIO9.
GPIO-controlled LED timing on GPIO4/GPIO5.
Physical Design Expectations
Upper board sits on top of clip with LEDs pointing downward. Lower board sits below with phototransistor aligned to LEDs. ESP32-C3 antenna must face outward at board edge with copper keepout.
Important Design Decisions
ESP32-C3 module preferred over bare chip to avoid RF design risk.
USB-C is sink-only, no USB-PD controller unless later requested.
LiPo charging follows user's TP4056 architecture, but true load sharing/protection may require an enhanced charger/power-path IC.
Assumptions
Single-cell LiPo battery.
OLED is 3.3 V compatible I2C SSD1306-style module/display.
LEDs are GPIO-driven at modest current; exact current may be adjusted for safe ESP32 GPIO limits.
User accepts SMD parts unless later requesting hand-solderable parts.
Change Notes
Revised from environmental sensor node to two-board optical clip design per user request.