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.
enclosure/oled-mechanics.ts
// ER-OLED015-2W manufacturer drawing p.2: stock 36 +/-0.5 mm FPC.
// Molex insertion 1.58 mm (1.87 mm is open actuator height); mouth local Y=-2.
// Contact center Z=PCB top+0.55 from nominal CAD section; sample must qualify.
// Nominal bend study only: the 2 mm bend radius is NOT a manufacturer guarantee.
export const oled = {
part:"ER-OLED015-2W",connector:"5034802400",x:-19.5,
activeY:51.852,activeWidth:35.052,activeHeight:17.516,
panelY:50.0,panelWidth:42.04,panelHeight:27.22,panelBottom:17.35,panelTop:18.8,
adhesiveX:20.0,adhesiveWidth:1,adhesiveLength:16,adhesiveThickness:.2,
tailWidth:12.5,tailLength:36,stiffenerLength:4.5,tailThickness:.15,stiffenerThickness:.3,
connectorX:-19.5,connectorY:51.09761102,connectorRotation:0,contactZ:1.35,mouthY:49.09761102,insertion:1.58,
// Datasheet p.2 side view: the flex is bonded BETWEEN the two glass sheets, so it leaves
// the panel edge about 0.7 mm above the rear face (0.7 mm front sheet assumed; measure a
// sample). The straight run before the first bend is derived so the tip still seats 1.58 mm.
tailExitZ:18.03,bendRadius:2,
holderBottom:15.65,holderTop:17.15,seatBottom:19.0,
bossTop:19.0,insertBottom:15.8,insertTop:18.8,insertHoleBottom:15.65,
screwSeat:14.15,screwLength:4,screwHeadHeight:1.3,
// Opposite-corner retention; the upper-right alternative conflicts with J11.
holderScrews:[[-43.5,61],[4.5,39]] as [number,number][],
} as const
export function oledTailPath():[number,number][] {
const y=oled.panelY-oled.panelHeight/2,z=oled.tailExitZ,r=oled.bendRadius
const h=oled.tailLength-oled.stiffenerLength-(z-oled.contactZ-2*r)-Math.PI*r
const rootStraight=oledRootStraight()
const a=y-rootStraight,points:[number,number][]=[[y,z],[a,z]]
for(let i=1;i<=24;i++){const t=i*Math.PI/48;points.push([a-r*Math.sin(t),z-r+r*Math.cos(t)])}
points.push([a-r,oled.contactZ+r])
for(let i=1;i<=24;i++){const t=i*Math.PI/48;points.push([a-r*Math.cos(t),oled.contactZ+r-r*Math.sin(t)])}
points.push([a+h-rootStraight,oled.contactZ])
points.push([a+h-rootStraight+oled.stiffenerLength,oled.contactZ])
return points
}
/** Straight run from the glass edge before the first bend, for the full stock flex length. */
export function oledRootStraight(){
const y=oled.panelY-oled.panelHeight/2,z=oled.tailExitZ,r=oled.bendRadius
const h=oled.tailLength-oled.stiffenerLength-(z-oled.contactZ-2*r)-Math.PI*r
return (y+h+oled.stiffenerLength-(oled.mouthY+oled.insertion))/2
}