PhysBox Logo physbox.io
Sim-To-Real Technical Architecture

HIL Silicon, PCB Milling, Molds,
3D Printing & Laser/CNC Workflows.

An in-depth technical exploration of how PhysBox: Volt bridges physical ESP32/CYD microcontrollers, 2-layer copper PCB isolation milling, and live 3D co-simulation — and how PhysBox: Mesh and Etch turn Lattice, Sculpt, and OpenSCAD geometry into multi-material 3MF prints, separable silicone & slip-cast molds, timber joinery, and live WebSerial CNC/laser cuts.

HIL Microcontrollers, Co-Simulation & 2-Layer PCB Milling

Connect real ESP32 & CYD silicon in realtime, drive 3D MuJoCo motors and speaker enclosures live, and carve double-sided copper-clad boards with conductive Z heightmaps.

ESP32 CYD Hardware-In-The-Loop Laboratory Setup
Hardware-In-The-Loop (HIL): ESP32 CYD screen displaying real-time waveforms synchronized with PhysBox Volt circuit WASM solver.

Realtime HIL, Mesh Co-Sim & Copper CAM

In traditional EDA, schematic capture, firmware execution, mechanical loads, and board fabrication live in separate tools. PhysBox Volt unifies a realtime Serial & WebSocket HIL Bridge, synchronous XSPICE/Ngspice simulation, live Volt↔Mesh co-simulation, and direct WebSerial PCB milling.

Route single- or 2-layer copper boards with automatic copper flood and pad clearance rings, probe a 16-point conductive heightmap straight off the copper blank, and stream isolation, drilling, spoilboard flip-alignment pin holes, and SMD solder-paste stencils without leaving the tab.

Realtime HIL Bridge

Lookahead-buffered binary I/O frames keep MicroPython and C++ firmware synchronized in realtime with simulated rail thresholds.

Live Mesh Motor & Speaker Link

Bind NEMA 17 steppers, DC gearmotors, and Thiele-Small speakers in Volt directly to 3D joints and cavities in Mesh.

2-Layer Conductive PCB Milling

Probes a 4×4 Z heightmap using the V-bit on copper-clad FR4, drills spoilboard flip-alignment pins, and exports Gerbers or Etch paste stencils.

DC Bias, Bode & Power Checks

Read quiescent DC wire chips, sweep small-signal Bode magnitude/phase (−3 dB corner), and flag overloaded parts automatically.

MicroPython HIL Firmware Routine (hil_bridge.py)
import machine, time, select, sys

# Initialize high-speed UART for realtime PhysBox Volt HIL Bridge
uart = machine.UART(1, baudrate=460800, tx=22, rx=23)
adc = machine.ADC(machine.Pin(34))
dac = machine.DAC(machine.Pin(25))

print("[HIL] Connected to PhysBox Volt SPICE Engine")

while True:
    if select.select([sys.stdin], [], [], 0)[0]:
        cmd = sys.stdin.readline().strip()
        if cmd.startswith("DAC:"):
            val = int(cmd.split(":")[1])
            dac.write(val) # Update physical DAC output from WASM circuit model

    raw_val = adc.read()
    # Batch telemetry: ADC raw value + timestamp tick
    uart.write(f"ADC:{raw_val}:{time.ticks_us()}\n")
    time.sleep_us(500)

Timber, Multi-Sheet Laser & CNC Milling Pipeline

Unfold 3D enclosures and soft-goods patterns into multi-sheet Etch tabs, break frames into mortise-and-tenon timber setups, carve 3D reliefs, and stream GRBL G-code over WebSerial with Live Trim and Run-From recovery.

Laser Cutting & CNC Toolpath Workflow
Subtractive Pipeline: Interlocking finger joints, mortise-and-tenon timber setups, multi-sheet Etch nesting, and live WebSerial streaming.

Sheet Unfolding, Timber Breakdown, Relief CAM & Etch

Beyond additive printing, Mesh and Etch form a complete subtractive shop-floor pipeline for Laser Cutters (CO₂, diode, LightBurn) and CNC Routers (GRBL 1.1, FluidNC, grblHAL).

Unfold 3D panels with press-fit finger joints (or soft-goods nets with setbacks and glue tabs) straight into multi-sheet Etch tabs, break timber structures into CNC-mortised planks and tenons, machine indexed multi-face 3D solids and greyscale reliefs, and verify every setup in MuJoCo via Add Simulation before cutting stock.

Multi-Sheet Unfold & Soft Goods

Packs finger-jointed panels with dogbone reliefs or folded sheet/fabric patterns with glue tabs directly into tabbed Etch sheets.

Timber Joinery & Solid / Relief CAM

Generates mortise-and-tenon timber breakdowns, multi-setup solid roughing/finishing, and through-cut 3D relief toolpaths with tabs.

Living Hinges, Ornaments & Lace

Etch adds kerf-bent living hinges, perforations, procedural botanical vines, guilloché, fretwork lace, and spoilboard facing.

Crash-Proof Run From & Reloads

Running jobs survive page reloads, preserve Z datum across tool changes, and preview & resume cleanly from any G-code line.

Live Trim Mid-Job

Nudge feed, spindle and rapids while the cut is running — at the machine or remotely from your Job History page — without losing registration.

Generated GRBL G-Code & WebSerial Output (laser_panel_cut.gcode)
; Generated by PhysBox Mesh Laser & CNC Engine
; Machine Mode: LASER CUTTER | Stock Thickness: 3.00mm | Kerf: 0.15mm
; Interlocking Finger Joint Mode: TAB_SLOT | Corner Relief: DOGBONE
G90 (Absolute Distance Mode)
G21 (Metric Units)
M3 S1000 (Laser Power Active @ 100%)
G0 X0.00 Y0.00 Z5.00 F1500 (Safe Retract Move)

; Panel 1: Top Enclosure Plate [Finger Joint Contour]
G0 X12.50 Y10.00
G1 Z0.00 F800 (Plunge to Cut Depth)
G1 X87.50 Y10.00 F1200 (Cut Finger Tab Edge A)
G1 X87.50 Y14.50 (Tab Slot Overcut with Kerf Comp)
G1 X100.00 Y14.50
G1 X100.00 Y85.50
...
M5 (Laser Off)
G0 Z10.00 (Job Complete - WebSerial Stream Ended)

Tested & Supported Hardware Matrix

Verified microcontrollers, CNC routers, laser cutters, and browser controllers compatible out-of-the-box with PhysBox WebSerial streaming.

Hardware Category Supported Models / Controllers Transport / Protocol PhysBox Target App
HIL Microcontrollers ESP32, ESP32-S3, Cheap Yellow Display (CYD), Arduino Uno / Nano, Raspberry Pi Pico Realtime WebSerial (packed binary I/O frames) PhysBox Volt
CNC, PCB & Laser Controllers GRBL 1.1, FluidNC, grblHAL, CNC Shield v3, CO₂ & Diode Laser boards Realtime WebSerial (G-code, Live Trim & Run From) Etch, Volt & Mesh
3D Printers & Mold Slicers PrusaSlicer, Bambu Studio, OrcaSlicer, Cura Multi-Material 3MF & Z-Up Binary STL Export PhysBox Mesh
Browsers & Desktop Chrome, Edge, Brave, Opera (WebSerial) & PhysBox Native (Linux / Windows x64) WebAssembly, WebGL / Native OpenGL & USB Serial All PhysBox Apps

AI Agents Driving Fabrication & HIL

Through 250 Model Context Protocol (MCP) tools, AI agents like Claude Code and Gemini Antigravity inspect DFM tolerances, build Lattice/OpenSCAD geometry, generate separable molds, unfold multi-sheet panels, and sweep SPICE telemetry autonomously.

1

Model & Check DFM

Agents build Lattice cages or OpenSCAD parts and run automated DFM checks to verify wall thicknesses, draft angles, and print overhangs.

2

Simulate Multi-Physics

Agents step headless MuJoCo rollouts to test mechanical linkages, water buoyancy, compliant flexures, and coupled Volt motor loads.

3

Molds, Timber & Sheets

Agents generate C-clip pour boxes, one-piece gated casting patterns, slip-cast shells, timber joinery, or hand multi-sheet layouts directly to Etch.

4

Stream G-Code & Sweep

Agents derive safe CNC/laser toolpaths, verify simulated stock back in MuJoCo, and sweep Bode/transient traces in Volt.