PCB thickness is chosen when ordering; it is not determined automatically by the schematic.
For this controller, select:
Finished PCB thickness: 1.6 mm
Copper weight: 1 oz
Layers: 2
1.6 mm is the common default and is strong enough for the ESP32 sockets, headers, and wiring. It also works with most ordinary mounting hardware and enclosures.
You can verify the selected thickness in three places:
The PCB manufacturer’s order form under PCB Thickness.
The manufacturer’s final order summary.
With digital calipers after receiving the board; a nominal 1.6 mm board may measure slightly above or below 1.6 mm because of manufacturing tolerance.
Do not confuse board thickness with copper thickness. “1 oz copper” is about 35 µm (0.035 mm) per copper layer.
Can you add me a couple screw holes? Use as small of an amount of ACU's as possible. Don't go rearranging the whole board just like 1-2 holes to pin it down will suffice in the already empty areas
I’ll inspect the board once, place two small mounting holes in existing clear corners without moving components or traces, then run only the targeted clearance checks.
Added two 3.2 mm non-plated mounting holes for M3 screws in the open lower-right area. No components or routing were moved, and the targeted clearance/edge checks are clean.
Therefore the external 12V→5V buck must be rated ≥1A continuous, with sensible thermal margin. At 5W output and an assumed 90% efficiency, 12V input current is about 0.46A. The controller uses 5V only at the DevKit VIN/5V input; 3V3 is generated on the DevKit.
12V motor path
The actuator draws 3A. The 12V source, external L298N supply wiring, actuator wiring, fuse/protection, and connectors must support at least 3A continuous and should be selected for startup/stall margin. The controller PCB carries only L298N logic signals and common ground; no 3A motor path is routed through it.
GPIO and Circuit Decisions
GPIO5 MOTOR_PWM: series resistance only; no pull-up/down, preserving reset strap behavior and high impedance.
GPIO32/33: 10k pulldown to GND; buttons connect to 3V3. These remain RTC/deep-sleep wake capable.
GPIO14: 10k pulldown means default LOW = security enabled. Closing the disable switch connects GPIO14 to 3V3, producing HIGH = security disabled.
GPIO36 photoresistor: 3V3 divider with ~10k fixed resistor, RC filtering, series input resistance, and low-capacitance 3.3V ESD clamp at the cable interface.
GPIO39 break beam: verified OPL530-OC receiver runs from 5V and has an open-collector output pulled to 3.3V through 10k. Its datasheet specifies output HIGH with light and LOW with no light, so beam interruption is active LOW. Existing analogRead() with blocked <500 happens to match that polarity, but digitalRead() is the correct API.
GPIO21 emitter illumination: GPIO controls a transistor/MOSFET; it does not source emitter current directly.
LED Resistor Calculation
For a modest 3–5mA target at 3.3V:
Red LED, assumed Vf ≈1.9V: R=(3.3−1.9)/0.004≈350Ω → choose 360Ω.
Green LED, assumed Vf ≈2.1V: R=(3.3−2.1)/0.004≈300Ω → choose 300Ω (or nearest sourced value).
Actual Vf and brightness are verified against the selected LED datasheet.
Selected 150120RS75000 red 1206 LED has Vf about 2.0V nominal, so 360Ω gives about 3.6mA. Selected AP3216MGC green 1206 LED has Vf about 2.1V nominal, so 330Ω gives about 3.6mA. Existing R1/R2 values therefore remain appropriate for the 3–5mA target.
IRLML6244TRPBF: 27mΩ maximum RDS(on) specified at VGS=2.5V; suitable for the ~19mA emitter load.
IR26-21C_L110_TR8: 940nm emitter, matched spectrally to the 935nm receiver family; driven from 5V through 200Ω.
PESD5V0U1UA: five individual unidirectional ESD diodes, each cathode to its cable signal and anode to GND; 5V working standoff and 2pF typical capacitance preserve normal 3.3V GPIO/ADC operation.
Outdoor Cabling
Use short ground-referenced cable runs where possible. Place series resistance and TVS/ESD clamps at connector entry, then RC filtering near ESP32 inputs. Avoid exposing ESP32 pins directly to outdoor wiring.
Amateur Hand-Assembly Package Audit
R1–R16: canonical SMD_1206_3216Metric, with 0.25W minimum rating recorded; resistance values, tolerance entries, roles, and nets retained.
C2/C4/C5 (100nF), C6 (10nF), and C3 (10uF): canonical SMD_1206_3216Metric; capacitance, voltage ratings, filtering/decoupling roles, and nets retained.
C1: 100uF, 10V aluminum electrolytic in compact radial through-hole CP_Radial_D5.0mm_P2.00mm; polarity is 5V rail to P1 and GND to P2.
J1–J4 and J6–J11 remain 2.54mm through-hole headers/sockets. Off-board reference connectors remain excluded from PCB/BOM as previously designed.
Q1 remains SOT-23 because it is compact, has exposed gull-wing leads, and is practical with a fine-tip iron; changing it would add unnecessary active-part risk.
D1/D2 are verified red/green 1206 chip LEDs with accessible end terminations.
D4–D8 are individual PESD5V0U1UA unidirectional ultra-low-capacitance ESD diodes. No suitable verified low-capacitance SOD-123/SOD-123FL part was available in the Flux library, so the permitted SOD-323 fallback is documented here. Each device has two exposed leads and protects one cable signal to GND.
The smallest assembled package is now SOD-323 (D4–D8). Q1 remains exposed-lead SOT-23; all generic resistors and small ceramics are 1206, and no DFN/WLCSP/leadless-array package remains on the assembled controller PCB.
Supply TVS devices remain omitted because the external 12V-to-5V converter already supplies input over/under-voltage guarding. Local C1/C2 bulk and high-frequency bypass remain.