• BNO055 Nine Degree of Freedom IMU with built in Quaternion function

    Thanks to @trusktr for finding this chip at Adafruit.
    https://www.adafruit.com/product/2472

    https://learn.adafruit.com/adafruit-bno0­55-absolute-orientation-sensor/overview

    Connections

    I hooked the breakout board to a PICO with short wires and began to get results with code that follows.
    +3 to Vin, GND to GND, A8 to SCL, B4 to SDA
    I changed to a longer set of wires so I can move the breakout board around without the PICO USB connector coming loose, and the performance became intermittent. Looking at the schematic I tried
    Connecting the Vin and 3vo pins together on the breakout board and fixed the problem for use with the 3 Volts from the PICO. The Vin connected to a MIC6225-3.3 Voltage regulator input and the 3vo pin to the output.

    Almost a Module

    The attached code is almost a module. Some issues remain to be resolved but I am getting some interesting results. The output values are not scaled and are just the signed 16 bit integers.
    Most of the knobs for the chip are accessed using a data structure that defines the register, mask and shift for the particular bits (a document will follow as the module is completed)
    In NDOF mode (12) the output looks like this:

    A=,-232,-1,-1,M=,-1,-1,-1,G=,-1,-1,-1
    Heading=,5541,Roll,-247,Pitch,-111
    Q=,-16091,-699,-2305
    Lin=,-1925,27,-5
    Grav=,6,-1,-1
    Temperature= 74 F
    syscal= 3 Gyrcal= 3 Acccal= 3 Magcal= 3
    Aoffset=,-24,3,25,Moffset=,-24,62,-297,G­offset=,0,-1,-2
    Aradius=,1000,Mradius=,867
     
    A=,-211,-1,-1,M=,-1,-1,-1,G=,-1,-1,-1
    Heading=,5510,Roll,-243,Pitch,-117
    Q=,-16057,-718,-2294
    Lin=,-2198,16,7
    Grav=,10,-1,-1
    Temperature= 74 F
    syscal= 3 Gyrcal= 3 Acccal= 3 Magcal= 3
    Aoffset=,-24,3,25,Moffset=,-24,62,-297,G­offset=,0,-1,-2
    Aradius=,1000,Mradius=,867
    >clearInterval();
    

    In AMG mode the output looks like this

    A=,69,-930,-244,M=,-1,-1,-1,G=,-1,-1,-1
    Heading=,0,Roll,0,Pitch,0
    Q=,0,0,0
    Lin=,0,0,0
    Grav=,0,0,0
    Temperature= 72 F
    syscal= 0 Gyrcal= 0 Acccal= 0 Magcal= 0
    Aoffset=,-21,6,19,Moffset=,47,23,-1,Goff­set=,-1,-1,-1
    Aradius=,-1,Mradius=,-1
     
    A=,67,-932,-240,M=,-1,-1,-1,G=,-1,-1,-1
    Heading=,0,Roll,0,Pitch,0
    Q=,0,0,0
    Lin=,0,0,0
    Grav=,0,0,0
    Temperature= 72 F
    syscal= 0 Gyrcal= 0 Acccal= 0 Magcal= 0
    Aoffset=,-21,6,19,Moffset=,47,23,-1,Goff­set=,-1,-1,-1
    Aradius=,-1,Mradius=,-1
    >clearInterval();
    
    Issues that remain are:
    Using the external clock on the Adafruit board,
    Writing the offsets and radius to the chip and a way to save them on the PICO
    Sorting out the scale factors on the output as they change with the units settings and operating mode settings.
    Changing the code into a module.

    2 Attachments

About