mohan-bee/fitness-band-sensor-flex
A flexible dual-sensor PCB integrating a MAX30102 optical PPG/heart-rate sensor and TMP117 digital skin-temperature sensor, with I²C, power regulation, decoupling capacitors, interrupt pull-up, flex-tail connector, test points, and mechanical stiffeners/bend support.
- Version
- 0.0.1
- License
- unset
- Stars
- 0
interconnect.tsx
import { Fragment } from "react"
import type { ChipProps } from "@tscircuit/props"
// Shared order, viewed from the pad face. Three independent ground fingers.
export const flexSignals = ["GND", "V3V3", "GND", "SCL", "SDA", "PPG_INT", "V1V8", "GND"] as const
export function FlexLanding(props: ChipProps) {
return <chip doNotPlace schWidth={2} {...props} pinLabels={Object.fromEntries(flexSignals.map((s,i)=>[`pin${i+1}`,[s === "GND" ? `GND${i+1}` : s]]))}
footprint={<footprint insertionDirection="from_above">{flexSignals.map((_,i)=><Fragment key={String(i)}><smtpad portHints={[`pin${i+1}`]} shape="rect" pcbX={0} pcbY={5.25-i*1.5} width={3} height={0.8} /></Fragment>)}</footprint>} />
}
export function FlexConnections({name}: {name:string}) {
return <>{flexSignals.map((s,i)=><Fragment key={String(i)}><trace from={`.${name} > .pin${i+1}`} to={`net.${s}`} /></Fragment>)}</>
}
export function Rails() {
return <><net name="GND" isGroundNet /><net name="V3V3" isPowerNet nominalTraceWidth={0.15} /><net name="V1V8" isPowerNet nominalTraceWidth={0.15} /></>
}