Unable to connect to Adafruit MMC5603 magnetometer via I2C

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
fmenozzi
 
Posts: 6
Joined: Sun Dec 04, 2022 1:02 pm

Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by fmenozzi »

I am attempting to use the Adafruit MMC5603 magnetometer with my Arduino Uno via the former's I2C interface. I am using the Adafruit_MMC56x3 library as recommended by Adafruit. The pinout is quite simple (Vcc -> Uno 5V, GND -> Uno GND, SCL -> Uno SCL, SDA -> Uno SDA). Here are some pics for reference:

Image 1
Image 2

This is the test code I'm using:

Code: Select all

#include <Adafruit_MMC56x3.h>

void setup() {
    Adafruit_MMC5603 mmc = Adafruit_MMC5603(12345);
    Serial.begin(115200);
    if (!mmc.begin(MMC56X3_DEFAULT_ADDRESS, &Wire)) {
        Serial.println("Oops, no MMC5603 detected ... Check your wiring!");
    } else {
        mmc.printSensorDetails();
    }
}

void loop() {}
Every time I hit the "Oops, no MMC5603 detected" path. The green power indicator LED on the MMC5603 is on though so I'm hoping that's enough to know I didn't somehow fry anything. Running various I2C scanners also fails to find the device. When I try and manually check the result of `Wire.endTransmission()` (via the board's I2C address of 0x30) I get a return code of 2, which seems to correspond to received NACK on transmit of address according to the docs.

Is something somehow wrong with my setup? Or was the board just dead on arrival?

User avatar
sj_remington
 
Posts: 998
Joined: Mon Jul 27, 2020 4:51 pm

Re: Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by sj_remington »

The solder joints on the sensor (Image1) look like they could be improved.
Consult Adafruit's soldering tutorial for hints.

User avatar
fmenozzi
 
Posts: 6
Joined: Sun Dec 04, 2022 1:02 pm

Re: Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by fmenozzi »

Thanks for the reply, I've since improved the joints but I should mention that this issue was present even before I had soldered the headers on; even when wirewrapping it was not possible to find the device on any I2C scanners, and that remains the case even now that I've improved the joints.

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

Re: Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by adafruit_support_carter »

this issue was present even before I had soldered the headers on
That would be expected. They would need to be soldered first to provide a good electrical connection.

Post new photos of the updated soldering job.

For I2C scanning, try running this sketch:
https://learn.adafruit.com/scanning-i2c ... es/arduino

User avatar
fmenozzi
 
Posts: 6
Joined: Sun Dec 04, 2022 1:02 pm

Re: Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by fmenozzi »

I tried your specific I2C scanner sketch and it fails to find the device, similar to other such sketches I've tried.

Here is the updated solder job: link

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

Re: Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by adafruit_support_carter »

Is the MMC5603 your only I2C device?

User avatar
fmenozzi
 
Posts: 6
Joined: Sun Dec 04, 2022 1:02 pm

Re: Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by fmenozzi »

I have a 1602 LCD screen with an I2C adapter that I had previously used to check both the scanner code and the arduino itself, and there were no issues in discovering that device. It's just the magnetometer that I'm unable to find.

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

Re: Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by adafruit_support_carter »

Just tested an MMC56x3 breakout with an UNO running the I2C scanner sketch to verify the combo should work. Output is as expected, with the MMC showing up at 0x30:

Code: Select all

Scanning...
I2C device found at address 0x30  !
done

Scanning...
I2C device found at address 0x30  !
done
Latest soldering looks OK:
soldering.png
soldering.png (387.19 KiB) Viewed 80 times
Try different jumper wires and also different locations on the breadboard. It seems like it's still a connection issue of some kind.

Continue using the I2C scanner sketch for troubleshooting. At this point, just want to figure out why the 0x30 address is not showing up in the scan.

User avatar
fmenozzi
 
Posts: 6
Joined: Sun Dec 04, 2022 1:02 pm

Re: Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by fmenozzi »

I tried skipping the breadboard entirely and directly connecting the magnetometer header pins to the arduino via male-to-female jumper wires (the same ones I used when testing the 1602) and that also fails to find the magnetometer. As mentioned before, the green power LED does turn on but otherwise the device cannot be found by any I2C scanners.

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

Re: Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by adafruit_support_carter »

OK, let's just try a replacement. When you get the replacement, try the I2C scan again as a way to verify things.

Send an email to [email protected] with a link to this thread and your order number and they can send you a replacement MMC5603 (PID 5579).

User avatar
fmenozzi
 
Posts: 6
Joined: Sun Dec 04, 2022 1:02 pm

Re: Unable to connect to Adafruit MMC5603 magnetometer via I2C

Post by fmenozzi »

Sounds good, thanks for your help!

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

Return to “Other Products from Adafruit”