MustafaMulla29/rp2040-bldc-motor-controller
Hardware assembly metadata and PCB geometry for a controller board with a snap-off rotary-encoder section, plus four parallel 150 µF/50 V bulk electrolytic capacitors filtering the motor supply.
- Version
- 2.0.40
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone MustafaMulla29/rp2040-bldc-motor-controller # download the package files into ./rp2040-bldc-motor-controller
tsci add MustafaMulla29/rp2040-bldc-motor-controller # add it to your project as @tsci/MustafaMulla29.rp2040-bldc-motor-controllerIn 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.
circuit/power-switch.tsx
import { TPS1H100AQPWPRQ1 } from "../imports/TPS1H100AQPWPRQ1"
import { SK_22D03_G080 } from "../imports/SK_22D03_G080"
import { SS54 } from "../imports/SS54"
import { BZT52C4V7 } from "../imports/BZT52C4V7"
import { schAt, net, Passives, type Passive } from "./helpers"
// TI TPS1H100-Q1: Fig. 45 and the 470 uF inrush example, Fig. 48.
// OFF removes motor power and asynchronously clears the re-arm latch. USB logic remains available.
const parts: Passive[] = [
{name:"R140",kind:"R",value:"10k",a:"PD_LOAD",b:"POWER_ON_LEVEL",x:0,y:0},
{name:"R141",kind:"R",value:"22k",a:"POWER_ON_LEVEL",b:"GND",x:0,y:0},
// R142 is only U11's inrush and short-circuit guard. It is set above the 3 A USB-PD contract so
// U11 never caps the motor: 1.233 V x 2000 / 680 Ω = 3.63 A nominal, 3.06-4.22 A with TI's ±14%
// (Table 6.5) and a 2% resistor allowance. Motor current is limited in software instead:
// INPUT_LIMIT_MA in firmware/power_policy.py and the MCF8329A ILIMIT setting.
// (2 kΩ stopped a propeller test near 1.2 A; 1.2 kΩ limited at about 2 A.)
{name:"R142",kind:"R",value:"680",a:"POWER_CURRENT_LIMIT",b:"GND",x:0,y:0},
{name:"R143",kind:"R",value:"10k",a:"VMOTOR",b:"GND",x:0,y:0},
{name:"R144",kind:"R",value:"100k",a:"POWER_SWITCH_EN",b:"GND",x:0,y:0},
{name:"C140",kind:"C",value:"100nF",a:"PD_LOAD",b:"GND",x:0,y:0,footprint:"0402",volts:50},
{name:"C141",kind:"C",value:"1uF",a:"PD_LOAD",b:"GND",x:0,y:0,footprint:"0805",volts:50},
]
export function PowerSwitch() {
return <>
{/* SK-22D03-G080 right-angle DPDT: the body sits on the left PCB edge and its
8 mm lever passes through the case wall, ending ~1.2 mm proud of the outside
(handheld-console style). Same pole/throw order and lever sides as before:
commons 2 and 5; pin-1/4 side (+Y) is OFF. Pins 7/8 are mounting legs. */}
<SK_22D03_G080 allowOffBoard name="SW4" {...schAt("SW4",0,0)} noConnect={["pin6","pin7","pin8"]}
connections={{pin1:net("GND"),pin2:net("POWER_SWITCH_EN"),pin3:net("POWER_ON_LEVEL"),
pin4:net("GND"),pin5:net("REARM_RESET_N")}} />
<TPS1H100AQPWPRQ1 name="U11" {...schAt("U11",0,0)} noConnect={["pin1","pin4","pin11","pin14"]}
connections={{pin2:net("GND"),pin3:net("POWER_SWITCH_EN"),
pin5:net("VMOTOR"),pin6:net("VMOTOR"),pin7:net("VMOTOR"),
pin8:net("PD_LOAD"),pin9:net("PD_LOAD"),pin10:net("PD_LOAD"),
pin12:net("GND"),pin13:net("POWER_CURRENT_LIMIT"),pin15:net("GND")}} />
{/* Transient motor energy returns to the local TVS through D6, including OFF.
U12/Q7 block return current into USB. This is not a sustained braking load. */}
<SS54 name="D6" variant="schottky" {...schAt("D6",0,0)}
connections={{anode:net("VMOTOR"),cathode:net("PD_LOAD")}} />
<BZT52C4V7 name="D7" variant="zener" schSize="sm" {...schAt("D7",0,0)}
connections={{pin1:net("POWER_ON_LEVEL"),pin2:net("GND")}} />
<Passives parts={parts} sx={0} sy={0} />
</>
}