Shop OBEX P1 Docs P2 Docs Learn Events
BNO080 IMU 115200 UART interface rvc mode, Yaw, Pitch, Roll outputs BNO085 — Parallax Forums

BNO080 IMU 115200 UART interface rvc mode, Yaw, Pitch, Roll outputs BNO085

mwrobertsmwroberts Posts: 75
edited 2021-07-14 18:14 in Propeller 2
Here is a P2 program grabbing yaw, pitch and roll outputs from the BNO080 IMU chip in "robotic vacuum cleaner" mode.
100 times a second it sends out a 115200 b/s serial string of 19 bytes with yaw, pitch and roll information.
No calibrations needed.
I sent the data out to the new debug "plot" feature in pnut.
The board is from sparkfun.

Comments

  • Welcome to the forums!

    Nice implementation and video.
  • That's really neat. This would be a place where using a smart pin for the RX UART would save you a bit of code (and make it easier to follow). You could either get the packets in a background Spin cog, or sync with the gap between packets and then drop into your main loop where you grab a packet, then update the display.
  • Well, it looks like there's a click board with that on it so I guess Jon is going to have to write a driver for that.

    Mike
  • I just checked the box of Clicks that Ken loaned me to write code for -- unfortunately, that's not in there. Hopefully, though, when I finish coding the MPU I have, I can learn from what @mwroberts did with the DEBUG window -- that is really neat.
  • Great use of the debug window
  • RaymanRayman Posts: 14,662
    Nice work. I like the debug window use too! Have to figure out how you did that...

    Sparkfun is nice for me because they give Eagle layouts that I can use...
    The board is a bit expensive, but the chip isn't so bad. Looks like it needs a crystal, or maybe a P2 pin could provide the clock.

    I wonder how it corrects for soft-metal in the vicinity...
    That correction is a bit of a pain in the regular 9DOF chips...

    Looks like there's a BNO085 chip too with some kind of extra AR/VR firmware.
  • Thanks for all the positive feedback!
    I had this working a few months back on a P1 with a ntsc screen using the P1 graphics driver.
    I saw the p2 was getting to the point where the bugs were worked out and the software base was growing, so I took the leap and got a p2 eval board.
    Getting the P1 uart part of the program to work on the p2 was pretty easy thanks to tips on this forum p1->p2 code conversions. This was mostly the waitcnt parts.

    I had a lsm9ds1 working with a P1 a few months back and when it came time to figure out how to blend all the inputs together to get yaw, pitch and roll or quaterions or whatever, it looked like... well, hard and time consuming.

    So I found these BNO055 and BNO080 chips... both made by bosch, but the firmware in the BNO080 is by a company different than bosch. And it had a simple "UART yaw pitch roll" output mode (along with a more complete complicated
    one you want to use that).


    Here are some clips from the BNO085 writeup on adafruit:

    https://www.adafruit.com/product/4754

    {
    Please note, the BNO085 is the 'upgrade fix' to BNO080 - it is completely back-compatible with the BNO-080 and, in addition, fixes an SPI timeout bug that made SPI difficult to use.

    Thanks to a unique agreement between Bosch and Hillcrest, the BNO085 uses the same hardware as the BNO055 but very different firmware running on it.

    BN0085 also provides a simple but useful and well executed UART-based mode that provides calibrated heading and acceleration measurements. The UART-RVC mode takes its acronym form one of its potential applications: Robot Vacuum Cleaners. This mode is exceedingly simple to interface with and based on my limited testing it performs astoundingly well. The ease of use to utility ratio here is off the charts.
    }

    The sparkfun board I used was $34., the BNO085 board on adafruit is only $20., but out of stock...

  • That sucks, as the BNO080 from Sparkfun says the firmware is upgradeable by holding down the boot pin on the board.

    It looks like Hillcrest is making the BNO080 which is the same as BNO055 from Bosch. It seems they are fighting with each other since they are competing products or something.

    I have the BNO055 and tried to get it to work and found it very difficult to interface too.

    So far I am not vary happy with Bosch products.

    Mike
  • RaymanRayman Posts: 14,662
    edited 2020-11-19 14:09
  • That one didn't come up in the search. I guess they were hiding that one.

    Mike
  • RaymanRayman Posts: 14,662
    Interesting that it uses a 32.768 kHz crystal... I think that's the same as RTCs use...

    Wonder if could share the crystal with RTC somehow...

    Or, I wonder how precisely the P2 could generate a 32.768 kHz output.
    It'd guess it could be precise enough...
  • The Micro Crystal RTC, RV-3028-C7, can generate a 32.768 kHz square wave on its CLKOUT pin (1). Be careful, though, not all boards using the RV-3028-C7 (like the Mikroe RTC 8 CLICK) brings the CLKOUT to an interface pin.
  • Hi

    How about this one. The price might make it worth the wait. US $9.89 postage US $3.
    https://www.ebay.co.uk/itm/GY-BNO055-Attitude-Sensor-9DOF-9-Axis-Absolute-Orientation-Gyroscope-Module/322867412690?hash=item4b2c65bed2:g:xOYAAOSw1JVaAHLv
    There many sellers at about this price.
    I have one of these (not from this seller) and it seems to work well.

    Dave
  • cgraceycgracey Posts: 14,155
    Mwroberts, I just watched your mp4 file. Looks pretty good. I think with the newest version of PLOT in v35, you won't be able to do this, anymore. I need to come up with some kind of polygon renderer. Or, at least a triangle renderer.
Sign In or Register to comment.