11-15-2021 09:44 AM - edited 11-15-2021 09:45 AM
Hello,
I have been working on BNO055 that I program with Arduino IDE.
I have a line of multiple sensors that i communicate with through a i2C bus. The clock of the i2C bus has been upped to 400 kHz.
As I was working on it, trying to receive the eight bytes for quaternion values, I noticed that sometimes the sensors were taking longer times to respond than other times. So i decided to measure the time of answer for one sensor to the same operation through multiple loops. Here is what i observed :
As you can see the sensor seems to get busy sometimes and the time of response can move up from 200 microseconds to 1,3 millisecond. As I have multiple sensors to get data from such durations could be improved upon by making sure each sensor is not busy when i try getting data from it.
So my question is the following : Is there a way to predict when a sensor is going to be busy ? (some kind of pattern seems to emerge from the figure, but other tests make it seem like it's not that simple) Or is there a way to make the sensor busy less frequently or for lesser periods of time ?
Thanks in advance.
Justin
11-15-2021 02:46 PM
Hello Justin,
Do you mean response time is 200 microseconds when you communicate with BNO055 individually?
11-15-2021 02:59 PM
Hi,
Thank you for your reply.
Yes,200 microseconds is the minimum time to read the eight bytes of the quaternion value for one individual sensor (231 microseconds, to be precise).
Was it expected to be the time to get data from multiple sensors ? If so, how to achieve such a result ?
11-17-2021 07:11 AM
Hello Justin,
When there are multiple slave devices, there will be an access arbitration mechanism on the I2C bus, so the corresponding time is slower than single communication.