MustafaMulla29/usb-pd-motherboard
4-layer USB-C PD hub motherboard with 20 V USB-C input, Linux T113-S3 computer, CH338F USB hub, four individually controlled 5–20 V PD outputs, USB data/camera ports, regulated rails, and hardware watchdog/E-stop safety interlock.
- Version
- 1.0.24
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone MustafaMulla29/usb-pd-motherboard # download the package files into ./usb-pd-motherboard
tsci add MustafaMulla29/usb-pd-motherboard # add it to your project as @tsci/MustafaMulla29.usb-pd-motherboardIn 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.
circuit/power-copper.tsx
/**
* High-current copper (generated by tools/power-copper.ts -> power-copper.json):
* top-layer pours on each motor port's switch nodes, VBB_PRE/VBB/VBUS and the high-side
* VIN_SYS area, a top GND fill per port, and 0.6/0.3 mm via arrays into the VIN_SYS (inner2)
* and GND (inner1, bottom) planes. Pours listed later win where outlines meet.
*/
import { Fragment } from "react"
import data from "./power-copper.json"
// Pour clearance 0.203 (not 0.2) for the same reason as POUR_CLEARANCE in planes.tsx: stay off the 0.05 mm grid.
// POWER_COPPER_PORTS_ONLY=1 leaves out the power-input area (used while re-routing that area).
const keep = (e: { zone?: string }) => !(process.env.POWER_COPPER_PORTS_ONLY && e.zone === "input")
export const PowerCopper = () => (
<>
{data.pours.filter(keep).map((p) => (
<Fragment key={p.name}><copperpour name={p.name} connectsTo={`net.${p.net}`} layer="top" outline={p.outline} clearance={0.203} /></Fragment>
))}
{data.vias.filter(keep).map((v, i) => (
<Fragment key={`pv${i}`}><via name={`PV${i}`} pcbX={v.x} pcbY={v.y} fromLayer="top" toLayer="bottom" outerDiameter={v.d ?? 0.45} holeDiameter={0.3} connectsTo={`net.${v.net}`} /></Fragment>
))}
</>
)