MPU6050 -- Beginner

hi, my name is Jake and I need help.
I am having troubles with the mpu6050. I have tried wiring it up according to a few diagrams and followed a few instruction pages to try and get it working and displaying its orientation, but none have worked. And it has taken me a while but I am finally reaching out to a community for support. I have tried using arduino-mpu6050-master by jarzebski. I have also tried the library titled MPU6050 by electronic cats and finally mpu6050_light by rfetick.
Most of these come back with a failed to connect error message (if they have one) otherwise they just don't do anything. I am thoroughly confused and have spent to much time on this with little knowledge on how this all actually works and I really need help.

I have been wiring it up as seen here to my aurdino mega2560

specific links:

example: GetAllData

example: MPU6050_gyro_simple

I can only put 2 links in a post so
just look up electronic cats mpu6050 and it should be the first link.
example: MPU6050_DMP6_using_DMP_V6v12

Hi, welcome to the forum.

I'm afraid I have to spoil the fun:
The MPU-6050 is a 3.3V sensor and the Arduino Mega 2560 has a 5V I2C bus. The SDA and SCL signals can damage the MPU-6050.
You need a I2C level shifter, some modules have onboard level shifter.

The first thing to do is to run a I2C Scanner.
For example the I2C Scanner from Nick Gammon.
Perhaps it is also in the Arduino IDE menu: File / Examples / Wire / i2c_scanner

The most simple code is this short example:

Alright wasn't expecting reply's this quickly so thank you and I will give that a try and update you on what I get back.

On my mpu6050 the spec state 3.3-5v

16bit AD converter-chip, 16-bit data output
Use Chip: MPU-6050
Power supply :3-5v (internal low dropout regulator)
Communication: IIC communication protocol standard
Gyro Range: ± 250 500 1000 2000 ° / s
Acceleration range: ± 2 ± 4 ± 8 ± 16g
Using Immersion Gold PCB, welding machines to ensure quality
Size: 2 x 1.6 x 0.1cm

I use mine on a Mega with 5v fine. It's from Banggood

neo_16, run the i2c scanner to see if the arduino can see your board, it should be on 0x68 or 0x69 if you have ADO high

Try the MPU6050_raw example from the MPU6050 library, set the I2C address to what you have then try running

Yes, I know, but that is wrong.
I am not talking about the voltage to power the module. I'm talking about the SDA and SCL signals.

ok so I gave it a try and wired it up exactly like I had in the picture and this was the exact response:

22:35:32.017 -> I2C scanner. Scanning ...
22:35:32.017 -> Done.
22:35:32.017 -> Found 0 device(s).

Then there is no communication with the sensor.

Check the module with a magnifier to see if the soldering is okay.
Do you use a breadboard and jumper cable ? A breadboard can have bad contacts and jumper cables can be broken.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.