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/controls.tsx

import { schAt, net } from "./helpers"
import { TS_1187A_B_A_B } from "../imports/TS_1187A_B_A_B/TS_1187A_B_A_B"
import { RK09K1130A8G } from "../imports/RK09K1130A8G/RK09K1130A8G"

// XKB drawing: A/B are permanently common; C/D are common.
// Pressing the normally-open switch joins those two terminals.
export function BoardButton({name, signal}: {name: string; signal: string}) {
  return <TS_1187A_B_A_B name={name} {...schAt(name,0,0)}
    internallyConnectedPins={[["pin1","pin2"],["pin3","pin4"]]}
    connections={{pin1:net(signal),pin2:net(signal),pin3:net("GND"),pin4:net("GND")}} />
}


// Alps pin 2 is the wiper; pin 1 is the counterclockwise end.
// CW therefore raises the command voltage. Case tabs are mechanical NCs.
export function SpeedControl() {
  return <RK09K1130A8G name="RV1" {...schAt("RV1",0,0)}
    noConnect={["pin4","pin5"]}
    connections={{pin1:net("GND"),pin2:net("THROTTLE_IN"),pin3:net("V3V3")}} />
}