Publish data from Tracker One IMU (BMI 160)

Hi everyone,

I’m attempting to use the Tracker one to track assets (of course), but I’m also interested being able to tell if the asset is right side up or upside down. This doesn’t necessarily fit into the “High G” event as sometimes my assets can flip slowly and also get jostled around a bunch and will likely trigger the High G event unnecessarily.

I’m hoping that someone out there knows how to get the value’s from the BMI 160 or can point me in the correct direction to figure it out.

Thanks yall!

It looks like the hardware can handle it, but you will have to modify some software to make it work.

Grab the Bosch BMI160 datasheet. That’s the IMU on the Tracker SoM and in the Tracker One.

In the Tracker Edge firmware, the BMI160 library is in lib/bmi160. You’ll have to modify this library. Fortunately you can just edit it in Particle Workbench and it will use the changed version when you build your Tracker Edge firmware. It shouldn’t need a custom Device OS build.

The INT_ORIENT settings on the BMI160 are where most of the changes will be. The catch is that there are no accessors for setting these settings in the library, and in fact the register definitions are not in src/bmi160regs.h either. But you could easily copy them out of the data sheet.

The other catch is that you need to modify the registers to enable orientation but the readRegister and writeRegister are private. Thus you will need to either make them public, or put your code for setting the orientation registers in the library itself.

It’s possible that you might need to do some other things to enable and handle the interrupts. I didn’t get that far. And wake on orientation change is even more complicated and I didn’t look into that.

But that’s how I’d get started on it.

Thank you for the quick reply! This will definitely keep me busy for a little while.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.