MustafaMulla29/rp2040-bldc-motor-controller-new
A USB‑C PD–powered RP2040 BLDC motor controller PCB with 3.3 V logic, MCT8329A sensorless commutation, three MOSFET half-bridges, protected power switching, USB data, controls, and motor connectors.
- Version
- 0.3.82
- License
- unset
- Stars
- 0
circuit/usb-ports.tsx
import { usbCFootprint, usbCPinLabels, usbCCadModel } from "./usb-c-footprint"
import { PMEG4010CEH_115 } from "../imports/PMEG4010CEH_115"
import { schAt, net, Passives, type Passive } from "./helpers"
const programmingPassives: Passive[] = [
{ name: "R130", kind: "R", value: "5.1k", a: "PROG_CC1", b: "GND", x: 0, y: 0 },
{ name: "R131", kind: "R", value: "5.1k", a: "PROG_CC2", b: "GND", x: 0, y: 0 },
{ name: "R133", kind: "R", value: "100k", a: "PROG_VBUS", b: "PROG_PRESENT", x: 0, y: 0 },
{ name: "R134", kind: "R", value: "100k", a: "PROG_PRESENT", b: "GND", x: 0, y: 0 },
{ name: "C130", kind: "C", value: "1uF", a: "PROG_VBUS", b: "GND", volts: 10, x: 0, y: 0 },
]
/** J1 is the 5 V programming port. J19 is the independent PD sink.
* D2 and D5 diode-OR PD and programming power into LOGIC_IN.
* No programming-VBUS copper connects to PD9 or the motor bus.
*/
export function SeparateUsb() {
return <>
<connector name="J19" standard="usb_c" manufacturerPartNumber="TYPE-C-31-M-12"
supplierPartNumbers={{ jlcpcb: ["C165948"] }} pinLabels={usbCPinLabels} footprint={usbCFootprint} cadModel={usbCCadModel} {...schAt("J19", -16, 8)} pcbRotation={270}
noConnect={["SBU1", "SBU2", "DP1", "DP2", "DN1", "DN2"]}
connections={{ VBUS1: net("VBUS_RAW"), VBUS2: net("VBUS_RAW"),
GND1: net("GND"), GND2: net("GND"), EH1: net("GND"), EH2: net("GND"), EH3: net("GND"), EH4: net("GND"),
CC1: net("CC1"), CC2: net("CC2") }} />
<PMEG4010CEH_115 name="D5" pcbRotation={180} variant="schottky" schRotation={90} {...schAt("D5", -16, 3)}
connections={{ anode: net("PROG_VBUS"), cathode: net("LOGIC_IN") }} />
<Passives parts={programmingPassives} sx={-14} sy={-20} />
</>
}