rushabhcodes/simple-usb-c-pd-peltier-driver
Reference-based four-layer USB-C PD Peltier driver with RP2040 control, adjustable voltage/current limits, fan power and temperature probes.
- Version
- 0.3.1
- License
- MIT
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone rushabhcodes/simple-usb-c-pd-peltier-driver # download the package files into ./simple-usb-c-pd-peltier-driver
tsci add rushabhcodes/simple-usb-c-pd-peltier-driver # add it to your project as @tsci/rushabhcodes.simple-usb-c-pd-peltier-driverIn a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
checks/tests.txt
$ bun test ./tests
bun test v1.3.3 (274e01c7)
tests/schematic.test.tsx:
(pass) readable functional schematics > all functional sheets use A4 styling and render without errors or schematic warnings [13.00ms]
(pass) readable functional schematics > every physical part and exposed debug pad has a finite, separated schematic symbol [9.00ms]
(pass) readable functional schematics > splitting the MCU drawing preserves one physical RP2040 and every real package pin [4.00ms]
(pass) readable functional schematics > capacitor package aliases remain usable when their schematic symbols rotate [6.00ms]
tests/routing.test.tsx:
(pass) complete PCB routing > routing preserves the original named pins, NC pins and electrical net partition [5.00ms]
(pass) complete PCB routing > actual copper joins every required pin with no shorts, floating copper or invalid pours
(pass) complete PCB routing > saved copper renders with finite coordinates, legal widths and physical through vias [1284.99ms]
(pass) complete PCB routing > the connector locator drills clear the copper pours and both outer layers retain 0.20 mm mask dams [633.99ms]
(pass) complete PCB routing > original crystal limits hold even for copper without source-trace associations [2.00ms]
(pass) complete PCB routing > main power corridors retain broad clipped copper and the fan header retains its 0.6 mm branch [30.00ms]
(pass) complete PCB routing > full-board native connectivity and geometry checks pass [6174.95ms]
tests/routing-metadata.test.ts:
(pass) only exact documented filled thermal pad/via pairs receive native exceptions [1.00ms]
(pass) drills require a 0.15mm solder-land web, including same-net vias and plated slots [2.00ms]
(pass) only the exact 13 thermal via-pad pairs waive the drill web [1.00ms]
(pass) saved source associations retain the original pin, named net and constraints [1.00ms]
(pass) a constrained source branch cannot be borrowed by a distant copper trunk
(pass) constrained endpoints may land inside pad copper away from the center
(pass) all pins of a constrained branch must be its physical endpoints [1.00ms]
tests/rebind-routing.test.ts:
(pass) rebinding regenerates IDs without changing copper or borrowing branch constraints [4.00ms]
(pass) a global trunk touching a capacitor does not inherit its local length limit [1.00ms]
(pass) rebinding rejects lost constraint ownership and ambiguous constrained sources [2.00ms]
(pass) multi-pin constraints require every endpoint and take priority over generic traces [1.00ms]
(pass) pour trunks prefer a source pin represented by reachable trace copper [4.00ms]
(pass) two-phase guard permits net renumbering but rejects changed source pins
(pass) compact serialization keeps exact coordinates and escaped source signatures [2.00ms]
tests/physical-copper.test.ts:
(pass) physical copper connectivity oracle > logical net and trace IDs do not connect isolated copper islands [2.00ms]
(pass) physical copper connectivity oracle > real copper joins required pins and ignores a genuinely unused pin [1.00ms]
(pass) physical copper connectivity oracle > current package flow-through conductors preserve the original source net partition [1.00ms]
(pass) physical copper connectivity oracle > bottom copper cannot contact top-only pads [1.00ms]
(pass) physical copper connectivity oracle > top-to-bottom barrels connect inner copper and arbitrary via IDs count [1.00ms]
(pass) physical copper connectivity oracle > native wire-to-via points include the copper leading into and out of a barrel [1.00ms]
(pass) physical copper connectivity oracle > through-pad paths require real plated copper between their two layers [2.00ms]
(pass) physical copper connectivity oracle > a repeated wire endpoint inside a drilled via is not a floating copper disk [1.00ms]
(pass) physical copper connectivity oracle > a pour hole isolates copper inside it [1.00ms]
(pass) physical copper connectivity oracle > touching an NC pad is an unintended connection [1.00ms]
(pass) physical copper connectivity oracle > source-net mutation remains visible even when copper connects the pins [1.00ms]
(pass) physical copper connectivity oracle > a 0.095 mm gap fails a 0.1 mm rule without a tolerance waiver [1.00ms]
tests/general-pd.test.tsx:
(pass) general USB-C PD Peltier driver > every placed part is sourced, with an error-free and separated placement [8.00ms]
(pass) general USB-C PD Peltier driver > output connectors reach the board edge with their full bodies clear of other parts [8.00ms]
(pass) general USB-C PD Peltier driver > both USB4110 footprints use the GCT tail order, SMT shell tabs and nonplated locators [13.00ms]
(pass) general USB-C PD Peltier driver > 20 V / 5 A PD qualification is the only input to the load converter [85.00ms]
(pass) general USB-C PD Peltier driver > the hardware CC loop measures a series shunt and the converter has both bootstrap paths [6.00ms]
(pass) general USB-C PD Peltier driver > fixed 12 V fan power is qualified-PD-only and matches the keyed PC fan header [31.00ms]
(pass) general USB-C PD Peltier driver > each powered probe has its own protected 1-Wire input and correctly numbered screw contacts [59.00ms]
(pass) general USB-C PD Peltier driver > reset and PD fault independently disable output while live logic has a 5 V driver bias [237.00ms]
(pass) general USB-C PD Peltier driver > programming USB powers logic through a reverse-blocking mux and exposes real recovery pads [247.00ms]
(pass) all board and footprint silkscreen is intentionally absent [1.00ms]
tests/assembly.test.tsx:
(pass) native Peltier assembly > the optional assembly contains native models for the module, cables, temperature probes and fan [1297.99ms]
(pass) native Peltier assembly > the mechanical assembly preserves the entire physical PCB and its electrical connections [238.00ms]
(pass) native Peltier assembly > accessory solids meet the real connector endpoints with correct TEC polarity and documented dimensions [4.00ms]
(pass) native Peltier assembly > both factory probe cables render three correctly colored conductors at the actual sensor terminals [48.00ms]
(pass) native Peltier assembly > manufacturer fan CAD and the four-wire factory plug match the real header without changing its NC signals [49.00ms]
(pass) native Peltier assembly > the two thermal contact faces meet the selected TEC
(pass) native Peltier assembly > the printable fan duct has a closed mesh with opposite winding at shared edges [4.00ms]
tests/stock-availability.test.ts:
(pass) the board uses its catalog engine even when the host ignores runtime project configuration [30.00ms]
(pass) unknown stock remains unknown, while zero and positive stock remain reportable [1.00ms]
(pass) a stalled lookup returns unknown before core's deadline and aborts its request [12.00ms]
(pass) the manufacturer footprint is compared, and an incorrect inductor footprint still warns [85.00ms]
(pass) core still emits a real zero-stock warning with the catalog adapter installed [24.00ms]
59 pass
0 fail
7391 expect() calls
Ran 59 tests across 8 files. [370.88s]