BNO086 9-axis sensor in RVC mode
Been toying with this 9DOF sensor from Sparkfun with BNO086.
Was initially looking at I2C interface, but this was looking a bit daunting.
Then, read about this RVC mode (robot vacuum cleaner).
This is dirt simple, it just outputs the data I need at 115200 baud at rate of 100 Hz.
All needed to do was solder bridge the "PS0" solder jumper on the back of the board.
Even better, the data comes out on the same wire as the I2C SCL, so can still use the QWIIC cable to connect with.
The robot want to use this for isn't a vacuum cleaner, but I guess it's a very similar thing, so should be perfect.
This code reads the serial packets and shows the data in Prop Tool's debug window.
Comments
Cool. I noticed Parallax has an update on their classic Ping))) sensor that now has a serial output option -- is this becoming a thing?
With smart pin serial you don't even need to use an object/cog to collect the sensor data.
Didn't know about Ping Rev.E. That's interesting. Serial output does sound easier to handle...
I found a cheap BNO085 on Amazon and tested my theory (no cog needed) -- seems to work. I haven't read the docs carefully but I'm not sure that the MI data is available in RVC mode. The '085 doesn't have this anyway, so it just sends 0s. The serial packet is the same length as your '086 code.
v1.0.1 Fixed display error and added version to banner
v1.1.0 Added calibration for accelerometers
Hmm… z and y accel shouldn’t both be one? Think sum of squares of all accel should be one.
I had a copy/paste error in the display section. Fixed it and reposted.
The values from my code seem to match your code.
So BNO085 works in RVC mode too. Interesting. Think BNO086 had some advantage in internal code, but maybe that doesn't help in RVC mode.
Have to read about the difference again...
It seems that the BNO086 has better accelerometer resolution and uses less power -- but neither sensor provides MI using RVC mode.
ChatGPT query:
-- https://chatgpt.com/share/6863e226-4724-8006-95c0-4ca3890bcb02
There's a regular serial mode as well, probably with full options. But, think happy with RVC mode.
I looked, briefly -- SHTP serial runs at 3M. With that, though, it seems you can still configure the '086 to spit out packets at 100Hz like the RVC mode does. With smart pins and one more IO, you might be able to configure the device to get sensor data and MI information easily.
Done some more testing... Here's maybe a more useful version of the code.
A little disappointed that the RVC mode data doesn't include input from the magnetometer.
Actually, what processing is actually done in RVC mode does is not documented?
Still, might be good enough for robots...
Trying to see if there's an easy way to implement dead reckoning. Probably isn't but trying anyway...
The debug "Scope" window is actually useful for this case.
Got some of the Parallax 12V wheels 'cause were 50% off.
Was thinking regular bot.
But now, wondering if this sensor in RVC mode is good enough to make a self balancing bot...
Not sure if this giant battery is good or bad for that application.
Was thinking 3-wheel bot with caster wheel before...
Guess can try and revert if doesn't work...
I read somewhere that the SpaceX Falcon 9 rocket runs it's main process loop every 20ms, while a sensor loop runs every 50ms. So... maybe.