imrishabh18/rp2040-motor-controller
This circuit incorporates a USB-C Power Delivery (PD) interface with a CH224K controller, a WJ500V-5.08-04P motor output connector, multiple power conditioning components including capacitors, resistors, diodes, and an RP2040 microcontroller, to manage motor control, signal routing, and power management for a USB-powered stepper motor system.
- Version
- 1.0.14
- License
- unset
- Stars
- 0
scripts/render-schematic.tsx
import { Circuit } from "tscircuit";
import { convertCircuitJsonToStackedSchematicSheetsSvg } from "circuit-to-svg";
import { mkdirSync, writeFileSync } from "node:fs";
import Board from "../index.circuit";
const circuit = new Circuit({ platform: { pcbDisabled: true } });
circuit.add(<Board routingDisabled />);
await circuit.renderUntilSettled();
const json = circuit.getCircuitJson();
mkdirSync("dist/schematic", { recursive: true });
writeFileSync("dist/schematic/circuit.json", JSON.stringify(json, null, 2));
writeFileSync("dist/schematic/schematic.svg", convertCircuitJsonToStackedSchematicSheetsSvg(json, { width: 1400 }));
console.log(json.filter(e => e.type.endsWith("_error") || e.type === "schematic_element_outside_sheet_warning"));