0
\$\begingroup\$

My understanding is that a sensor's bandwidth should be half it's ODR (the rate at which you sample data). I am working with the BNO055 sensor and trying to get angular velocity from it, which will be used for a gesture/air mouse.

The gyroscope lists the following characteristics:

 Ranges switchable from ±125°/s to ±2000°/s

 Low-pass filter bandwidths 523Hz - 12Hz

It doesn't mention ODR anywhere in the datasheet. Is the output data rate the rate at which I'm sampling it in my loop? Should I be aiming to set the bandwidth to be half of that?

Also, the range specified would be on a per sample basis? So if your microprocessor allows it you should be aiming to sample frequently at a lower range?

Thank you very much for your help.

\$\endgroup\$
8
  • 2
    \$\begingroup\$ You'll have to dig into the datasheet to see if it samples on its own and stores the sample in a buffer to be read, or if it samples every time you request a reading. If it uses a buffer, then you have to see if there is an interrupt to tell you when it has been updated or if there is simply a flag to tell you if the data is new or not. It doesn't make sense to give you an ODR because if you try and blindly sample a multiple of it, the two clocks aren't in synch to begin with and will drift and you will miss readings. \$\endgroup\$ – DKNguyen May 3 at 19:42
  • 2
    \$\begingroup\$ Also you want to sample at minimum double the bandwidth but if the IC is sampling for you, you are stuck with that. A sine wave with only two points per cycle is unique but not a clear picture of one. It's only recognizable as a sine if you run it through a brick wall low-pass anti-aliasing filter with cutoff at the bandwidth. 4 points or 8 points is much clearer. \$\endgroup\$ – DKNguyen May 3 at 19:46
  • 2
    \$\begingroup\$ Section 3.8.2 Data Ready "Interrupt \$\endgroup\$ – DKNguyen May 3 at 19:50
  • \$\begingroup\$ Thanks for the moment, I'll have a look and see where I can get to. \$\endgroup\$ – Zhelyazko Grudov May 4 at 12:24
  • 1
    \$\begingroup\$ Yes from what you wrote that seems to be the case. I would not be surprised if the same setting controls both bandwidth and update rate. For example, the IC could be designed to so the update rate is always set automatically to be 2x higher than the bandwidth (or 4x or 8x or whatever the IC designer chose. But probably 2x). It doesn't have to though; They could be independent. You can then either grab one reading per interrupt or poll but if you poll you should be somehow checking to see you are actually grabbing a new sample that has not been grabbed before (likely a flag of some kind). \$\endgroup\$ – DKNguyen May 4 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.