9 axis motion shield not recognized on I2C

Hi All,

I am having trouble with the communicatoin between Arduino 9 axis motion shield and Mega 2560 (Joy-It). I had the following situations:

  • Arduino with I2C LCD working fine
  • Arduino with motion shield, shield not detected by i2c_scanner
  • Arduino with motion shield AND I2C LCD, LCD detected and shield not detected by i2c_scanner
  • Ordered a new shield: same problem

The pin connections should be correct as it is a shield. The LCD was even connected on the pins on the shield (SCL, SDA, GND, 5V). I also verified this by checking the schematics.

Does anyone know how the shield is not 'seen' by the Arduino, while the LCD is?

Best regards,
Berry

You are in trouble :sob:

Joy-IT Mega2560 R3: https://joy-it.net/en/products/ARD-Mega2560R3.
Arduino 9 Axis Motion Shield: Arduino 9 Axis Motion Shield | Arduino Official Store.
I2C Scanner: Arduino Playground - I2cScanner.

The shield is compatible with the Arduino Mega and I think the Joy-IT board has no problems.

When you put the shield on the Mega board, can you measure a few pins ?
The 5V pin should be about 5V. Not lower than 4.5V, because the ATmega2560 microcontroller needs more than 4.5V.
The 3.3V should be about 3.3V.
SDA and SCL (near the reset button) should be near 5V.
IOREF should be about 5V.

The next thing to do is to try the shield with an Arduino Uno. Even a cheap clone is okay. It should be a "R3" version.
Or do you have an other Arduino board ?

When everything is okay, can you contact the seller of the shield ? Maybe the shield is from a bad batch. You could give a link to this topic for the seller.

Koepel:
You are in trouble :sob:

Joy-IT Mega2560 R3: Joy-IT Mega2560R3 - Joy-IT.
Arduino 9 Axis Motion Shield: Arduino 9 Axis Motion Shield | Arduino Official Store.
I2C Scanner: Arduino Playground - I2cScanner.

The shield is compatible with the Arduino Mega and I think the Joy-IT board has no problems.

When you put the shield on the Mega board, can you measure a few pins ?
The 5V pin should be about 5V. Not lower than 4.5V, because the ATmega2560 microcontroller needs more than 4.5V.

I measure 4.85 V, so that should be OK.

The 3.3V should be about 3.3V.

Excactely 3.30 V.

SDA and SCL (near the reset button) should be near 5V.

Both 4.88 V

IOREF should be about 5V.

4.91 V

The next thing to do is to try the shield with an Arduino Uno. Even a cheap clone is okay. It should be a “R3” version.
Or do you have an other Arduino board ?

Tried with the UNO and same result.

When everything is okay, can you contact the seller of the shield ? Maybe the shield is from a bad batch. You could give a link to this topic for the seller.

The first shield is bought at Conrad and I already ordered a scond one because I thought it was faulty at RS. So there is a very small chance they are from the same batch. On the rear of the packaging, it says:

A000070-05/19
02252

and

A000070-05/19
02220

That could say something about the batch perhaps?

If it was a bad batch, then others would have the same problems as well and that should be on this forum or somewhere else.

In a issue at Github, user RidahHBR can not find the BMO055 and per1234 says that it is a hardware problem.
Next day, user Ridah asks on this forum about the problem and user pert suggests a delay, but Ridah solved it by connecting PS0 and PS1 to GND.

On that shield the PS0 and PS1 are already connected to GND. Can you verify that ? Can you check with a magnifier the soldering or copper shortcuts on the shield ?
Can you tell which I2C Scanner you use and add a delay(5000); as the first thing in setup(). After uploading the I2C Scanner sketch, press the reset button.

I can't think of something else :frowning: You might have to return both boards and try something else. Be sure that a new board is compatible with a 5V Arduino board. Adafruit makes boards that are compatible with 5V and 3.3V boards.
The Arduino Mega 2560 (and clones) have a pullup resistor of 10k from SDA and SCL to 5V. It is the only Arduino board with a strong pullup to 5V. That means that almost all sensor modules from Ebay/Amazon/AliExpress can not be used.

I tried to check the PS0 and PS1 connections, but these connections are made underneath the chip, so these can’t be seen or measured. I looked at the schematic and PCB design from the arduino.cc webshop and noticed that the design file and the pcb I have are quite different! After that I saw the board I have is v9.0 and the files on the website are v8.0. So maybe the v9.0 is quite new and has a hardware fault in it.

The I2C scanner is use is the Arduino example and works with the LCD I have, so this should not be the problem:

// --------------------------------------
// i2c_scanner
//
// Version 1
//    This program (or code that looks like it)
//    can be found in many places.
//    For example on the Arduino.cc forum.
//    The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
//     Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26  2013
//    V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
//    by Arduino.cc user Krodal.
//    Changes by louarnold removed.
//    Scanning addresses changed from 0...127 to 1...119,
//    according to the i2c scanner by Nick Gammon
//    https://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
//    As version 4, but address scans now to 127.
//    A sensor seems to use address 120.
// Version 6, November 27, 2015.
//    Added waiting for the Leonardo serial communication.
//
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//

#include <Wire.h>

void setup() {
  Wire.begin();

  Serial.begin(9600);
  while (!Serial); // Leonardo: wait for serial monitor
  Serial.println("\nI2C Scanner");
}

void loop() {
  int nDevices = 0;

  Serial.println("Scanning...");

  for (byte address = 1; address < 127; ++address) {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    byte error = Wire.endTransmission();

    if (error == 0) {
      Serial.print("I2C device found at address 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.print(address, HEX);
      Serial.println("  !");

      ++nDevices;
    } else if (error == 4) {
      Serial.print("Unknown error at address 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.println(address, HEX);
    }
  }
  if (nDevices == 0) {
    Serial.println("No I2C devices found\n");
  } else {
    Serial.println("done\n");
  }
  delay(5000); // Wait 5 seconds for next scan
}

If you know someone that knows electronics or Arduino and lives near you, then you can ask to have a look at it. I really can't think of something else to do.
My first impression was that you know what you are doing and that it should work. That's why my first line was "You are in trouble".

Others read this thread as well, and if they knew about a problem, then they would have told us.

I can see nothing wrong, so I suggest to return the boards.

Haha, thank you so much for your help! I will send and email to Arduino support and keep this thread updated when I find a solution.

I finally found the solution, it was something really stupid:

The RESET pin of the shield is on digital pin 7 of the Arduino. The pin should be pulled up by the hardware to prevent the shield from resetting, but when I made this pin high in the Arduino software, everything worked fine.

  pinMode(7, OUTPUT);
  digitalWrite(7, HIGH);

You found the problem ! :smiley:

There are solder-jumpers for the interrupt and reset, and I think that Arduino pin 2 and 7 are for the interrupt.

The reset pin of the BNO055 is connected to the Arduino pin 4 (trough a level shifter). The shield has a very weak pullup resistor of 100k for Arduino pin 4 and another 10k pullup on the BNO055 side.

I'm very glad that you made it work, but the mystery is not 100% solved yet :confused: