A fixed sampling interval saw 3.3% of the day

Why we replaced a fixed 60-second sampling interval with adaptive sampling, and cut BLE syncs from about 60 to 12 an hour.

The fixed interval trap

Our collar is a Seeed XIAO nRF52840 Sense with a 6-axis IMU, running on a small LiPo cell. On 29 March we simplified the firmware to a fixed 60-second sampling interval. The device woke up, recorded a 2-second IMU burst, compressed it into a 322-byte window, stored it and slept for 58 seconds. The FilterNet model on the server does all the classification.

A fixed 60-second interval misses short eating and drinking events. Capturing 2 seconds out of every 60 is only 3.3 percent coverage.

Adaptive sampling

A few hours later we rewrote the firmware to sample adaptively. When motion is detected, the device samples every 15 seconds for 5 minutes, a 13 percent capture rate. After 5 calm minutes it drops to a 60-second interval. After 10 calm minutes it enters deep sleep with a heartbeat.

Idle mode and sync cooldown

The day before, we had cut idle power. The IMU runs at 12.5 Hz in idle instead of 26 Hz, saving about 90 µA, and switches to 26 Hz only while recording. The idle-loop delay went from 10 to 100 ms, ten times fewer CPU wake-ups, and the status log went from every 10 seconds to every 30.

We added a 5-minute cooldown between automatic BLE syncs. Before that, the iOS module synced every 16 seconds. The native module saves the last sync time to UserDefaults. This cuts BLE connection overhead from roughly 60 connections an hour to 12.

What the numbers were

These were estimates written into the commits, not bench measurements. After the idle and cooldown changes we expected a 150 mAh cell to last 30+ days instead of about 5. After adaptive sampling the estimate was about 2.5 mAh a day for a cat, or roughly 90 days on a 200 mAh cell.

What is still open

This budget was later blown by status LEDs that stayed lit on battery; we fixed that in April and again in June. True System OFF deep sleep is still not implemented. It needs an LSM6DS3 wake-on-motion interrupt routed to an nRF GPIO SENSE wake source. Getting it wrong bricks the collar until a manual reset, so it needs bench validation before it ships on a live pet.

If you are building something similar

  • Work out what your sampling interval actually covers. 2 seconds every 60 is 3.3 percent of the time.
  • Use adaptive sampling. Sample often during motion to catch short events, and back off when the animal is calm.
  • Budget power per state, then measure it. Our March runtimes were estimates.

Have a thought?

We build in public to learn. If you've solved this on nRF52 before, let us know.

Reply by email

Denys Zarubin

Founder, Spain

Investors

Request the deck

Join the
early list.

Prototype phase. Not certified. Not for sale. No payment required.

You’re on the list. We’ll email you when the collar is ready. In the meantime, download the free Fudini app.