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/sheets.tsx
import { Fragment } from "react"
import sheetSizes from "../data/schematic-sheet-sizes.json"
const sheets: [string, string][] = [
["guide", "1 Connection guide"],
["power_input", "2 Power input: USB-PD sink, input eFuse, 5 V, 3.3 V AON"],
["safety", "3 Safety: stop loop, Linux watchdog, output enable latch"],
["supervisor_A", "4 Supervisor A (PD OUT 4, PD OUT 3)"],
["supervisor_B", "5 Supervisor B (PD OUT 2, PD OUT 1)"],
["pd_out_1", "6 PD OUT 1 power port"], ["pd_out_2", "7 PD OUT 2 power port"],
["pd_out_3", "8 PD OUT 3 power port"], ["pd_out_4", "9 PD OUT 4 power port"],
["mpu", "10 T113-S3 Linux SoC"], ["emmc", "11 microSD boot storage"],
["pmic", "12 SoC power and reset"], ["usb_hub", "13 USB 2.0 hub"], ["usb_ports", "14 USB data ports"],
["debug", "15 Debug console, reset, LEDs"],
]
/** Number of schematic sheets (the guide sheet shows it in its title). */
export const SHEET_COUNT = sheets.length
/** Sheet sizes come from tools/sch-layout.py and tools/sch-notes.py; a sheet without parts (the guide) is A3. */
const sizeOf = (name: string) => (sheetSizes as Record<string, { width: number; height: number }>)[name] ?? { width: 420, height: 297 }
export const Sheets = () => (
<>
{sheets.map(([name, displayName], i) => (
<Fragment key={name}><schematicsheet name={name} displayName={displayName} sheetIndex={i} sheetWidth={sizeOf(name).width} sheetHeight={sizeOf(name).height} /></Fragment>
))}
</>
)