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
dist/index.js
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
import { Fragment as Fragment$1 } from 'react';
const pinLabels$1 = {
pin1: ["N_C_4"],
pin2: ["SCL"],
pin3: ["SDA"],
pin4: ["PGND"],
// ADI MAX30102 Rev 1, page 8: these are NC, not exposed LED drivers.
pin5: ["NC5"],
pin6: ["NC6"],
pin7: ["N_C_3"],
pin8: ["N_C_1"],
pin9: ["VLED_POS1"],
pin10: ["VLED_POS2"],
pin11: ["VDD"],
pin12: ["GND"],
pin13: ["N_INT"],
pin14: ["N_C_2"]
};
const pinAttributes$1 = {
pin4: { requiresGround: true },
pin11: { requiresPower: true },
pin12: { requiresGround: true }
};
const MAX30102 = (props) => {
return (jsx("chip", { pinLabels: pinLabels$1, pinAttributes: pinAttributes$1, supplierPartNumbers: {
"jlcpcb": [
"C2839431"
]
}, manufacturerPartNumber: "MAX30102EFD+T", footprint: jsxs("footprint", { children: [jsx("smtpad", { portHints: ["pin8"], pcbX: "1.200023mm", pcbY: "-2.400046mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin9"], pcbX: "1.200023mm", pcbY: "-1.599946mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin10"], pcbX: "1.200023mm", pcbY: "-0.799846mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin11"], pcbX: "1.200023mm", pcbY: "0mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin12"], pcbX: "1.200023mm", pcbY: "0.8001mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin13"], pcbX: "1.200023mm", pcbY: "1.6002mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin14"], pcbX: "1.200023mm", pcbY: "2.400046mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin7"], pcbX: "-1.200023mm", pcbY: "-2.399792mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin6"], pcbX: "-1.200023mm", pcbY: "-1.599946mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin5"], pcbX: "-1.200023mm", pcbY: "-0.799846mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin4"], pcbX: "-1.200023mm", pcbY: "0mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin3"], pcbX: "-1.200023mm", pcbY: "0.8001mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin2"], pcbX: "-1.200023mm", pcbY: "1.599946mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin1"], pcbX: "-1.200023mm", pcbY: "2.400046mm", width: "0.7500112mm", height: "0.350012mm", shape: "rect" }), jsx("silkscreenpath", { route: [{ "x": -1.7115790000000288, "y": 2.8417011999999886 }, { "x": -1.7115790000000288, "y": -2.858312800000135 }, { "x": 1.6882109999999102, "y": -2.858312800000135 }, { "x": 1.6882109999999102, "y": 2.8417011999999886 }, { "x": -1.7115790000000288, "y": 2.8417011999999886 }] }), jsx("silkscreenpath", { route: [{ "x": -0.7115810000000238, "y": 2.0166075999999293 }, { "x": 0.6882130000000188, "y": 2.0166075999999293 }, { "x": 0.6882130000000188, "y": -0.5833364000001211 }, { "x": -0.7115810000000238, "y": -0.5833364000001211 }, { "x": -0.7115810000000238, "y": 2.0166075999999293 }] }), jsx("silkscreenpath", { route: [{ "x": -0.7115810000000238, "y": -1.1833098000000746 }, { "x": 0.6882130000000188, "y": -1.1833098000000746 }, { "x": 0.6882130000000188, "y": -2.0834604000000354 }, { "x": -0.7115810000000238, "y": -2.0834604000000354 }, { "x": -0.7115810000000238, "y": -1.1833098000000746 }] }), jsx("silkscreencircle", { pcbX: "-2.158873mm", pcbY: "2.413mm", radius: "0.119888mm" }), jsx("silkscreentext", { text: "{NAME}", pcbX: "-0.287909mm", pcbY: "3.832862mm", anchorAlignment: "center", fontSize: "1mm" }), jsx("fabricationnotepath", { route: [{ "x": -0.7115810000000238, "y": 2.016607600000043 }, { "x": -0.7115810000000238, "y": -0.5833872000000611 }, { "x": 0.688416200000006, "y": -0.5833872000000611 }, { "x": 0.688416200000006, "y": 2.016607600000043 }, { "x": -0.7115810000000238, "y": 2.016607600000043 }], strokeWidth: "0mm", isFilled: true, hasStroke: false }), jsx("fabricationnotepath", { route: [{ "x": -0.7115810000000238, "y": -1.1833860000000413 }, { "x": -0.7115810000000238, "y": -2.0833842000000686 }, { "x": 0.688416200000006, "y": -2.0833842000000686 }, { "x": 0.688416200000006, "y": -1.1833860000000413 }, { "x": -0.7115810000000238, "y": -1.1833860000000413 }], strokeWidth: "0mm", isFilled: true, hasStroke: false }), jsx("courtyardoutline", { outline: [{ "x": -1.9000094000000445, "y": 3.050095999999826 }, { "x": 1.899983999999904, "y": 3.050095999999826 }, { "x": 1.899983999999904, "y": -3.049892800000066 }, { "x": -1.9000094000000445, "y": -3.049892800000066 }, { "x": -1.9000094000000445, "y": 3.050095999999826 }] })] }), cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2839431.obj?uuid=36726d9fedca45ea8cb940092abc41dc",
stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2839431.step?uuid=36726d9fedca45ea8cb940092abc41dc",
pcbRotationOffset: 0,
modelOriginPosition: { x: 0.000012700000070253736, y: -1015999999935957e-19, z: -0.31 },
}, ...props }));
};
const pinLabels = {
pin1: ["SCL"],
pin2: ["GND"],
pin3: ["ALERT"],
pin4: ["ADD0"],
pin5: ["V_POS"],
pin6: ["SDA"],
pin7: ["EP"]
};
const pinAttributes = {
pin2: { requiresGround: true, mustBeConnected: true },
pin1: { isInput: true, capabilities: ["i2c_scl"] },
pin3: { isOutput: true, needsExternalPullup: true, canUseOpenDrain: true },
pin4: { isInput: true },
pin5: { requiresPower: true, mustBeConnected: true, shouldHaveDecouplingCapacitor: true, recommendedDecouplingCapacitorCapacitance: "100nF" },
pin6: { isInput: true, isOutput: true, isBidirectional: true, capabilities: ["i2c_sda"], needsExternalPullup: true, canUseOpenDrain: true }
};
const TMP117AIDRVR = (props) => {
return (jsx("chip", { pinLabels: pinLabels, pinAttributes: pinAttributes, supplierPartNumbers: {
"jlcpcb": [
"C699536"
]
}, manufacturerPartNumber: "TMP117AIDRVR", footprint: jsxs("footprint", { children: [jsx("smtpad", { portHints: ["pin1"], pcbX: "-1.028446mm", pcbY: "0.649986mm", width: "0.6070092mm", height: "0.3640074mm", radius: "0.1820037mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin2"], pcbX: "-1.028446mm", pcbY: "0mm", width: "0.6070092mm", height: "0.3640074mm", radius: "0.1820037mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin3"], pcbX: "-1.028446mm", pcbY: "-0.649986mm", width: "0.6070092mm", height: "0.3640074mm", radius: "0.1820037mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin4"], pcbX: "1.028446mm", pcbY: "-0.649986mm", width: "0.6070092mm", height: "0.3640074mm", radius: "0.1820037mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin5"], pcbX: "1.028446mm", pcbY: "0mm", width: "0.6070092mm", height: "0.3640074mm", radius: "0.1820037mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin6"], pcbX: "1.028446mm", pcbY: "0.649986mm", width: "0.6070092mm", height: "0.3640074mm", radius: "0.1820037mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin7"], pcbX: "0mm", pcbY: "0mm", width: "0.999998mm", height: "1.5999968mm", shape: "rect" }), jsx("silkscreenpath", { route: [{ "x": -1.0761979999999767, "y": 1.0761980000000904 }, { "x": 1.0761979999999767, "y": 1.0761980000000904 }] }), jsx("silkscreenpath", { route: [{ "x": -1.0761979999999767, "y": -1.0761979999999767 }, { "x": 1.0761979999999767, "y": -1.0761979999999767 }] }), jsx("silkscreencircle", { pcbX: "-1.63195mm", pcbY: "0.649986mm", radius: "0.07493mm" }), jsx("silkscreentext", { text: "{NAME}", pcbX: "-0.2794mm", pcbY: "2.0668mm", anchorAlignment: "center", fontSize: "1mm" }), jsx("courtyardoutline", { outline: [{ "x": -1.5819506000000274, "y": 1.249998000000005 }, { "x": 1.5819505999999137, "y": 1.249998000000005 }, { "x": 1.5819505999999137, "y": -1.249998000000005 }, { "x": -1.5819506000000274, "y": -1.249998000000005 }, { "x": -1.5819506000000274, "y": 1.249998000000005 }] })] }), cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C699536.obj?uuid=c909123e4a7a4da5a0270979fee6c02c",
stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C699536.step?uuid=c909123e4a7a4da5a0270979fee6c02c",
pcbRotationOffset: 0,
modelOriginPosition: { x: 0, y: 0, z: 0 },
}, ...props }));
};
// Shared order, viewed from the pad face. Three independent ground fingers.
const flexSignals = ["GND", "V3V3", "GND", "SCL", "SDA", "PPG_INT", "V1V8", "GND"];
function FlexLanding(props) {
return jsx("chip", { doNotPlace: true, schWidth: 2, ...props, pinLabels: Object.fromEntries(flexSignals.map((s, i) => [`pin${i + 1}`, [s === "GND" ? `GND${i + 1}` : s]])), footprint: jsx("footprint", { insertionDirection: "from_above", children: flexSignals.map((_, i) => jsx(Fragment$1, { children: jsx("smtpad", { portHints: [`pin${i + 1}`], shape: "rect", pcbX: 0, pcbY: 5.25 - i * 1.5, width: 3, height: 0.8 }) }, String(i))) }) });
}
function Rails() {
return jsxs(Fragment, { children: [jsx("net", { name: "GND", isGroundNet: true }), jsx("net", { name: "V3V3", isPowerNet: true, nominalTraceWidth: 0.15 }), jsx("net", { name: "V1V8", isPowerNet: true, nominalTraceWidth: 0.15 })] });
}
const capacitors = {
"100nF": { footprint: "0402", mpn: "GRM155R71C104KA88D" },
"1uF": { footprint: "0603", mpn: "GRM188R71C105KA12D" },
"4.7uF": { footprint: "0603", mpn: "GRM188R61A475KE15D" },
"10uF": { footprint: "0805", mpn: "GRM21BR61E106KA73L" },
};
function Cap(props) {
const part = capacitors[props.capacitance];
return jsx("capacitor", { schRotation: -90, ...props, footprint: part.footprint, manufacturerPartNumber: part.mpn });
}
function Pullup(props) {
const mpn = props.resistance === "4.7k" ? "RC0402FR-074K7L" : "RC0402FR-0710KL";
return jsx("resistor", { schRotation: -90, ...props, footprint: "0402", manufacturerPartNumber: mpn });
}
function SensorFlex() {
return jsxs("board", { width: 36, height: 14, material: "flex", layers: 2, thickness: 0.12, autorouter: "auto-local", minTraceWidth: 0.15, minTraceToPadEdgeClearance: 0.15, minPadEdgeToPadEdgeClearance: 0.15, minViaPadDiameter: 0.45, minViaHoleDiameter: 0.2, minBoardEdgeClearance: 0.2, pcbStyle: { silkscreenFontSize: 0.8, viaPadDiameter: 0.45, viaHoleDiameter: 0.2 }, children: [jsx(Rails, {}), jsx("schematicsection", { name: "Link", displayName: "Soldered flex tail" }), jsx("schematicsection", { name: "PPG", displayName: "Optical sensor" }), jsx("schematicsection", { name: "Temperature", displayName: "Skin temperature" }), jsx(FlexLanding, { name: "J_TAIL", pcbX: -16, pcbY: 0, schX: -10, schY: 0, schSectionName: "Link" }), flexSignals.map((signal, i) => jsxs(Fragment$1, { children: [jsx("testpoint", { doNotPlace: true, name: `TP${i + 1}`, pcbX: 0.5, pcbY: 5.25 - i * 1.5, schX: -6, schY: 2.5 - i * 0.8, schSectionName: "Link", padDiameter: 0.6, connections: { pin1: `net.${signal}` } }), jsx("trace", { name: `TAIL_${i + 1}`, from: `.J_TAIL > .pin${i + 1}`, to: `.TP${i + 1} > .pin1`, width: 0.3, pcbPath: [`.J_TAIL > .pin${i + 1}`, `.TP${i + 1} > .pin1`] })] }, String(i))), jsx("trace", { name: "TAIL_GROUND_13", from: ".J_TAIL > .pin1", to: ".J_TAIL > .pin3", width: 0.2, pcbPath: [{ x: 2.3, y: 5.25, via: true, toLayer: "bottom" }, { x: 2.3, y: 3.75 }, { x: 2.3, y: 2.25, via: true, toLayer: "top" }] }), jsx("trace", { name: "TAIL_GROUND_38", from: ".J_TAIL > .pin3", to: ".J_TAIL > .pin8", width: 0.2, pcbPath: [{ x: 2.3, y: 2.25, via: true, toLayer: "bottom" }, { x: 2.3, y: -1.5 }, { x: 2.3, y: -5.25, via: true, toLayer: "top" }] }), jsx("pcbstiffener", { name: "TAIL_SUPPORT", shape: "rect", pcbX: -15, pcbY: 0, width: 6, height: 14, layer: "bottom", material: "polyimide", thickness: 0.15, adhesiveThickness: 0.025 }), jsx("pcbstiffener", { name: "OPTICAL_SUPPORT", shape: "rect", pcbX: 5, pcbY: 0, width: 10, height: 14, layer: "bottom", material: "fr4", thickness: 0.4, adhesiveThickness: 0.025 }), jsx("pcbstiffener", { name: "TEMP_SUPPORT", shape: "rect", pcbX: 14.5, pcbY: 0, width: 7, height: 14, layer: "bottom", material: "fr4", thickness: 0.4, adhesiveThickness: 0.025 }), jsx("pcbbend", { name: "STATIC_BEND", x1: -6, y1: -7, x2: -6, y2: 7, bendAngle: -180, bendRadius: 3, bendSide: "right" }), jsx("keepout", { shape: "rect", pcbX: -6, pcbY: 0, width: 10, height: 14, layers: ["top", "bottom"], allowTraces: true }), jsx("trace", { name: "PPG_SDA_ESCAPE", from: ".TP5 > .pin1", to: ".U7 > .SDA", width: 0.15, pcbPath: [".TP5 > .pin1", { x: 1, y: 1.5501 }, ".U7 > .SDA"] }), jsx("trace", { name: "PPG_INT_BOTTOM_ESCAPE", from: ".TP6 > .pin1", to: ".U7 > .N_INT", width: 0.15, pcbPath: [".TP6 > .pin1", { x: 0.8, y: 0, via: true, toLayer: "bottom" }, { x: 1.25, y: 0 }, { x: 5.5, y: 4.25, via: true, toLayer: "top" }, ".U7 > .N_INT"] }), jsx(MAX30102, { name: "U7", pcbX: 4, pcbY: 0, schX: 0, schY: 0, schSectionName: "PPG", connections: { SCL: "net.SCL", SDA: "net.SDA", PGND: "net.GND", GND: "net.GND", VLED_POS1: "net.V3V3", VLED_POS2: "net.V3V3", VDD: "net.V1V8", N_INT: "net.PPG_INT" } }), jsx(Cap, { name: "C14", capacitance: "10uF", pcbX: 3.5, pcbY: 5.4, schX: -1.5, schY: 5, schSectionName: "PPG", connections: { pin1: "net.V3V3", pin2: "net.GND" } }), jsx(Cap, { name: "C15", capacitance: "100nF", pcbX: 7, pcbY: 4.8, schX: 0, schY: 5, schSectionName: "PPG", connections: { pin1: "net.V3V3", pin2: "net.GND" } }), jsx(Cap, { name: "C16", capacitance: "4.7uF", pcbX: 7.6, pcbY: -1, schX: 4, schY: 5, schSectionName: "PPG", connections: { pin1: "net.V1V8", pin2: "net.GND" } }), jsx(Cap, { name: "C17", capacitance: "100nF", pcbX: 7, pcbY: 1, schX: 5.5, schY: 5, schSectionName: "PPG", connections: { pin1: "net.V1V8", pin2: "net.GND" } }), jsx(TMP117AIDRVR, { schWidth: 2, name: "U8", pcbX: 14, pcbY: 0, schX: 16, schY: 0, schSectionName: "Temperature", connections: { SCL: "net.SCL", SDA: "net.SDA", V_POS: "net.V3V3", GND: "net.GND", EP: "net.GND", ADD0: "net.GND", ALERT: "net.TEMP_ALERT" } }), jsx("trace", { name: "TEMP_LOCAL_GROUND", from: ".U8 > .pin2", to: ".U8 > .pin7", width: 0.15, pcbPath: [".U8 > .pin2", ".U8 > .pin7"] }), jsx(Cap, { name: "C18", capacitance: "100nF", pcbX: 14, pcbY: 3, schX: 13, schY: 5, schSectionName: "Temperature", connections: { pin1: "net.V3V3", pin2: "net.GND" } }), jsx(Pullup, { name: "R6", resistance: "10k", pcbX: 16, pcbY: -3, schX: 19, schY: 5, schSectionName: "Temperature", connections: { pin1: "net.V3V3", pin2: "net.TEMP_ALERT" } })] });
}
export { SensorFlex as default };