MustafaMulla29/stride-pedometer
This code defines schematic symbols and 3D footprints for various hardware components such as antennas, sensors, regulators, and connectors used in electronic circuit design.
- Version
- 1.0.4
- License
- unset
- Stars
- 0
lib/footprints.tsx
import type { ChipProps } from '@tscircuit/props'
// XC32M4 manufacturer-recommended 3225 four-terminal land pattern. Pins 2/4 are case ground.
export const Crystal48 = (p: ChipProps) => <chip {...p} manufacturerPartNumber="XC32M4-48.000-F08NLDT" supplierPartNumbers={{jlcpcb:['C2925606']}}
pinLabels={{pin1:'X1',pin2:'GND1',pin3:'X2',pin4:'GND2'}}
footprint={<footprint>
{[[1,-1.15,-.85],[2,1.15,-.85],[3,1.15,.85],[4,-1.15,.85]].map(([n,x,y])=><smtpad portHints={[`pin${n}`]} pcbX={x} pcbY={y} width={1.3} height={1.2} shape="rect"/>)}
<silkscreenrect width={3.2} height={2.5}/><silkscreencircle pcbX={-1.85} pcbY={-1.15} radius={.12}/>
<courtyardrect width={4.1} height={3.3}/>
</footprint>}/>
// The FPC is folded over an insulating spacer; only the solder tail occupies PCB area.
// Original unmodified vendor component, including the flat FPC envelope, is in imports/.
export const OLED = (p: ChipProps) => <chip {...p} manufacturerPartNumber="X091-2832TSWFG02-H14" supplierPartNumbers={{jlcpcb:['C18723017']}} doNotPlace
pinLabels={{pin1:'C2P',pin2:'C2N',pin3:'C1P',pin4:'C1N',pin5:'VBAT',pin6:'VBREF',pin7:'VSS',pin8:'VDD',pin9:'RESN',pin10:'SCL',pin11:'SDA',pin12:'IREF',pin13:'VCOMH',pin14:'VCC'}}
noConnect={['C2P','C2N','C1P','C1N','VBREF']}
footprint={<footprint>
{Array.from({length:14},(_,i)=><smtpad portHints={[`pin${i+1}`]} pcbX={4.03-i*.62} pcbY={0} width={.35} height={3.2} shape="rect"/>)}
<silkscreenrect width={9.1} height={3.7}/><silkscreencircle pcbX={4.85} pcbY={0} radius={.12}/>
<courtyardrect width={10.2} height={4.2}/>
</footprint>}/>
export const WirePads = (p: ChipProps & {count:number}) => <chip {...p} doNotPlace schPinArrangement={{leftSide:{pins:Array.from({length:p.count},(_,i)=>`pin${i+1}`),direction:"top-to-bottom"}}}
pinLabels={Object.fromEntries(Array.from({length:p.count},(_,i)=>[`pin${i+1}`,`P${i+1}`]))}
footprint={<footprint insertionDirection="from_above">{Array.from({length:p.count},(_,i)=><smtpad portHints={[`pin${i+1}`]} pcbX={(i-(p.count-1)/2)*2} pcbY={0} width={1.3} height={2} shape="rect"/>)}<courtyardrect width={p.count*2} height={2.5}/></footprint>}/>