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-controller

In 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.

imports/ER_CON30HT_1.tsx

import {Fragment} from "react"
import type { ChipProps } from "@tscircuit/props"
import { jscad, renderToJscadPlan } from "jscad-fiber/headless"
// ER-CON30HT-1 manufacturer's 2012-07-20 land drawing. 30 x 0.5 mm,
// top contacts, 0.30 mm FPC. Pin 1 at left, display face up, tail toward -Y.
const labels = ["GND1","C2P","C2N","C1P","C1N","VBAT","NC","VSS","VDD","BS0","BS1","BS2","CS_N","RESET_N","SA0","RW_N","RD_N","SCL","SDA_IN","SDA_OUT","D3","D4","D5","D6","D7","IREF","VCOMH","VCC","VLSS","GND30","SH1","SH2"]
export function ER_CON30HT_1(props: ChipProps) {
 return <chip manufacturerPartNumber="ER-CON30HT-1" pinLabels={Object.fromEntries(labels.map((n,i)=>[`pin${i+1}`,[n]]))}
 footprint={<footprint>
 {Array.from({length:30},(_,i)=><Fragment key={i}><smtpad portHints={[`pin${i+1}`]} pcbX={-7.25+i*.5} pcbY={0} width={.3} height={1.25} shape="rect"/></Fragment>)}
 {[-1,1].map((s,i)=><Fragment key={i}><smtpad portHints={[`pin${31+i}`]} pcbX={s*8.79} pcbY={2.325} width={2} height={3} shape="rect"/></Fragment>)}
 <courtyardrect pcbX={0} pcbY={2.2} width={22.1} height={6.15}/>
 <silkscreenpath route={[{x:-8.1,y:5.1},{x:8.1,y:5.1}]}/>
 <silkscreentext text="OLED / CONTACTS UP" pcbX={0} pcbY={5.9} fontSize={1}/>
 <silkscreentext text="1" pcbX={-7.25} pcbY={-1.15} fontSize={1}/>
 </footprint>}
 // Keep the contact-row datum; auto-centering on the body moves it 2.7 mm.
 cadModel={{modelOriginPosition:{x:0,y:0,z:0},jscad:renderToJscadPlan(<>
 <jscad.colorize color="#bbbdb7"><jscad.subtract><jscad.cuboid size={[20.65,4.5,2]} center={[0,2.7,1]}/><jscad.cuboid size={[15.6,4.1,.4]} center={[0,3,1]}/></jscad.subtract></jscad.colorize>
 <jscad.colorize color="#383b3e"><jscad.cuboid size={[19.35,1,.6]} center={[0,4.45,1.7]}/></jscad.colorize>
 {Array.from({length:30},(_,i)=><jscad.colorize key={i} color="#b8b7ac"><jscad.cuboid size={[.2,1,.15]} center={[-7.25+i*.5,0,.1]}/></jscad.colorize>)}
 </>)}} {...props}/>
}