07-22-2019 02:40 AM
Hello,
I have recently created a custom PCB which includes a 16mhz atmega32u4 at 5v, a BNO055 (over i2c, no external crystal) and a TXS0102 level shifting IC. I am having a problem with the BNO055 in that the gyro values (registers 0x14 through 0x18) are always 0. The other sensors and the sensor fusion euler angles function properly. The euler angles sometimes freeze also and I cannot calibrate the magnetometer at all while the gyro calibration is always 3. The self test always reports that everything works except for the gyro, the system does not report any errors.
Here are the solutions I have tried:
Thank you for your help.
My code is attatched. It uses the arduino standard wire i2c library. (.ino files are not allowed so I have zipped it.)
Solved! Go to Solution.
07-22-2019 09:41 AM
Hi Plasmabot,
It seems to be a power issue. Can you share more information about how the sensor is powered and connected?
Regards,
kgoveas
07-28-2019 03:28 PM - edited 07-28-2019 03:29 PM
07-29-2019 10:11 AM
Hi Plasmabot,
From a troubleshooting standpoint,
- Either the internal sensor is not powered, (which you have confirmed it is)
- The internal MCU cannot connect to the Gyroscope. Since the Accelerometer and Magnetometer are working I would assume that the internal SPI connections are fine, only the chip select to the Gyroscope could be an issue.
In the schematic, the connections for pin 12 and 22 are not shown. Pin 12 is the SPI chip select for the Gyroscope and is advised to be left unconnected. Pin 22 is the chip select for the Accelerometer and Magnetometer. Could you confirm that this is not an issue and pin 12 is left unconnected?
Additionally, what are the contents of the the 7 registers, 0x00-0x06?
Regards,
kgoveas
08-09-2019 01:58 AM
Sorry for the late reply. It turns out that pin 12 was accidentally shorted to ground. I desoldered the chip and cleaned up some of the pads before reflowing it again. Everything works now. Thanks for your help.
Here are the registers in case you still need them:
0x00: 0xA0
0x01: 0xFB
0x02: 0x32
0x03: 0x00
0x04: 0x11
0x05: 0x03
0x06: 0x15