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/encoder.tsx
import { S5B_PH_SM4_TB_LF__SN_ } from "../imports/S5B_PH_SM4_TB_LF__SN_"
import { SN74LVC3G17DCUR } from "../imports/SN74LVC3G17DCUR"
import { TPD4E05U06DQAR } from "../imports/TPD4E05U06DQAR"
import { BSMD1206_010_60V } from "../imports/BSMD1206_010_60V"
import { PMEG4010CEH_115 } from "../imports/PMEG4010CEH_115"
import { net, schAt, Passives, type Passive } from "./helpers"
// One external sensor: quadrature A/B/Z OR Hall U/V/W. Single-ended 0–5 V
// signals only, common ground. Not a differential/RS-422 or 12/24 V input.
// 3V3 auxiliary output is fused; externally powered 5 V sensors leave pin 1 open.
const parts: Passive[] = [
...["A", "B", "Z"].flatMap((channel, i): Passive[] => [
{name:`R${160+i}`,kind:"R",value:"1k",a:`ENC_${channel}_EXT`,b:`ENC_${channel}_FILTER`,x:0,y:0,footprint:"0402"},
// D10 isolates the pull-up bus from 3V3 when an external sensor is powered
// while the controller is off; the buffer itself also supports Ioff.
{name:`R${163+i}`,kind:"R",value:"10k",a:"ENC_PULLUP",b:`ENC_${channel}_FILTER`,x:0,y:0,footprint:"0402"},
{name:`C${160+i}`,kind:"C",value:"100pF",a:`ENC_${channel}_FILTER`,b:"GND",x:0,y:0,footprint:"0402",volts:50},
]),
{name:"C163",kind:"C",value:"100nF",a:"V3V3",b:"GND",x:0,y:0,footprint:"0402",volts:16},
{name:"C164",kind:"C",value:"1uF",a:"ENC_3V3",b:"GND",x:0,y:0,footprint:"0603",volts:10},
]
export function EncoderInterface() {
return <>
<S5B_PH_SM4_TB_LF__SN_ name="J20" {...schAt("J20",0,0)}
connections={{pin1:net("ENC_3V3"),pin2:net("GND"),pin3:net("ENC_A_EXT"),pin4:net("ENC_B_EXT"),pin5:net("ENC_Z_EXT"),pin6:net("GND"),pin7:net("GND")}} />
<BSMD1206_010_60V name="F2" {...schAt("F2",0,0)} connections={{pin1:net("V3V3"),pin2:net("ENC_3V3")}} />
<PMEG4010CEH_115 name="D10" {...schAt("D10",0,0)} connections={{anode:net("V3V3"),cathode:net("ENC_PULLUP")}} />
<SN74LVC3G17DCUR name="U14" {...schAt("U14",0,0)} connections={{
pin1:net("ENC_A_FILTER"),pin7:net("ENC_A"),pin3:net("ENC_B_FILTER"),pin5:net("ENC_B"),
pin6:net("ENC_Z_FILTER"),pin2:net("ENC_Z"),pin4:net("GND"),pin8:net("V3V3")}} />
<TPD4E05U06DQAR name="D9" {...schAt("D9",0,0)} noConnect={["pin6","pin7","pin9","pin10"]}
connections={{pin1:net("ENC_A_EXT"),pin2:net("ENC_B_EXT"),pin4:net("ENC_Z_EXT"),pin5:net("ENC_3V3"),pin3:net("GND"),pin8:net("GND")}} />
<Passives parts={parts} sx={0} sy={0}/>
</>
}