rushabhcodes/usb-c-e-paper-display

USB-C powered RP2354B controller board with protected power regulation, EPD display interface and charge-pump rails, crystal timing, user/boot switches, status LEDs, and SWD test points.

Version
1.4.1
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone rushabhcodes/usb-c-e-paper-display  # download the package files into ./usb-c-e-paper-display
tsci add rushabhcodes/usb-c-e-paper-display    # add it to your project as @tsci/rushabhcodes.usb-c-e-paper-display

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.

scripts/render-docs.mjs

import { convertCircuitJsonToSchematicSvg, convertCircuitJsonToPcbSvg } from "circuit-to-svg"
import { readFileSync, writeFileSync } from "node:fs"
const circuit = JSON.parse(readFileSync("dist/index/circuit.json", "utf8")).filter(e => !e.type.startsWith("drawing_") && !e.type.startsWith("cad_") && !e.type.startsWith("system_"))
for (const [index, name] of ["usb-power", "rp2354b", "raw-panel", "core-power", "service"].entries()) {
  writeFileSync(`manufacturing/schematic-${index+1}-${name}.svg`, convertCircuitJsonToSchematicSvg(circuit, {schematicSheetId: circuit.find(e => e.type === "schematic_sheet" && e.sheet_index === index+1).schematic_sheet_id, width: 1800, height: 1273, includeVersion: false}))
}
for (const layer of ["top", "bottom"]) {
  writeFileSync(`manufacturing/pcb-${layer}.svg`, convertCircuitJsonToPcbSvg(circuit, {layer, width: 1800, height: 1080, showSolderMask: true, includeVersion: false, shouldDrawErrors: false, shouldDrawWarnings: false, backgroundColor: "#15181b", colorOverrides: {copper: {top: "#c6a66b", bottom: "#bd9f69"}, drill: "#15181b", substrate: "#1c2023", soldermask: {top: "#24282b", bottom: "#24282b"}, soldermaskWithCopperUnderneath: {top: "#303639", bottom: "#303639"}, soldermaskOverCopper: {top: "#303639", bottom: "#303639"}, silkscreen: {top: "#efece1", bottom: "#efece1"}}}))
}
const assembly = circuit.filter(e => !["pcb_trace", "pcb_via", "pcb_copper_pour"].includes(e.type))
writeFileSync("manufacturing/assembly-top.svg", convertCircuitJsonToPcbSvg(assembly, {
  layer: "top", width: 1800, height: 1080, showSolderMask: false,
  showCourtyards: true, includeVersion: false,
}))