pixalynx/nrf9151-gps-tracker

A compact 44×32 mm, 4-layer nRF9151 LTE-M/NB-IoT/GNSS tracker PCB with nPM1300 LiPo/USB-C power, nano-SIM/eSIM switching, nRF7002 Wi‑Fi scanning, accelerometer, antennas, buzzer, LEDs, SOS button, and SWD/debug connectors.

Version
0.1.4
License
unset
Stars
0

parts/Sim.tsx

import type { ChipProps } from "tscircuit"
import { pad, outline, courtyard } from "../lib/footprints"

/** Nexperia NX3DV2567HR-Q100X four-pole double-throw switch, HXQFN16 3 x 3 mm (JLC C2652485; second source
 * C52098293 NX3DV2567HR-TP has the same pin names in its EasyEDA symbol). Datasheet NX3DV2567-Q100 rev 1.1:
 * 1 1Y0, 2 S, 3 2Y1, 4 2Z, 5 2Y0, 6 GND, 7 3Y1, 8 3Z, 9 3Y0, 10 n.c., 11 4Y1, 12 4Z, 13 4Y0, 14 VCC, 15 1Y1, 16 1Z.
 * Switch 1 is the 0.5 ohm "supply" pole (SIM VCC), 2-4 the 7 ohm data poles. S = L -> nZ-nY0, S = H -> nZ-nY1.
 * VCC 1.4-4.3 V. The same part switches SIM_1V8/RST/CLK/IO between the nano-SIM socket and the MFF2 eSIM on the
 * nRF9151 DK (PCA10171 sheet 7). Land pattern: the EasyEDA footprint of C2652485 (0.28 x 0.80 mm pill lands,
 * 0.5 mm pitch, 1.9 mm centre pad, tied to GND). */
export const simSwitchPins = {
  pin1: ["Y0_1"], pin2: ["S"], pin3: ["Y1_2"], pin4: ["Z2"], pin5: ["Y0_2"], pin6: ["GND"], pin7: ["Y1_3"], pin8: ["Z3"],
  pin9: ["Y0_3"], pin10: ["NC"], pin11: ["Y1_4"], pin12: ["Z4"], pin13: ["Y0_4"], pin14: ["VCC"], pin15: ["Y1_1"], pin16: ["Z1"], pin17: ["EP"],
} as const
const pill = (pin: number, x: number, y: number, horizontal: boolean) => (
  <smtpad key={pin} portHints={[`pin${pin}`]} pcbX={x} pcbY={y} width={horizontal ? 0.8 : 0.28} height={horizontal ? 0.28 : 0.8} radius={0.14} shape="pill" />
)
export const SimSwitch = (props: ChipProps<typeof simSwitchPins>) => (
  <chip
    {...props}
    manufacturerPartNumber="NX3DV2567HR-Q100X"
    supplierPartNumbers={{ jlcpcb: ["C2652485"] }}
    pinLabels={simSwitchPins}
    internallyConnectedPins={[["GND", "EP"]]}
    footprint={
      <footprint>
        {[1, 2, 3, 4].map((p, i) => pill(p, -1.565, 0.75 - i * 0.5, true))}
        {[5, 6, 7, 8].map((p, i) => pill(p, -0.75 + i * 0.5, -1.562, false))}
        {[9, 10, 11, 12].map((p, i) => pill(p, 1.565, -0.75 + i * 0.5, true))}
        {[13, 14, 15, 16].map((p, i) => pill(p, 0.75 - i * 0.5, 1.562, false))}
        {pad(17, 0, 0, 1.9, 1.9)}
        {outline(3, 3)}
        <silkscreencircle pcbX={-1.95} pcbY={1.3} radius={0.12} strokeWidth={0.1} />
        {courtyard(4.0, 4.0)}
      </footprint>
    }
    cadModel={{ objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2652485.obj?uuid=cff4e4db6da5413f8dddc79a50554a2a", rotationOffset: { x: 0, y: 0, z: 0 }, positionOffset: { x: 0, y: 0, z: 0 } }}
    schWidth={0.9}
    schHeight={1.7}
    schPinArrangement={{
      leftSide: { direction: "top-to-bottom", pins: ["Z1", "Z4", "Z2", "Z3", "S", "VCC", "GND", "EP", "NC"] },
      rightSide: { direction: "top-to-bottom", pins: ["Y0_1", "Y0_4", "Y0_2", "Y0_3", "Y1_1", "Y1_4", "Y1_2", "Y1_3"] },
    }}
    pinAttributes={{ VCC: { requiresPower: true }, GND: { requiresGround: true }, NC: { doNotConnect: true } }}
  />
)

/** MFF2 (ETSI TS 102 671, 5 x 6 mm SON-8, 1.27 mm pitch) embedded UICC / eSIM. The chip itself comes from the
 * connectivity provider (1NCE, Onomondo, Velocity IoT, ...), it is not stocked by LCSC, so it is not placed by
 * the assembler (doNotPlace) and is consigned or hand-soldered. Pin to contact mapping (TS 102 671 table 6.1, nRF9151
 * DK U6 "MFFx_M2M_UICC"): 1 C5 GND, 2 C6 (VPP/SWP, n.c.), 3 C7 I/O, 4 C8 n.c., 5 C4 n.c., 6 C3 CLK, 7 C2 RST,
 * 8 C1 VCC. Contacts b 0.40 x L 0.60 mm on the 6.00 mm sides; lands 0.60 x 1.00 mm centred 2.65 mm from the axis
 * (TS 102 671 annex A: inner land edges 4.30 mm apart, outer 6.31 mm). The exposed heat feature is electrically
 * insulated and gets no copper. Pin 1 (C5) is the top-left land, numbering counter-clockwise. */
export const mff2Pins = {
  pin1: ["GND", "C5"], pin2: ["C6"], pin3: ["IO", "C7"], pin4: ["C8"], pin5: ["C4"], pin6: ["CLK", "C3"], pin7: ["RST", "C2"], pin8: ["VCC", "C1"],
} as const
export const EsimMff2 = (props: ChipProps<typeof mff2Pins>) => (
  <chip
    {...props}
    manufacturerPartNumber="MFF2 eUICC (provider supplied)"
    pinLabels={mff2Pins}
    doNotPlace
    footprint={
      <footprint>
        {[1, 2, 3, 4].map((p, i) => pad(p, -2.65, 1.905 - i * 1.27, 1.0, 0.6))}
        {[5, 6, 7, 8].map((p, i) => pad(p, 2.65, -1.905 + i * 1.27, 1.0, 0.6))}
        {outline(6, 5)}
        <silkscreencircle pcbX={-3.55} pcbY={2.55} radius={0.15} strokeWidth={0.1} />
        {courtyard(6.8, 5.4)}
      </footprint>
    }
    schWidth={1.0}
    schHeight={0.7}
    schPinArrangement={{ leftSide: { direction: "top-to-bottom", pins: ["VCC", "RST", "CLK", "IO"] }, rightSide: { direction: "top-to-bottom", pins: ["C6", "C8", "C4"] }, bottomSide: { direction: "left-to-right", pins: ["GND"] } }}
    pinAttributes={{ VCC: { requiresPower: true }, GND: { requiresGround: true }, C6: { doNotConnect: true }, C8: { doNotConnect: true }, C4: { doNotConnect: true } }}
  />
)