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.

circuit/oled.tsx

import { MMBT3906LT1G } from "../imports/MMBT3906LT1G"
import { TAJA475K025RNJ } from "../imports/TAJA475K025RNJ"
import { A_0_5K_HX_24PWB } from "../imports/A_0_5K_HX_24PWB"
import { TLV61046ADBVR } from "../imports/TLV61046ADBVR"
import { TCA9538PWR } from "../imports/TCA9538PWR"
import { TCA9517DGKR } from "../imports/TCA9517DGKR"
import { LM66100DCKR } from "../imports/LM66100DCKR"
import { GVL0J332M1213 } from "../imports/GVL0J332M1213"
import { TLV70030DDCR } from "../imports/TLV70030DDCR"
import { TPS3808G33DBVR } from "../imports/TPS3808G33DBVR"
import { TPS3808G01DRVR } from "../imports/TPS3808G01DRVR"
import { SRN3015TA_100M } from "../imports/SRN3015TA_100M"
import { schAt, net, Passives, type Passive } from "./helpers"
// Isolated shutdown prototype. See docs/oled-power-margin-revision.md before assembly.
// U20 monitors the upstream rail while powered by the isolated OLED reservoir.
// Its RESET blanks the panel, resets U21 (P0 -> input), and isolates the I2C bus.
// U24 inhibits startup until the reservoir is charged. A fault clears P0's mode,
// Q16 makes P0 HIGH/input (including reset defaults) mean OFF. Only LOW enables.
// Power recovery cannot restart the boost without fresh initialization.
const parts = [
 {name:"C180",kind:"C",value:"100nF",a:"OLED_VDD",b:"GND",volts:25},
 {name:"C181",kind:"C",value:"100nF",a:"OLED_VCC",b:"GND",volts:25},
 {name:"C183",kind:"C",value:"4.7uF",a:"OLED_VCC",b:"GND",volts:25,footprint:"1206"},
 {name:"C184",kind:"C",value:"4.7uF",a:"OLED_VDD",b:"GND",volts:25,footprint:"0805"},
 {name:"C185",kind:"C",value:"1uF",a:"OLED_VDD_RAW",b:"GND",volts:25},
 {name:"C186",kind:"C",value:"4.7uF",a:"V3V3",b:"GND",volts:25,footprint:"0805"},
 {name:"C187",kind:"C",value:"1uF",a:"OLED_VCC",b:"GND",volts:50,footprint:"1206"},
 {name:"C188",kind:"C",value:"1uF",a:"V3V3",b:"GND",volts:25},
 {name:"C189",kind:"C",value:"100nF",a:"OLED_VDD",b:"GND",volts:25},
 {name:"C190",kind:"C",value:"100nF",a:"OLED_VDD",b:"GND",volts:25},
 {name:"R180",kind:"R",value:"910k",a:"OLED_IREF",b:"GND"},
 // Lower divider impedance discharges VCC without hard-clamping the panel.
 // R181 dissipates about 0.15 W; the former 0603 / 0.1 W land is inadequate.
 {name:"R181",kind:"R",value:"1k",a:"OLED_VCC",b:"OLED_FB",footprint:"1206",tolerance:"0.1%"},
 // 1% thin film (in stock in volume); with R181 at 0.1% the output stays 12.36-12.59 V.
 {name:"R182",kind:"R",value:"68.1",a:"OLED_FB",b:"GND",tolerance:"1%"},
 {name:"R183",kind:"R",value:"100k",a:"OLED_VDD",b:"OLED_RESET_N"},
 {name:"R184",kind:"R",value:"100k",a:"OLED_POWER_EN",b:"GND"},
 {name:"R185",kind:"R",value:"15",a:"OLED_VDD_RAW",b:"OLED_CHARGE",footprint:"2512",tolerance:"1%"},
 {name:"R186",kind:"R",value:"100k",a:"OLED_VDD",b:"OLED_HOLD_OK_N"},
 {name:"R187",kind:"R",value:"100k",a:"OLED_VDD",b:"OLED_RESET_CT"},
 {name:"R188",kind:"R",value:"4.7k",a:"OLED_VDD",b:"OLED_SCL"},
 {name:"R189",kind:"R",value:"4.7k",a:"OLED_VDD",b:"OLED_SDA"},
 {name:"R190",kind:"R",value:"10k",a:"OLED_POWER_REQUEST_N",b:"OLED_ENABLE_BASE"},
 {name:"R191",kind:"R",value:"100k",a:"OLED_VDD",b:"OLED_ENABLE_BASE"},
 // 0.405 V reference gives a nominal 2.628 V falling threshold. This change
 // is qualified together with the faster VCC discharge, never on its own.
 {name:"R192",kind:"R",value:"54.9k",a:"OLED_VDD",b:"OLED_READY_SENSE",tolerance:"0.1%"},
 {name:"R193",kind:"R",value:"10k",a:"OLED_READY_SENSE",b:"GND",tolerance:"0.1%"},
 {name:"C192",kind:"C",value:"100nF",a:"OLED_CHARGE",b:"GND",volts:25},
 {name:"C193",kind:"C",value:"100nF",a:"V3V3",b:"GND",volts:25},
 {name:"C194",kind:"C",value:"100nF",a:"OLED_VDD",b:"GND",volts:25},
 {name:"C195",kind:"C",value:"100nF",a:"OLED_VDD",b:"GND",volts:25},
 {name:"C196",kind:"C",value:"1nF",a:"OLED_POWER_EN",b:"GND",volts:25},
].map(p=>({...p,x:0,y:0})) as Passive[]
export function PlugInOled(){return <>
 <A_0_5K_HX_24PWB name="J21" {...schAt("J21",0,0)} noConnect={["pin4"]}
 connections={Object.fromEntries(Object.entries({pin1:"GND",pin2:"GND",pin3:"GND",pin5:"OLED_VDD",pin6:"OLED_VDD",pin7:"GND",pin8:"GND",pin9:"OLED_RESET_N",pin10:"GND",pin11:"GND",pin12:"GND",pin13:"OLED_SCL",pin14:"OLED_SDA",pin15:"OLED_SDA",pin16:"GND",pin17:"GND",pin18:"GND",pin19:"GND",pin20:"GND",pin21:"OLED_IREF",pin22:"OLED_VCOMH",pin23:"OLED_VCC",pin24:"GND",pin25:"GND",pin26:"GND"}).map(([p,n])=>[p,net(n)]))}/>
 <TLV61046ADBVR name="U18" {...schAt("U18",0,0)} connections={{VIN:net("V3V3"),GND:net("GND"),EN:net("OLED_POWER_EN"),SW:net("OLED_SW"),VOUT:net("OLED_VCC"),FB:net("OLED_FB")}}/>
 <SRN3015TA_100M name="L2" {...schAt("L2",0,0)} connections={{pin1:net("V3V3"),pin2:net("OLED_SW")}}/>
 <TLV70030DDCR name="U19" {...schAt("U19",0,0)} noConnect={["NC"]} connections={{IN:net("V3V3"),EN:net("V3V3"),GND:net("GND"),OUT:net("OLED_VDD_RAW")}}/>
 <TPS3808G33DBVR name="U20" {...schAt("U20",0,0)} connections={{VDD:net("OLED_VDD"),SENSE:net("V3V3"),N_MR:net("OLED_HOLD_OK_N"),CT:net("OLED_RESET_CT"),GND:net("GND"),N_RESET:net("OLED_RESET_N")}}/>
 <TCA9538PWR name="U21" {...schAt("U21",0,0)} noConnect={["N_INT"]} connections={{VCC:net("OLED_VDD"),GND:net("GND"),N_RESET:net("OLED_RESET_N"),A0:net("GND"),A1:net("GND"),SCL:net("OLED_SCL"),SDA:net("OLED_SDA"),P0:net("OLED_POWER_REQUEST_N"),P1:net("GND"),P2:net("GND"),P3:net("GND"),P4:net("GND"),P5:net("GND"),P6:net("GND"),P7:net("GND")}}/>
 <LM66100DCKR name="U22" {...schAt("U22",0,0)} noConnect={["NC"]} connections={{VIN:net("OLED_CHARGE"),N_CE:net("OLED_VDD"),GND:net("GND"),ST:net("GND"),VOUT:net("OLED_VDD")}}/>
 <TCA9517DGKR name="U23" {...schAt("U23",0,0)} connections={{VCCA:net("OLED_VDD"),VCCB:net("V3V3"),GND:net("GND"),EN:net("OLED_RESET_N"),SCLA:net("OLED_SCL"),SDAA:net("OLED_SDA"),SCLB:net("UI_SCL"),SDAB:net("UI_SDA")}}/>
 {/* DRV (WSON) package of the same TPS3808G01; the exposed pad is grounded. */}
 <TPS3808G01DRVR name="U24" {...schAt("U24",0,0)} noConnect={["CT"]} connections={{VDD:net("OLED_VDD"),SENSE:net("OLED_READY_SENSE"),MR:net("OLED_VDD"),GND:net("GND"),RESET:net("OLED_HOLD_OK_N"),EP:net("GND")}}/>
 <MMBT3906LT1G name="Q16" {...schAt("Q16",0,0)} connections={{pin1:net("OLED_ENABLE_BASE"),pin2:net("OLED_VDD"),pin3:net("OLED_POWER_EN")}}/>
 <GVL0J332M1213 name="C191" {...schAt("C191",0,0)} maxVoltageRating={6.3} connections={{pin1:net("OLED_VDD"),pin2:net("GND")}}/>
 <TAJA475K025RNJ name="C182" {...schAt("C182",0,0)} maxVoltageRating={25} connections={{pin1:net("OLED_VCOMH"),pin2:net("GND")}}/>
 <Passives parts={parts} sx={0} sy={0}/>
 </>}