PCB Design Basics


I can design the complete PCB, verify it, and generate manufacturing files—Gerbers, BOM, and assembly/placement files. I cannot purchase, physically assemble, or ship the board, but I can prepare it for ordering from a PCB manufacturer and guide you through checkout.
The schematic and PCB-layout work requires Agent mode. Click the Continue in Agent Mode button to begin.
Continue in Agent Mode
I’ll turn the verified breadboard circuit into a manufacturable through-hole PCB: first audit the existing schematic and connectors, then complete the board layout, route and validate it, and generate manufacturing files. I can prepare everything for ordering, but physical assembly and shipping must be handled by a PCB manufacturer or assembler.
I audited the project but could not start PCB mutations.
Current project state:
  • The schematic contains only the original single-PC817 test channel, not the final two-channel OPEN/CLOSE controller.
  • It currently includes one PC817, one 470 Ω input resistor, the temporary 10.11 kΩ test pull-up, three 2-pin headers, and two test points.
  • The PCB is still the oversized default 160 × 100 mm, 4-layer board with no finalized placement or routing.
Before manufacturing, it still needs:
  • A second PC817 and 470 Ω resistor
  • Final connectors for M5Stack PORT.B and both remote-button contacts
  • Removal of the temporary 10.11 kΩ test circuit
  • A compact, beginner-friendly 2-layer board outline
  • Component placement, routing, DRC/ERC verification
  • Gerber, BOM, and assembly documentation exports
A reasonable default would be a compact through-hole 30 × 50 mm, 2-layer PCB, with labeled connectors along the edges and all components on top for easy hand assembly. No board changes or manufacturing files were generated because execution stopped when your ACUs ran out.
Inspect project history
Document remaining work
Review current ERC
Prepare two-layer layout

Breadboard Wiring Layout

Beginner PC817 breadboard preview

Use the image as an orientation preview and the hole-by-hole tables below as the authoritative wiring instructions. Verify each connection before applying power.
Purpose
This is the physical breadboard layout for one PC817 test channel only. The Valvetronic remote stays disconnected during this test.
Breadboard Orientation
  • Put the breadboard lengthwise with the center trench running vertically.
  • Row letters A-E are on the left of the center trench; F-J are on the right.
  • Place the PC817 across the center trench.
  • Look at the PC817 from above with its dot/notch toward the top of the breadboard.
Exact PC817 Placement

Table


PC817 pinFunctionBreadboard hole
Pin 1LED anodeE20
Pin 2LED cathodeE21
Pin 4CollectorF20
Pin 3EmitterF21
Top-view orientation:

Text


             TOP OF BREADBOARD

             dot / notch
                  v
       left side       center gap       right side

       E20  Pin 1      |       |        Pin 4  F20
       E21  Pin 2      |       |        Pin 3  F21

             BOTTOM OF BREADBOARD
Important: DIP pin numbering runs counterclockwise. With the dot/notch at the top, pin 1 is upper-left, pin 2 lower-left, pin 3 lower-right, and pin 4 upper-right.
Control Side - Left Half Only
Use the M5Stack/control-side source or a separate regulated 3.3 V bench source.
  1. Put one lead of the 470 ohm resistor into A20. This shares a row with PC817 pin 1 at E20.
  2. Put the other resistor lead into any unused row, suggested A15.
  3. Connect the 3.3 V control wire to the resistor lead at row 15.
  4. Connect control ground to A21. This shares a row with PC817 pin 2 at E21.
Control path:

Text


3.3V GPIO/source -> 470 ohm resistor -> PC817 pin 1
control ground ----------------------> PC817 pin 2
Suggested wire colors:
  • Blue: GPIO/control signal.
  • Black: M5/control ground.
Isolated Test Side - Right Half Only
Use the CR2032 or another isolated approximately 3.0 to 3.3 V source. Do not connect this source's negative terminal to M5/control ground.
  1. Put one lead of the measured 10.11 kohm resistor into J20. This shares a row with PC817 pin 4 at F20.
  2. Put the other resistor lead into an unused row, suggested J15.
  3. Connect remote/test supply positive to the resistor lead at row 15.
  4. Connect remote/test supply negative to J21. This shares a row with PC817 pin 3 at F21.
Isolated output path:

Text


remote battery positive -> 10.11 kohm -> PC817 pin 4
remote battery negative ----------------> PC817 pin 3
Suggested wire colors:
  • Red or orange: isolated remote/test positive.
  • White or green: SW_HIGH collector test node at row 20.
  • Black on the right side only: isolated remote/test negative.
Complete Hole-by-Hole Table

Table


ConnectionFromTo
PC817 input LEDU1 pin 1E20
PC817 input returnU1 pin 2E21
PC817 emitterU1 pin 3F21
PC817 collectorU1 pin 4F20
470 ohm resistorA15A20
GPIO/control signalsource outputB15
M5/control groundsource groundA21
10.11 kohm resistorJ15J20
Remote/test positivebattery positiveI15
Remote/test negativebattery negativeJ21
Meter red probe for output testmeter redany open hole G20-J20
Meter black probe for output testmeter blackany open hole G21-J21
Rows 15 are arbitrary tie points. Any unused rows may replace them as long as each resistor still remains in series and does not accidentally short across a connected row.
Simplified Visual Map

Text


LEFT: M5 / CONTROL DOMAIN          RIGHT: ISOLATED REMOTE TEST DOMAIN

3.3V ----[470 ohm]---- row 20 ---- pin 1   pin 4 ---- row 20 ----[10.11k]---- +3.27V
GND ------------------ row 21 ---- pin 2   pin 3 ---- row 21 ---------------- 0V

                                      PC817
                               across center trench
There must be no jumper between the left and right ground rails. The only coupling between the two sides is light inside the PC817.
Multimeter Check Before Power
Set the meter to resistance or continuity mode and remove both power sources.
  1. Check between M5/control ground and remote/test negative. It should read open circuit/no beep.
  2. Check row E20 to PC817 pin 1 and E21 to pin 2. Each should have continuity through the breadboard row.
  3. Check row F20 to pin 4 and F21 to pin 3. Each should have continuity.
  4. Ensure the 470 ohm resistor measures close to 470 ohms and the pull-up measures close to 10.11 kohms when removed from the board or isolated from parallel paths.
Powered Measurements
Set the meter to DC volts.
GPIO/Input OFF
  • Red probe: PC817 pin 4 row, such as J20.
  • Black probe: PC817 pin 3 row, such as J21.
  • Expected result: approximately the isolated battery voltage.
GPIO/Input ON at 3.3 V
  • LED test: red probe on E20, black probe on E21. Expect roughly 1.0 to 1.3 V.
  • Input-resistor test: red probe at row 15 GPIO side, black probe at row 20 pin-1 side. Expect roughly 2.0 to 2.3 V.
  • Output test: red probe on J20, black probe on J21. Expect typically below approximately 0.3 V with the 10.11 kohm pull-up.
What Not to Connect Yet
  • Do not solder or connect the Valvetronic remote S1/S2 contacts yet.
  • Do not connect truck 12 V anywhere on this breadboard.
  • Do not connect Joying KEY1 or KEY2.
  • Do not join the two ground domains.
Matching Flux Schematic
The project schematic uses:
  • J1: GPIO_3V3 and M5_GND.
  • R1: 470 ohm input resistor.
  • U1: PC817C DIP-4.
  • J2: REMOTE_3V27 and REMOTE_GND.
  • R2: 10.11 kohm test pull-up.
  • J3/TP2: SW_HIGH output measurement.
The schematic and this layout describe the same circuit; the schematic shows electrical intent, while this file specifies physical breadboard holes.
  • Purpose

  • Breadboard Orientation

  • Exact PC817 Placement

  • Control Side - Left Half Only

  • Isolated Test Side - Right Half Only

  • Complete Hole-by-Hole Table

  • Simplified Visual Map

  • Multimeter Check Before Power

  • Powered Measurements

  • GPIO/Input OFF

  • GPIO/Input ON at 3.3 V

  • What Not to Connect Yet

  • Matching Flux Schematic