Sensor configuration and maybe just maybe a developer mode?

Reading Defining Openness , UNA draws a clear boundary. What I want to raise sits, I think, comfortably inside it. The post said the aim is to keep low-level complexity contained so developers can build good things in the application layer, and UNA will keep documenting and exposing the interfaces developers need.

I’m requesting some interfaces. It’s also, I think, the firmware side of what UNA has already published in una-hardware (:tada::tada: by the way!). Basically the same argument but one layer of abstraction up.

What I’m running into

Some sensor settings are destructive at the point of capture. If the accelerometer is pinned at a range that clips on impact (e.g., racquet swing), or the IMU’s internal low-pass filter is tuned for step counting, the high-frequency content is gone in hardware and no SDK level process can recover it.

Concretely, the BMI270 is clipping in ways that undermine my desired use of it, see (una-sdk issue #258) at its current range. ±16 g may well still clip on hard impacts, but it doubles the headroom and tells me whether the limit is configuration limit or hardware.

The asks

  1. publish the current sensor configuration (I mentioned this in Defining Openness)
  2. An API for bounded alternative configuration (e.g., high-rate) sessions. This might look like an app requesting elevated sampling for a defined window, the firmware grants or refuses however the firmware wants to decide that, then configuration is reclaimed after. Arbitration and power budgeting stay within the firmware. This might, in practice, give an app exclusive control of the requested sensor which would imply other consumers would necessarily pause or degrade.
    • Making it more complicated, this would also need to cover the read path
  3. Most pie-in-the-sky: an opt-in developer mode, explicitly void of warranty or support but enabling direct sensor configuration. Note: Sensors only, I would expect the radios to stay locked for certification reasons and have no interest in touching them
    • this is the Android “unlocked bootloader” spirit
    • no qualms if a “is in dev mode?” is query-able and apps refuse to run

Each I think stands on its own, #1 and #2 are about making it easier to build apps independently. #3 is #2 with the guard rails off and is a strong personal desire to exert as much control as I can over hardware I’ve purchased. Being able to treat the UNA as a general purpose development target is extremely appealing to me. With the source closed, I have no idea how large of an ask more configuration control is when it comes to the data path out, but figured it was worth broaching.

I’m loving my UNA so far and always looking for new and interesting ways to love it more. I’m more than happy to help brainstorm solutions.

Hey @shatter_poetry we’re looking into this! 1) should be do-able very quickly. Regarding the BMI270 and increasing the Gs to support a custom Squash activity, there is one slight limitation - the IMU is used to calibrate the HR sensor, so any changes would have an impact there. But we’ll look into that anyway.

2 Likes

the IMU is used to calibrate the HR sensor

Hardware is so much harder than software. Awesome that you’re looking into it.

If the ask is a superset rather than a conflict (e.g., ±8 g → ±16 g), can the samples be downsampled to keep the HR sensor happy? The resolution halves, but from my testing that quantization falls well within the noise floor of my own watch.

PixArt’s stuff all seems to be locked down, so I can’t see where the acceleration data actual goes. Does the firmware hand the samples to the HR sensor (and decimation is possible) or does the sensor want the IMU itself?

Is the sensor getting using it for continuous motion artifact rejection, or dynamic LED drive/gain adjustment based on motion? Maybe decimated stream doesn’t work in that case…

1 Like