MPU9250 Problems

Hello! So I am having MPU9250 problems. When I try to initialize the sensor it returns an error. I checked my connections using a voltmeter on the ohm setting and there is a connection, just no data is going through to the main page. I have been stuck on this issue for a while, and I'm not sure what to do. I've tried new breadboards, different connectors, and putting the sensor in different spots on the breadboard. I downloaded it from the MPU9250 library I found. I know the sensor works because it has before with the same code, but for some reason, it doesn't work now. Here are the code and pictures.

Code:

#include "MPU9250.h"

// an MPU9250 object with the MPU-9250 sensor on SPI bus 0 and chip select pin 10
MPU9250 IMU(SPI,10);
int status;

void setup() {
  // serial to display data
  Serial.begin(115200);
  while(!Serial) {}

  // start communication with IMU 
  status = IMU.begin();
  if (status < 0) {
    Serial.println("IMU initialization unsuccessful");
    Serial.println("Check IMU wiring or try cycling power");
    Serial.print("Status: ");
    Serial.println(status);
    while(1) {}
  }
}

void loop() {
  // read the sensor
  IMU.readSensor();
  // display the data
  Serial.print(IMU.getAccelX_mss(),6);
  Serial.print("\t");
  Serial.print(IMU.getAccelY_mss(),6);
  Serial.print("\t");
  Serial.print(IMU.getAccelZ_mss(),6);
  Serial.print("\t");
  Serial.print(IMU.getGyroX_rads(),6);
  Serial.print("\t");
  Serial.print(IMU.getGyroY_rads(),6);
  Serial.print("\t");
  Serial.print(IMU.getGyroZ_rads(),6);
  Serial.print("\t");
  Serial.print(IMU.getMagX_uT(),6);
  Serial.print("\t");
  Serial.print(IMU.getMagY_uT(),6);
  Serial.print("\t");
  Serial.print(IMU.getMagZ_uT(),6);
  Serial.print("\t");
  Serial.println(IMU.getTemperature_C(),6);
  delay(100);
}

APDF.pdf (40.8 KB)

BPDF.pdf (22.1 KB)

I know the sensor works because it has before with the same code, but for some reason, it doesn't work now.

What did you change?

Well, I soldered it. It worked but I had to push it down to make a connection so I thought soldering it would make that connection solid but I guess I was wrong. What doesn't make sense is that the two are connected just no data going through. Maybe the solder isn't connecting the pins to the sensor very well?

lnfin:
When I try to initialize the sensor it returns an error.

If you have some spare 9250 modules, then could try one of those - just to see if it's a faulty module.

Also, get a multimeter, and make sure every single one of those jumper wires have good conductivity on each end. I know that some of those wires are poorly manufactured - and some of them can even be open-circuit.

Having lots of spare parts can be handy too. Such as - if you have a spare bread-board, and spare modules --- then it would be possible to wire up and test those other spare modules on a different board - to see if the system works when you re-build. This means leave your existing system as it is .... untouched, and attempt to rebuild on a different breadboard. You mentioned that the system was working in the past. So it should be possible to get it working again if you carefully repeat everything that you had initially done.

Also, using your multimeter --- on DC voltage setting, carefully measure the pins (and/or power rails) to make sure all the modules are getting the right supply voltage.

And you can also turn off all power to your system, and use your multimeter to for electrical continuity between nodes/pins etc that are meant to be connected together.

Sparkfun and Adafruit have good soldering tutorials on line. There are probably others. Doing it well does take some practice!