I hade my MPU6050 arrived today however It will not function

Hi,
Can you please try the classic I2C scanner sketch.

// --------------------------------------
// 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()
{
  byte error, address;
  int nDevices;
  Serial.println("Scanning...");
  nDevices = 0;
  for (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);
    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
}

Tom... :smiley: :+1: :coffee: :australia:

Unfortunately I don't have any of those type of jumper cables, I thought the soldering was poor, I'll see what I can do about that.

So I wired it properly and connected the AD0 pin to the GND pin on the Nano and unfortunately there is still no sensor found on the I2c bus.

The MPU-6050 has not been manufactured for several years, and unfortunately, unless you buy a guaranteed genuine example from a reputable dealer, anything labeled MPU-6050 is almost certainly a counterfeit, reject or fake part.

Similar sensors with much better performance are now available from Adafruit, Sparkfun, Pololu and other reputable sellers.

Could you suggest some part numbers? I, too, want to move on from the 6050.

Just about any modern 6DOF sensor will outperform the obsolete, noisy MPU-6050. Here are a couple:
SparkFun 6 Degrees of Freedom Breakout - LSM6DSO (Qwiic) - SEN-18020 - SparkFun Electronics (3.3V only)
Pololu - LSM6DS33 3D Accelerometer and Gyro Carrier with Voltage Regulator (3.3 to 5V)
Adafruit LSM6DSOX 6 DoF Accelerometer and Gyroscope [STEMMA QT / Qwiic] : ID 4438 : $11.95 : Adafruit Industries, Unique & fun DIY electronics and kits (3.3V to 5V)

The above sellers all support and guarantee their products.

1 Like

2 posts were split to a new topic: Having an issue with my serial monitor and mpu6050