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-driver

In 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.

src/assembly/general-pd-assembly.tsx

import { assembly } from "tscircuit"
import { GeneralPdDriverBoard } from "../board/general-pd"
import { assemblyParts } from "./models"

// External wiring and hardware are CAD-only. Use the board entrypoint for
// fabrication files and the assembly entrypoint for the installed parts.
export function GeneralPdDriverAssembly({ schematicDisabled = false }: { schematicDisabled?: boolean } = {}) {
  return <assembly.device name="GENERAL_PD_ASSEMBLY">
    <GeneralPdDriverBoard schematicDisabled={schematicDisabled} />
    {assemblyParts.map(({ partName, displayName, position: [x, y, z], model }) =>
      <assembly.part key={partName} name={partName} displayName={displayName}
        cadModel={{ jscad: model, positionOffset: { x, y, z },
          modelOriginPosition: { x: 0, y: 0, z: 0 }, modelUnitToMmScale: 1 }} />)}
  </assembly.device>
}