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.
imports/RK09K1130A8G/RK09K1130A8G.tsx
import type { ChipProps } from "@tscircuit/props"
const pinLabels = {
pin1: ["pin1"],
pin2: ["pin2"],
pin3: ["pin3"],
pin4: ["EH1"],
pin5: ["EH2"]
} as const
// Mounting pattern corrected against Alps Drawing 2 and the KiCad library
// Potentiometer_Alps_RK09K_Single_Vertical: 8.8 mm tab centers, 7 mm row offset.
export const RK09K1130A8G = (props: ChipProps<typeof pinLabels>) => {
const pcbAngle = parseFloat(String(props.pcbRotation ?? 0)) * Math.PI / 180
return (
<potentiometer
maxResistance="10k" pinVariant="three_pin"
pinAttributes={{ pin4: { doNotConnect: true }, pin5: { doNotConnect: true } }}
pinLabels={pinLabels}
symbol={
<symbol>
{/* Vertical resistive track; electrical wiper exits to the right.
The two mechanical tabs remain explicitly unconnected. */}
<schematictext text="{NAME}" schX={0.55} schY={0.9} fontSize={0.22} anchor="left" />
<schematictext text="10k / RK09K1130A8G" schX={0.55} schY={0.6} fontSize={0.18} anchor="left" />
<port name="pin5" pinNumber={5} aliases={["EH2","EH"]} direction="left" schX={-1.2} schY={-0.45} schStemLength={0.2} />
<port name="pin4" pinNumber={4} aliases={["EH1","EH"]} direction="left" schX={-1.2} schY={0.45} schStemLength={0.2} />
<schematicrect schX={0} schY={0} width={0.3} height={0.9} strokeWidth={0.02} color="#880000" />
<schematicpath points={[{x:0,y:-0.45},{x:0,y:-0.7}]} strokeColor="#880000" />
<schematicpath points={[{x:0,y:0.45},{x:0,y:0.7}]} strokeColor="#880000" />
<schematicpath points={[{x:0.7,y:0},{x:0.16,y:0},{x:0.3,y:0.08},{x:0.16,y:0},{x:0.3,y:-0.08}]} strokeColor="#880000" />
<port name="pin1" pinNumber={1} aliases={["1"]} direction="down" schX={0} schY={-0.9} schStemLength={0.2} />
<port name="pin2" pinNumber={2} aliases={["2"]} direction="right" schX={0.9} schY={0} schStemLength={0.2} />
<port name="pin3" pinNumber={3} aliases={["3"]} direction="up" schX={0} schY={0.9} schStemLength={0.2} />
</symbol>
}
supplierPartNumbers={{
"jlcpcb": [
"C470294"
]
}}
manufacturerPartNumber="RK09K1130A8G"
footprint={<footprint>
<platedhole portHints={["pin1"]} pcbX="-2.499868mm" pcbY="-3.09999385mm" outerDiameter="1.6999966mm" holeDiameter="1.1000232mm" shape="circle" />
<platedhole portHints={["pin2"]} pcbX="0mm" pcbY="-3.09999385mm" outerDiameter="1.6999966mm" holeDiameter="1.1000232mm" shape="circle" />
<platedhole portHints={["pin3"]} pcbX="2.500122mm" pcbY="-3.09999385mm" outerDiameter="1.6999966mm" holeDiameter="1.1000232mm" shape="circle" />
<platedhole portHints={["pin4"]} pcbX="4.4mm" pcbY="3.89999215mm" holeWidth="1.8mm" holeHeight="2.1mm" outerWidth="3mm" outerHeight="4mm" shape="pill" />
<platedhole portHints={["pin5"]} pcbX="-4.4mm" pcbY="3.89999215mm" holeWidth="1.8mm" holeHeight="2.1mm" outerWidth="3mm" outerHeight="4mm" shape="pill" />
<silkscreenpath route={[{"x":-4.8999902000000475,"y":9.400158950000105},{"x":4.899990199999934,"y":9.400133550000078}]} />
<silkscreenpath route={[{"x":4.899990199999934,"y":9.400133550000078},{"x":4.899990199999934,"y":5.778372950000062}]} />
<silkscreenpath route={[{"x":4.899990199999934,"y":2.0218907500002388},{"x":4.899990199999934,"y":-2.5998678499997823}]} />
<silkscreenpath route={[{"x":-4.8999902000000475,"y":9.400133550000078},{"x":-4.8999902000000475,"y":5.778372950000062}]} />
<silkscreenpath route={[{"x":-4.8999902000000475,"y":2.0218907500002388},{"x":-4.8999902000000475,"y":-2.5998678499997823}]} />
<silkscreenpath route={[{"x":-4.8999902000000475,"y":-2.5998678499997823},{"x":-3.498240399999986,"y":-2.5998678499997823}]} />
<silkscreenpath route={[{"x":-1.5817596000001686,"y":-2.5998678499997823},{"x":-0.9582404000000224,"y":-2.5998678499997823}]} />
<silkscreenpath route={[{"x":0.9582403999999087,"y":-2.5998678499997823},{"x":1.5817596000000549,"y":-2.5998678499997823}]} />
<silkscreenpath route={[{"x":4.899990199999934,"y":-2.5998678499997823},{"x":3.498240399999986,"y":-2.5998678499997823}]} />
<silkscreenpath route={[{"x":-0.2540000000001328,"y":6.877126150000095},{"x":-0.2540000000001328,"y":5.353126150000094},{"x":0.2540000000000191,"y":5.353126150000094},{"x":0.2540000000000191,"y":6.877126150000095}]} />
<silkscreencircle pcbX="0mm" pcbY="3.89999215mm" radius="2.999994mm" />
<silkscreencircle pcbX="-3.302mm" pcbY="7.89312615mm" radius="0.718312mm" />
<silkscreencircle pcbX="3.302mm" pcbY="7.89312615mm" radius="0.718312mm" />
<silkscreencircle pcbX="-3.302mm" pcbY="-0.99687385mm" radius="0.718312mm" />
<silkscreencircle pcbX="3.302mm" pcbY="-0.99687385mm" radius="0.718312mm" />
<silkscreencircle pcbX="-4.2899838mm" pcbY="-3.31000105mm" radius="0.2641854mm" />
<silkscreentext text="{NAME}" pcbX="3.25mm" pcbY="13.2mm" anchorAlignment="center" fontSize="1mm" />
<courtyardrect pcbX={0} pcbY={2.6} width={12.3} height={14.6} />
</footprint>}
cadModel={{
// A8G round/ribbed model (EasyEDA thoblu); the default
// C470294 association incorrectly uses the flat-shaft 004U model.
// This asset has no STEP counterpart. ALPS Drawing 2: Ø6, LM1=15 mm.
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C470294.obj?uuid=d4ddf19ac402421f8493ad27affbee64",
// Convert this OBJ's units to mm: 2.5 mm pin pitch and 15 mm shaft height.
modelUnitToMmScale: 0.2595313153122005,
rotationOffset: { x: 0, y: 0, z: 90 },
// Preserve the verified model registration when CAD is anchored to
// the footprint origin instead of the old copper-bounds centre.
positionOffset: { x: -0.975 * Math.sin(pcbAngle), y: 0.975 * Math.cos(pcbAngle), z: 0 },
// Shaft axis at footprint y=3.89999215; frame edge on the PCB surface.
modelOriginPosition: { x: -2.012672228301292, y: 0, z: -0.11188462037133284 },
}}
{...props}
/>
)
}