Riccati Posted May 28, 2013 Report Share Posted May 28, 2013 Anyone have suggestions for where to start troubleshooting a "MPU6050 connection failed" message when running the MPU6050_raw.ino example? Thanks, Riccati Quote Link to comment Share on other sites More sharing options...
pammie Posted May 28, 2013 Report Share Posted May 28, 2013 Hello Riccati, I think it can be a hardware problem, or maybe you don't have Vio connected to Vdd. Greetings, Pam Quote Link to comment Share on other sites More sharing options...
Jeff Rowberg Posted May 28, 2013 Report Share Posted May 28, 2013 Thanks, pammie! And yes, Riccati, make sure VIO is connected and that AD0 is connected to GND (if the AD0 pin is broken out on your board). Leaving it floating will result in unreliable comms.Check on the first two FAQs on this page:http://www.i2cdevlib.com/devices/mpu6050#help Quote Link to comment Share on other sites More sharing options...
Riccati Posted May 29, 2013 Author Report Share Posted May 29, 2013 Thanks Jeff and Pam for suggestions. No luck so far, though! Here are more details I should have mentioned the first time around: Arduino Uno R3 SMD SparkFun MPU6050 breakout board Connections: VDD - Arduino 3.3v GND - Arduino GND INT - Arduino digital pin 2 FSYNC - unconnected SCL - Arduino SCL dedicated pin SDA - Arduino SDA dedicated pin VIO - Arduino 3.3v CLK - unconnected ASCL - unconnected ASDA - unconnected MPU6050_raw sketch modified by putting ... accelgyro.setSleepEnabled(false); ... after the line which has accelgyro.testConnection() in it. Example serial output: Initializing I2C devices... Testing device connections... MPU6050 connection failed a/g: 0 0 0 0 0 0 a/g: 0 0 0 0 0 0 a/g: 0 0 0 0 0 0 a/g: 0 0 0 0 0 0 a/g: 0 0 0 0 0 0 etc. It looks like AD0 is grounded on the SparkFun board. I have not modified the board. Tried SCL/SDA on A5/A4; got same result. Don't know if the Arduino Uno R3 SMD has internal pull up resistors on SCL/SDA. The SparkFun board has 10k pull up resistors on those lines. I appreciate any more suggestions you may have. Thanks, Riccati Quote Link to comment Share on other sites More sharing options...
Riccati Posted May 30, 2013 Author Report Share Posted May 30, 2013 Fixed it. The problem was that the MPU6050_raw sketch uses I2C address 0x68 as default, but the SparkFun board I'm using has AD0 tied to Vcc which sets the MPU6050 address to 0x69. AD0 low is shown as a default on the SparkFun breakout board schematic but it looks like there is a solder bump on my board that sets AD0 high. I don't know why it's there. I didn't do it! Changing ... MPU6050 accelgyro; ... to ... MPU6050 accelgyro(0x69); makes the sketch work. I figured this out by running I2cScanner which is found here: http://playground.arduino.cc/Main/I2cScanner That sketch immediately told me that there was a device at 0x69. Regards, Riccati Quote Link to comment Share on other sites More sharing options...
pammie Posted May 30, 2013 Report Share Posted May 30, 2013 Hi Riccati, good you fixed it. Nice little program this I2C scanner, Greetings, Pamela Quote Link to comment Share on other sites More sharing options...
Winnie Posted August 7, 2013 Report Share Posted August 7, 2013 Hi, i'm sorry to re-open this topic but after read many post and forum, I can not find a solution for my MPU 6050. When I try to use the MPU 6050 I2Cdev Lib, I am not able to connect my device to my arduino in the way off when I start the program, I have alway "MPU6050 connection faild", and after, only 0. ( with MPU6050_raw programs) My device work well because I can receive raw data when I using arduino playground for MPU6050. I currently use the GY-521 breakboard, and as it is said in the FAQ, I connect INT pins to pin 2 on arduino Uno R3. The adress of My device is 0x68 ( foud by i2c_scanner). I spend three all day to try to fix the problems but I can't find a solution, so, If someone can help me, It will be so nice, Thank , Winnie P.s : I don't speak english very well, so sorry for the english mistakes. Quote Link to comment Share on other sites More sharing options...
Jeff Rowberg Posted August 17, 2013 Report Share Posted August 17, 2013 Hi Winnie, If you are using the MPU6050_raw.ino example, then the INT pin is not necessary, since the measurements are polled from the accel/gyro registers without doing any interrupt detection. Are you sure that you have a solid 3.3v supply on VCC, the AD0 pin is connected to GND, and all connections are securely soldered? Quote Link to comment Share on other sites More sharing options...
nikhil Posted August 22, 2013 Report Share Posted August 22, 2013 sir .....if i m using Urs DMP library........for quadcopter design ...then wil i have to use kalman filter or no..... second which prameter should i feed to PID ....Queterenion or euler or other fro ur dmp library Quote Link to comment Share on other sites More sharing options...
Murali21 Posted September 28, 2013 Report Share Posted September 28, 2013 Sir, Im facing the same issue as Winnie!!! my connectons are: GNd to GND Vcc to 3.3 V SDa to A4 SCl to A5...The raw values always read zero and there is a connection failure!!! please help me out.. The sensor is however getting raw data while using the sketch of Free IMU raw.... Quote Link to comment Share on other sites More sharing options...
tanujdamani Posted January 29, 2014 Report Share Posted January 29, 2014 Im stuck in the same place. Connections: GND - GND SDA - A4 SCL - A5 VCC - 3.3V (I tried this with 5V as well) I Also tried - Based on information I found around the internet A0 - GND A0 -> 4.7K - GND A0 - Not Connected INT - D2 INT - Not connected None of there work. Im stuck with the "Connection Failure" notification and only getting 0's for the Raw Data. Quote Link to comment Share on other sites More sharing options...
luisrodenas Posted January 30, 2014 Report Share Posted January 30, 2014 More info needed. What Arduino are you using? Are you including any other library? Which ones? What board are you using? Some picture or schematic? Quote Link to comment Share on other sites More sharing options...
tanujdamani Posted January 30, 2014 Report Share Posted January 30, 2014 I am using Arduino Uno, Im using the i2cdev libraries found here: https://github.com/jrowberg/i2cdevlib/tree/master/Arduino Im using the example program here: https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050/Examples/MPU6050_raw The connections I made were: MPU6050 - Arduino GND - GND SDA - A4 SCL - A5 VCC - 3.3V (I tried this with 5V as well) I Also tried - Based on information I found around the internet A0 - GND A0 -> 4.7K - GND A0 - Not Connected INT - D2 INT - Not connected Im getting the "Connection Failure" notification and only getting 0's for the Raw Data when i look at the output, when running the example code. Quote Link to comment Share on other sites More sharing options...
luisrodenas Posted January 31, 2014 Report Share Posted January 31, 2014 It seems like you are doing everything fine... The MPU6050 is supposed to be powered and communicated at 3.3V. But this depends on the board you are using, because it could have a logical level translator. Anyway, let's try this: - Have you tried with both I2C adresses? 0x69 and 0x68 - Schematic of you MPU board? - Can you try with another Arduino operating at 3.3V? Maybe an Arduino DUE, or some Arduino Pro Mini running at 3.3V... - Do you have an oscilloscope? If so, could you measure the voltage in SDA and SCL while the sketch is running? - Can you try with another MPU? It could also be that your MPU is dead. I have used like 10 of them, and just one died after 2 months of using it. In Ebay you can get really cheap MPUs and generic Arduinos. Quote Link to comment Share on other sites More sharing options...
tanujdamani Posted January 31, 2014 Report Share Posted January 31, 2014 The Arduino Uno and the MPU that I am using ware opened just 3 days ago. So its can't be that those are not working. However I have another one, I will try it with that one. I also do not have access to any other Board, except Beagle Bone Black, which I will work on at a later time. Since I am not currently in a country that has access to dev boards easily, it will take me sometime to get my hands on anything else. I have another Arduino Uno which I can try with, just to be sure. I will try all the other suggestions as well. Cheers for the reply. Quote Link to comment Share on other sites More sharing options...
tanujdamani Posted January 31, 2014 Report Share Posted January 31, 2014 I went through my connections again, uploading the sketch to the Arduino Uno. and the raw example code worked. It started outputting data. It worked for both my MPU6050 units. TBH im not sure what I did, but it is now working fine. Thanks luisrodenas I am not trying to run the DMP6 example code. Im stuck at the message on the serior monitor showing "DMP ready! Waiting for first interrupt..." Does anyone know what are the next steps? Quote Link to comment Share on other sites More sharing options...
rafael.lehmkuhl Posted February 1, 2014 Report Share Posted February 1, 2014 I am in this situation too. My Arduino is the UNO R1. I have the MPU6050 on the GY-521 Breakout Board, tough mine is a little different from the default GY-521: When I use the Arduino Playgroud Code, I receive all the RAW Data, with values that appear to be real, and change consistently with the sensor movement. But when I use the RAW FreeIMU code, it give me NaN (not a number) for all values, and the DMP code give me "Connection Failed". The pins are correctly connected, with INT disconnected and 5V supply. The I2C scan give me 0x68, so I did not change anything in the code. Quote Link to comment Share on other sites More sharing options...
rafael.lehmkuhl Posted February 2, 2014 Report Share Posted February 2, 2014 For the ones still searching for a solution, I figured out, with the help from the Arduino Playgroud Page, that you should put Pull-Up resistors on the SCL and SDA pins for them to work. It seens that the values on the breakout board are not enough. 10K worked here. Here is a picture of what you should do: I am now using with all the supply on the 3.3V of the Arduino, and no more the 5V. Didn't tested with the 5V yet. Quote Link to comment Share on other sites More sharing options...
florin Posted June 18, 2014 Report Share Posted June 18, 2014 I have the same problem. Arduino working (check) tested with a blink led The right pins connected? (check) 4 and 5 for I2C as datasheet No compliling errors (check) Pull-Up resistors: This is the I2cScanner: And the output of raw serial data: Please Help, i've try everyhing Quote Link to comment Share on other sites More sharing options...
luisrodenas Posted June 18, 2014 Report Share Posted June 18, 2014 It looks like you are using an Arduino Pro Mini. At the official Arduino website (http://arduino.cc/en/Main/ArduinoBoardProMini) you can see that the I2C pins are A4 and A5, not 4 and 5 that you are using. Maybe that's the problem. Quote Link to comment Share on other sites More sharing options...
florin Posted June 18, 2014 Report Share Posted June 18, 2014 There is no A4 and A5 on my board, if you click on the link "datasheet" of my previous post or here, you can see from the pictures that is exact the same board. Quote Link to comment Share on other sites More sharing options...
luisrodenas Posted June 18, 2014 Report Share Posted June 18, 2014 ¿? The pins just above A2 and A3 are A4 and A5. Quote Link to comment Share on other sites More sharing options...
florin Posted June 18, 2014 Report Share Posted June 18, 2014 above 5 is A0 and then they go as A1 -> A2 -> A3 -> VCC Is like this but red. <-- Click to make it big The pictures from my first post are real If anyone can help, is very much appreciated ! Quote Link to comment Share on other sites More sharing options...
luisrodenas Posted June 19, 2014 Report Share Posted June 19, 2014 Check these pictures: http://www.google.com/imgres?imgurl=http%3A%2F%2Fmk90.ru%2Ffiles%2Fimg%2Fpromini_pins.png&imgrefurl=http%3A%2F%2Fmk90.ru%2Fstore%2Fru%2Fmicrocontrollers%2F320-freeduino-pro-mini.html&h=346&w=530&tbnid=KWPd379HUDUazM%3A&zoom=1&docid=0E1PS3sfMZXUjM&ei=gJSiU-LPOI6u7AamyYGYDA&tbm=isch&ved=0CCsQMygPMA8&iact=rc&uact=3&dur=4756&page=1&start=0&ndsp=18 http://www.google.com/imgres?imgurl=http%3A%2F%2Faeroquad.com%2Fattachment.php%253Fattachmentid%253D4210%2526d%253D1315917105%2526stc%253D1&imgrefurl=http%3A%2F%2Faeroquad.com%2Fshowwiki.php%3Ftitle%3DHardware%2BAssembly%2BMini%2BShield%2Bv1%2B0&h=493&w=640&tbnid=qT03lmkFYKOWDM%3A&zoom=1&docid=T02Xc-RT9lrLNM&ei=gJSiU-LPOI6u7AamyYGYDA&tbm=isch&ved=0CC4QMygSMBI&iact=rc&uact=3&dur=2774&page=2&start=18&ndsp=23 Quote Link to comment Share on other sites More sharing options...
florin Posted June 19, 2014 Report Share Posted June 19, 2014 I will give it a try and post back, this look's nice thank you very much! Edit: Yes is working that is the A4 and A5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.