Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / FINDFAMILY_UWB_TRACKER_HARDWARE.md

FINDFAMILY_UWB_TRACKER_HARDWARE.md11.8 KiBRenderedCodeRaw

FindFamily Custom UWB Tracker — Hardware

Companion to FINDFAMILY_UWB_TRACKER_DESIGN.md.

The bench target is a Qorvo DWM3001CDK, not the custom board below. The DWM3001C module pairs a DW3110 with an nRF52833, whereas the BOM and pinmap in this document specify a bare nRF52840. The two differ in ways that matter if you cross-read them: the nRF52833 has 512 kB flash / 128 kB RAM against the nRF52840's 1 MB / 256 kB, and it has no USB peripheral, so USB-DFU (§3 J1, §4) does not exist on the dev kit — it is flashed over the on-board J-Link. Everything in §5 (the firmware contract) applies to both; §1–§4 and §6–§10 describe the eventual custom board only. Firmware lives in firmware/findfamily-tracker/.

Physical design for the DIY tracker: bare Qorvo DW3110 (UWB) + bare Nordic nRF52840 (MCU/BLE), small LiPo + USB-C charging, with a piezo buzzer, pairing/mute button, and accelerometer. Bare-chip path chosen deliberately — we own all RF and regulatory work (see §7, §8).

The firmware contract (BLE UUIDs, beacon/provisioning/UWB byte formats, epoch-id derivation) mirrors the app exactly — see findfamily/.../tracker/TrackerBle.kt, TrackerProtocol.kt, TrackerUwbKeys.kt, and TrackerUwbGatt.kt.


1. Block diagram

                         ┌───────────────────────────────┐
        USB-C  ─────────►│ CC 5.1k ×2 │ ESD │  charger IC │
        (5V, D±)         │            │     │  (BQ25100)  │
             │           └──────┬─────┴──────────┬────────┘
             │ D±                │ VBAT (3.0–4.2V)│ charge
             ▼                   ▼                ▼
        ┌─────────┐      ┌───────────────┐   ┌────────┐
        │nRF52840 │      │ buck-boost     │   │ LiPo   │
        │ USB     │      │ TPS63802 →3.3V │   │100-250 │
        └─────────┘      └──────┬────────┘   │  mAh   │
                                │ 3.3V rail   └────────┘
              ┌─────────────────┼───────────────────────┐
              ▼                 ▼                        ▼
        ┌───────────┐   ┌───────────────┐        ┌──────────────┐
        │ nRF52840  │   │   DW3110      │        │ peripherals  │
        │ (BLE 2.4G)│◄──┤ SPI + IRQ/RST │        │ piezo+PAM8904│
        │  32MHz    │   │  38.4MHz XTAL │        │ LIS2DH12     │
        │  32.768kHz│   │  UWB antenna  │        │ button       │
        │ BLE ant.  │   │  bulk cap     │        └──────────────┘
        └───────────┘   └───────────────┘

Two independent RF front-ends: 2.4 GHz (BLE, off nRF52840) and 6.5/8 GHz (UWB, off DW3110). Keep them separated/orthogonal (see §7).


2. Power tree

LiPo peaks at 4.2 V, above the nRF52840's 3.6 V absolute max, so neither chip runs directly off the battery — a single regulated 3.3 V rail feeds both.

StagePartKey values / notes
USB-C sinkUSB-C recept.CC1/CC2 → 5.1 kΩ to GND (advertise sink); ESD array on D+/D-/VBUS
ChargerTI BQ25100 (or MCP73831)I_charge ≈ 0.5C via ISET resistor; thermal-limited; STAT → GPIO
BatteryLiPo pouch 100–250 mAh3.0–4.2 V; size for form factor + UWB burst headroom
RegulatorTI TPS63802 buck-boost3.3 V out, ~11 µA Iq, holds 3.3 V from 4.2→2.7 V in; ≥1 A cap
Bulk decap100–470 µF + 4.7 µF + 100 nFat DW3110 supply — absorbs UWB TX spikes (~50–130 mA)
VBAT sense2× 1 MΩ divider + 100 nF→ nRF52840 SAADC (AIN); feeds beacon battery byte

Why buck-boost not buck: a buck can't hold 3.3 V once the LiPo sags below ~3.4 V; UWB must keep working as the battery drains.

nRF52840 uses its internal DC/DC (external inductors per Nordic PS) off the 3.3 V rail for best efficiency. DW3110 uses its internal regulators (decoupling + DC/DC inductor per the DW3000 datasheet / Qorvo DWM3000 reference).


3. Bill of materials (core)

RefPartFunction
U1Nordic nRF52840 (aQFN73)MCU, BLE 2.4 GHz, USB, runs Qorvo FiRa stack + HKDF beacon
U2Qorvo DW3110UWB (FiRa, 802.15.4z, ch 5/9), SPI peripheral
U3TI TPS638023.3 V buck-boost
U4TI BQ25100Li-ion charger
U5ST LIS2DH123-axis accel, motion wake (~2 µA)
U6PAM8904piezo boost driver (loud "find" tone)
Y132 MHz crystalnRF52840 HF (RF)
Y232.768 kHz crystalnRF52840 LF (RTC / low-power)
Y338.4 MHz crystalDW3110 reference (ToF accuracy — tight tolerance + trim)
BZ1Piezo transduceraudible find + anti-stalk beep
SW1Tactile switchlong = pair mode, short = mute
ANT12.4 GHz antennaPCB IFA or chip (Johanson 2450AT)
ANT2UWB antennach 9 / 8 GHz (Qorvo DWM3000 reference antenna)
J1USB-C receptaclecharge + USB-DFU
J2SWD header (SWDIO/SWDCLK)programming/debug
—LiPo 100–250 mAhbattery

Matching networks, decoupling, DC/DC inductors, and ESD per each device's reference design.


4. nRF52840 ↔ DW3110 wiring (SPI + control)

DW3110 is an SPI peripheral to the nRF52840 SPIM. Suggested pin map (adjust to routing):

SignalnRF52840DW3110Notes
SPI SCKP0.04SPICLKup to ~36 MHz
SPI MOSIP0.05SPIMOSI
SPI MISOP0.06SPIMISO
SPI CSnP0.07SPICSnactive low
IRQP0.08IRQranging/event interrupt → GPIOTE
RSTnP0.11RSTnopen-drain reset (don't drive high)
WAKEUPP0.12WAKEUPwake from deep-sleep before SPI
EXTON (opt)P0.13EXTONpower-sequencing/PA enable if used

Peripherals:

SignalnRF52840DeviceNotes
I²C SDA/SCLP0.26 / P0.27LIS2DH12or SPI; keep off RF pins
Accel INT1P0.14LIS2DH12 INT1motion wake (GPIOTE)
ButtonP0.15SW1 → GNDinternal pull-up; RC debounce
Piezo driveP0.16 (PWM)PAM8904EN + PWM for tone
Charger STATP0.17BQ25100 STAToptional charge LED/logic
VBAT senseP0.28 / AIN4dividerSAADC
USB D+/D-D+/D- (dedicated)J1USB-DFU
SWDSWDIO/SWDCLK (dedicated)J2flashing
HF xtalXC1/XC2Y1 32 MHz
LF xtalP0.00/P0.01 (XL1/XL2)Y2 32.768 kHz

DW3110 38.4 MHz crystal (Y3) on its XTAL pins with trim caps; treat as a calibrated part (§8).


5. Firmware ↔ hardware contract (mirror of TrackerBle)

The firmware must implement, over these radios:

BLE advertising (crowd-finding) — service 6b1d2f00-4b3a-4c7e-9a10-1f2e3d4c5b6a, service-data payload:

[16B epochId][1B battery%]

epochId = HMAC-SHA256(secret, "fftrk1" || u64_be(epoch))[..16], epoch = unix_seconds / 900 (15-min rotation). Matches TrackerProtocol.

This must be sent as a BLE 5 extended advertisement: the AD structure is 1B length + 1B type + 16B UUID + 17B payload = 35 bytes, past the 31-byte legacy limit, and the full UUID cannot be shortened because the phone looks the service data up by it. Pairing mode below stays legacy (21 bytes) so an unprovisioned tracker is discoverable with default scan settings. See src/tracker_ble.c.

BLE binding (GATT) — service …2f01… (advertised only while unprovisioned; the characteristics stay registered for the device's life so the owner can write UWB params to a bound tracker), characteristics:

  • …2f02… (write): provisioning blob
  [8B trackerUserId BE][32B beaconSecret][8B unixSeconds BE]

48 bytes; firmware also accepts the 40-byte form without the timestamp. The timestamp is the tracker's only source of wall-clock time — there is no battery-backed RTC, and without it unix_seconds / 900 is unknowable, so the tracker would beacon ids outside the owner's search window. Firmware keeps time as unix_at_provision + k_uptime_get() and re-persists it once per epoch so a reset costs one epoch of drift rather than the whole time base.

On success: persist, stop advertising the unprovisioned service, start the rotating beacon.

  • …2f03… (write/notify): per-find FiRa params
  [2B phoneAddr][4B sessionId BE][1B channel][1B preamble]

The STS key and the tracker's own 2-byte UWB address are derived on both ends from beaconSecret via HKDF-SHA256 and are not sent OTA — the GATT link is unbonded, so anything on it could come from a stranger nearby:

  stsKey  = HKDF-SHA256(beaconSecret, info = "com.vayunmathur.findfamily/uwb-sts"  || u32_be(sessionId))[..8]
  uwbAddr = HKDF-SHA256(beaconSecret, info = "com.vayunmathur.findfamily/uwb-addr")[..2]

(salt = 32 zero bytes; reserved 0x0000/0xFFFF addresses have their low byte set to 0x01.) Mirrored by TrackerUwbKeys.kt and src/tracker_sts.c; fixed vectors live in TrackerUwbKeysTest.kt.

UWB (precision find) — DW3110 runs a FiRa responder/controlee session with those params; phone is controller/initiator. See TrackerUwbGatt.kt.

Button: long-press → advertise unprovisioned service (pair mode); short-press → mute the piezo. Accelerometer INT → wake, refresh beacon, allow ranging.


6. Power budget (rough)

ModeCurrentDutyNotes
System sleep (RTC + accel)~3–5 µAmost of the timenRF52840 System OFF/ON + LIS2DH12
BLE beacon (1 adv)~5–10 mA for ~2 mse.g. every 1–2 sdominates average when idle
UWB ranging~50–130 mAseconds, only during a findrare; bulk cap smooths peaks

At a ~1 s beacon interval the average is tens of µA → a 150 mAh LiPo lasts weeks–months between charges; motion-gating the beacon (accel) extends it. UWB is negligible to the average because it's infrequent.


7. RF / PCB guidance (the hard part)

  • 4-layer stackup: L1 signal+RF / L2 solid GND / L3 power / L4 signal.
  • 50 Ω controlled impedance for both RF nets; keep UWB traces very short.
  • 2.4 GHz (BLE): nRF52840 has an integrated balun → pi-match + antenna; copy

Nordic's reference matching + antenna keep-out exactly.

  • UWB (ch 9 / 8 GHz): replicate the Qorvo DWM3000 matching + antenna

(that module is a DW3110) — it's your reference layout.

  • Place ANT1 and ANT2 on a board edge, orthogonal, with ground keep-outs and

via-stitched grounds to minimize cross-coupling.

  • Crystals (32 MHz, 32.768 kHz, 38.4 MHz) close to their pins with guard rings;

keep the 38.4 MHz UWB reference away from switching noise.


8. Calibration & regulatory (cost of bare-chip)

  • Per-unit UWB calibration: antenna delay + crystal trim, per Qorvo's

procedure, for accurate ranging. (Modules ship calibrated; bare parts don't.)

  • Regulatory: FCC/CE intentional-radiator testing for both radios; UWB

has its own emission mask. Budget for a test lab.


9. Mechanical

~30×30 mm 4-layer PCB; LiPo stacked underneath; USB-C on an edge; sound port over the piezo; button on top; keychain loop in a corner.


10. Open items

  • Exact DW3110 regulator config (LDO vs internal DC/DC + inductor) per datasheet.
  • Antenna vendor/part selection + matching component values (tune with a VNA).
  • Loudness target for the piezo (drives PAM8904 boost voltage / transducer choice).
  • Whether to add a MAX17048 fuel gauge for accurate battery % vs the SAADC divider.
  • Charge-current + safety (NTC thermistor on the LiPo → charger TS pin).