Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
abrahams1745
 
Posts: 7
Joined: Tue Mar 07, 2023 2:24 pm

Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by abrahams1745 »

Hello Adafruit Support,

My Senior Design group purchased an Adafruit Motor Shield V2.3 on February 2nd, 2023. We tested the motor shield v2.3 a couple days ago and noticed that the I2C communication with our Arduino Uno R3 is not working as the I2C detection program cannot find the board. We have tested on multiple Arduino Unos, and the problem is definitely with the motor shield. We've also used a DMM to test the voltage on each of the pins and each pin seems to have the expected voltage. I've attached a picture of the soldering and the I2C detection code. Please let me know if you'd like any clarifications and/or additional information. Any solutions or recommendations would be appreciated.

Code: Select all

// I2C address scanner program
#include <Wire.h>

void setup()
{
  Wire.begin();
  Serial.begin(9600);
  Serial.println("I2C Scanner");
}

void loop()
{
  byte error, address;
  int nDevices;

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

  nDevices = 0;
  for(address = 1; address < 127; address++ )
  {
    Wire.beginTransmission(address);
    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");
  else
    Serial.println("done");

  delay(5000); // wait 5 seconds for next scan
}
Attachments
i2cscanfail.png
i2cscanfail.png (12.42 KiB) Viewed 567 times
IMG_20230307_105327582_HDR.jpg
IMG_20230307_105327582_HDR.jpg (795.31 KiB) Viewed 567 times
IMG_20230307_105853197_HDR.jpg
IMG_20230307_105853197_HDR.jpg (690.24 KiB) Viewed 567 times

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by adafruit_support_carter »

Try removing the power jumper here and then re-run the I2C scanner.
jumper.png
jumper.png (558.75 KiB) Viewed 561 times

User avatar
abrahams1745
 
Posts: 7
Joined: Tue Mar 07, 2023 2:24 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by abrahams1745 »

adafruit_support_carter wrote: Tue Mar 07, 2023 3:03 pm Try removing the power jumper here and then re-run the I2C scanner.

jumper.png
I've removed the power jumper and the I2C scanner still cannot detect the motor shield. Also I believe the necessity of the power jumper is to supply power to the motor shield through the Arduino. Without, I'll have to connect an external power source. So I tried the I2C scanner with an external power source (DC Programmable Power Supply @ 9V, 0.5A), and the I2C scanner still cannot find the shield.

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by adafruit_support_carter »

For the I2C scan, the jumper does not matter, since motor power is not needed at this point. The I2C scan is looking for the PCA9685 chip on the Motor Shield, which is powered via the Arduino's 5V pin.

Is this the only Motor Shield available? Sounds like this is school related, so wondering if there are other shields available that could be used to help test?

User avatar
abrahams1745
 
Posts: 7
Joined: Tue Mar 07, 2023 2:24 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by abrahams1745 »

adafruit_support_carter wrote: Tue Mar 07, 2023 7:30 pm For the I2C scan, the jumper does not matter, since motor power is not needed at this point. The I2C scan is looking for the PCA9685 chip on the Motor Shield, which is powered via the Arduino's 5V pin.

Is this the only Motor Shield available? Sounds like this is school related, so wondering if there are other shields available that could be used to help test?
Thank you for the clarification. Unfortunately, we do not have other Adafruit Motor Shield V2.3s, but off the top of my head, we do have the Pololu Dual MC33926 Motor Driver shields and probably some other shields. I can bring a more accurate list tomorrow if necessary. Not sure if the I2C scanner will detect those shields, but I can try. I could also try to hook up an Adafruit LCD or a Raspberry Pi just to test. If you have any other suggested tests, please let me know.

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by adafruit_support_carter »

The Pololu shield looks like it would *not* show up in an I2C scan:
https://www.pololu.com/product/2503
It relies on the Arduino board for providing the PWM outputs.

The general idea with using a second shield is to verify that the I2C scanner is running as expected and the Arduino board itself is OK. So just any other shield that uses I2C in some way. Also doesn't need to be a shield. Could be a simple I2C sensor breakout.

This is most likely some kind of connection issue. Soldering on the shield header pins would be the first thing to suspect. It's hard to 100% tell from the photo above, but the soldering looks probably OK? But if a second device shows up in an I2C scan, that would be the first thing to check on the motor shield.

User avatar
abrahams1745
 
Posts: 7
Joined: Tue Mar 07, 2023 2:24 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by abrahams1745 »

adafruit_support_carter wrote: Wed Mar 08, 2023 11:25 am The Pololu shield looks like it would *not* show up in an I2C scan:
https://www.pololu.com/product/2503
It relies on the Arduino board for providing the PWM outputs.

The general idea with using a second shield is to verify that the I2C scanner is running as expected and the Arduino board itself is OK. So just any other shield that uses I2C in some way. Also doesn't need to be a shield. Could be a simple I2C sensor breakout.

This is most likely some kind of connection issue. Soldering on the shield header pins would be the first thing to suspect. It's hard to 100% tell from the photo above, but the soldering looks probably OK? But if a second device shows up in an I2C scan, that would be the first thing to check on the motor shield.
We tested with another Arduino setting one up as a master and one as a slave. We also tested with and without the shield, and found that I2C worked between both Arduinos, but the shield was not found. The attached picture shows the same I2C scanner which found the address of the other Arduino, but not the address of the shield. The default address of the shield should be 0x60. I do not think it's with the soldering of the shield header pins. I suspect it has something to do with something internally in the shield. However, please let me know if any of the tests were performed incorrectly or if there is some misunderstanding on my part. Thanks.
Attachments
shieldnotfound.PNG
shieldnotfound.PNG (16.09 KiB) Viewed 472 times

User avatar
abrahams1745
 
Posts: 7
Joined: Tue Mar 07, 2023 2:24 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by abrahams1745 »

Here is a more close up picture of the soldering.
Attachments
IMG_20230309_105111717_HDR.jpg
IMG_20230309_105111717_HDR.jpg (601.52 KiB) Viewed 452 times
IMG_20230309_105125087_HDR.jpg
IMG_20230309_105125087_HDR.jpg (612.71 KiB) Viewed 452 times

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by adafruit_support_carter »

Good checks. So nothing wrong with the UNO pins or I2C.

Soldering looks good in the photos. Thanks for those.

To clarify the history of the shield - the shield has never been used before. It just sat since around the Feb 2. purchase and has only recently had the header pins soldered on and used?

User avatar
abrahams1745
 
Posts: 7
Joined: Tue Mar 07, 2023 2:24 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by abrahams1745 »

adafruit_support_carter wrote: Thu Mar 09, 2023 9:21 pm Good checks. So nothing wrong with the UNO pins or I2C.

Soldering looks good in the photos. Thanks for those.

To clarify the history of the shield - the shield has never been used before. It just sat since around the Feb 2. purchase and has only recently had the header pins soldered on and used?
The shield was first used around last week March 2nd with no prior usage or interaction. We soldered the header pins and tested the board on that Thursday where we first noticed problems with the I2C. We tested again in the past week during the time of this forum.

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by adafruit_support_carter »

Did that initial usage involve motors? Were motors and/or motor power applied to the shield?

In at least one of your photos, motor power is shown connected.

For the I2C scan test we are trying to do, motor power is not needed.

User avatar
abrahams1745
 
Posts: 7
Joined: Tue Mar 07, 2023 2:24 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by abrahams1745 »

adafruit_support_carter wrote: Mon Mar 13, 2023 11:50 am Did that initial usage involve motors? Were motors and/or motor power applied to the shield?

In at least one of your photos, motor power is shown connected.

For the I2C scan test we are trying to do, motor power is not needed.
That initial usage did not involve motors. However, motor power was applied to the shield at some point.

In those photos, we do have wires connected to motor power terminals, but we did not supply any power to the shield. We performed the I2C scan without supplying any power to the motor power shields, and the test failed.

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Motor Shield V2.3 - I2C Issues with Arduino Uno R3

Post by adafruit_support_carter »

OK, just wanted to make sure motor power did not got mis-applied somehow and maybe zapped something.

Really weird issue. It's still possible it's soldering - but I think the pins that matter actually look OK in the photos. Let's send you another shield to try. Do the same I2C scan test with that one before doing anything else that involves motor power. That way if the replacement also doesn't show up in the I2C scan, will have a better idea where the issue may be.

Send an email to [email protected] with a link to this thread and your order number and they can send you a replacement Motor Shield.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”