Teensy Micromod - how to connect INT and RST for BNO086 IMU

@paulvha Could you please point me in the right direction - INT and RST on Teensy instead of ESP32?

I switched from ESP32 to Teensy (as you suggested due to clock stretching).

(Link to old thread: ESP32 Micromod + BNO086 IMU = how to connect INT and RST - #22 by michaelheiml82)

I now have the problem that defining INT and RST do not work any more:

#define BNO08X_INT RX1
#define BNO08X_RST TX1

I assume its because RX1 and TX1 are ESP32-specific.

I have looked at the Teensy schematic here

But cannot figure out how to read it properly.

I find TX0 and RX0 labeled as AD_B0_02 and AD_B0_03 but that does not work:

#define BNO08X_INT AD_B0_02
#define BNO08X_RST AD_B0_03

on the far right side of the schematic is also listed TX1 = 17 and RX1 = 19 but the board does also not boot with:

#define BNO08X_INT 19
#define BNO08X_RST 17

What would be the correct pin definitions?

The Teensy uses plain pin numbers, it should be something like

#define BNO08X_INT 2
#define BNO08X_RST 3

Also make sure they’re confugured above the function call, like

pinMode(BNO08X_INT, INPUT);
pinMode(BNO08X_RST, OUTPUT);

And wired accordingly (it also might use pins 17 & 19)

also see ESP32 Micromod + BNO086 IMU = how to connect INT and RST - Development Boards / MicroMod - SparkFun Community

None of those combinations work:

//int/rx A2 rst/tx A3
//int/rx 0  rst/tx 1 (as paulvha suggested)
//int/rx 2  rst/tx 3 (as TS-Russell suggested)
//int/rx 7  rst/tx 8 
//int/rx 16 rst/tx 17 (as discussed here: https://learn.sparkfun.com/tutorials/micromod-teensy-processor-hookup-guide/discuss)
//int/rx 19 rst/tx 17 (schematic RX0/0 = 19; TX0/1 = 17)
//int/rx 20 rst/tx 22 (schematic RX2=20=RX1/16/A2; TX2=22=TX1/17/A3)
//int/rx 30 rst/tx 31 (schematic CAN_RX CAN_TX)
//schematic 29 = 16 = I2C_INT

Accessing the IMU works with
if (myIMU.begin() == false);
or
if (myIMU.begin(BNO08X_ADDR, Wire) == false)
but not with
if (myIMU.begin(BNO08X_ADDR, Wire, BNO08X_INT, BNO08X_RST) == false)

If I set INT/RST to -1/-1 myIMU.begin() will work but of course that does not make sense (just to verify that its not something else).

It seems to come down to the value passed of INT.

It doesn’t make a difference which value I set for RST. I assume that RST is a signal that should reset the IMU when I press RESET on the micromod mainboard itself? (Because in that case: pressing the RESET button on the micromod mainboard does not do anything on the Teensy; only with the ESP32 this triggered a reset).

I also tried all combinations with and without the Jumper between SEC and GND as discussed with @paulvha in ESP32 Micromod + BNO086 IMU = how to connect INT and RST - #22 by michaelheiml82

I also noticed that with every number for INT expect 19 the init will fail after around 2s, while when using 19 as INT, the init will fail immediately in SparkFun_BNO08x_Arduino_Library.cpp::1085

Side note, calling myIMU.begin() will fail in SparkFun_BNO08x_Ardunio_Library.cpp::1085 when Wire.setClock(400000); is called before. Up to 350.000 will work though.

UPDATE
Ok it works, the IMU is sending data without errors.

So for everyone else coming here, the solution is:

  1. define BNO08X_INT as 0 and BNO08X_RST as 1
  2. connect IMU INT to RX1 on Micromod Mainboard
  3. connect IMU RST to TX0 on Micromod Mainboard
  4. add Jumper between GND and SEL on Micromod Mainboard
  5. do not use Wire.setClock(400000); (it will fail to boot; max 350.000 works)
  6. do not set pinMode as this is done by the IMU library itself

Ok it gets weird now:

I changed
pinMode(BNO08X_INT, INPUT);
to
pinMode(BNO08X_INT, INPUT_PULLUP);

and now
BNO08X_INT 0
works (at least the boot is succcessful, I need to check if the rotation values are correct).

Even more weird, when I now change back from INPUT_PULLUP to just INPUT, boot also works.

1 Like