-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not connect to MPU9250: 0xFF #58
Comments
If you bought the purple boards from China then yes, they are junk. Make sure the SDA and SCL lines both show 3V3 with a voltmeter when powered on. It is likely you don't have the I2C address of the MPU9250 right. It can be either 0x68 or 0x69. If you run an I2C scan, what do you get? Here's how: `
` |
Dear Kris, |
Hi Kris, |
@kriswiner Hi |
The serial monitor should at least show Scanning...
I think there is an error in your setup.
What is the voltage on SDA and SCL?
What MCU are you using?
Which pins are you using for SDA/SCL?
Does the board have power?
Which board are you using?
Can't help much without some more info.
…On Sun, May 21, 2017 at 9:18 AM, sakshirawal14 ***@***.***> wrote:
@kriswiner <https://github.com/kriswiner> Hi
I am facing the same issue. I tried running the I2Cscan(), but the serial
monitor shows no output whatsoever. How do I know if the address is correct
in the code?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qnCRYpnIAH1gPtT28HBOR3H5lqWQks5r8GPhgaJpZM4H_-WG>
.
|
Hi..I'm using the Arduino Uno and the MPU 9250. I have made the following connections |
Mpu9259 is 3v3 only; you need to use a logic level converter?
Do you have pullup resistors on the mpu9250 board?
…On Sun, May 21, 2017 at 9:03 PM sakshirawal14 ***@***.***> wrote:
Hi..I'm using the Arduino Uno and the MPU 9250. I have made the following
connections
VDD---3.3V
GND---GND
SCL---A5
SDA---A4
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qkggCAmMoTq5wtSAPJi8CSeVEj2Xks5r8Qj9gaJpZM4H_-WG>
.
|
It works on 3.3V. Haven't used it before but the forums and posta I have referrred to say that only the above 4 connections are needed for it to work. I'm not using any external pull-ups either. |
What is the voltage on sda and scl?
You need pullups.
…On Sun, May 21, 2017 at 9:16 PM sakshirawal14 ***@***.***> wrote:
It works on 3.3V. Haven't used it before but the forums and posta I have
referrred to say that only the above 4 connections are needed for it to
work. I'm not using any external pull-ups either.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qpjartel6J4P6EtjU1m60rUBBUH8ks5r8QwWgaJpZM4H_-WG>
.
|
Will the voltage on SDA and SCL not be 3.3 V only? I don't have much hands on experience with thw hardware. How do I use pull-ups? |
Connect a 10 kOhm resistor between 3V3 and SDA. Do the same for SCL.
…On Sun, May 21, 2017 at 10:16 PM, sakshirawal14 ***@***.***> wrote:
Will the voltage on SDA and SCL not be 3.3 V only? I don't have much hands
on experience with thw hardware. How do I use pull-ups?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qnVnP1l83MocVX1mAziFnmUFfcx7ks5r8RpJgaJpZM4H_-WG>
.
|
Okay..thank you. Will do that and try running the code. Will get back to you then. |
Okay..so the I2C scanner detects the device at 0x68. |
Not without more info |
Maybe too much, you have pullups already on the breakout no? |
yes I think this 1,5 k that's what I measured on SDA0 and SDA1 (20 and 21) |
Looks like you have GND connected to 3V3 in your diagram too. |
Huh? |
Excuse me, I didn't understand your sentence the first time. this is a mistake in my diagram but I didn't did it in real (fortunately !)... I tought you were saying me to change of GND ... I removed the pullup resistors, It seems better now... |
I think I solved my problem, two things : first, I removed theses useless pullup resistors, that improved it. so I implemented the solution :
I'm using an Arduino Due with SDA1 and SCL1 that's why I use Wire1 ( and SDAPIN = 70 , CLKPIN = 71...) And use it in the begining of my setup like this :
I modified the I2C scan so it returns true if a device has been detected, false if this is not the case... Looks like it helps :)
|
@kriswiner Hi..What info can I help you with? |
No idea what your problem is |
I2Cscanner detects the device at 0x68, but when I try to run my sketch to get raw data from the IMU, it says "MPU9250 connection failed" |
Why use i2cdev? Maybe need to ask them?
…On Mon, May 22, 2017 at 9:46 PM sakshirawal14 ***@***.***> wrote:
I2Cscanner detects the device at 0x68, but when I try to run my sketch to
get raw data from the IMU, it says "MPU9250 connection failed"
Also, I get 2 warning messages in the terminal window as:
Invalid library found in
C:\Users\sakshi\Documents\Arduino\libraries\i2cdevlib-master:
C:\Users\sakshi\Documents\Arduino\libraries\i2cdevlib-master
Invalid library found in
C:\Users\sakshi\Documents\Arduino\libraries\i2cdevlib-master:
C:\Users\sakshi\Documents\Arduino\libraries\i2cdevlib-master
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qkfwbu4ed1588K31W2pAPvxsz01_ks5r8mSRgaJpZM4H_-WG>
.
|
I tried using your code, but it had some errors. So I just wanted to do a basic raw data read and check first. |
OK,
What MCU are you using?
Which code did you try?
…On Mon, May 22, 2017 at 10:51 PM, sakshirawal14 ***@***.***> wrote:
I tried using your code, but it had some errors. So I just wanted to do a
basic raw data read and check first.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qjbDk1-T_Om1wFsSKibfAsyO3maTks5r8nPkgaJpZM4H_-WG>
.
|
I'm using the Arduino Uno and trying to get the raw values using I2C |
Try here: http://www.lucidarme.me/?p=5057
…On Mon, May 22, 2017 at 11:45 PM, sakshirawal14 ***@***.***> wrote:
I'm using the Arduino Uno and trying to get the raw values using I2C
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1ql5_GQz3ZyzS7UxooA6UAmslkV1Uks5r8oCGgaJpZM4H_-WG>
.
|
To my knowledge MPU9250 is on 73. Try the MPU9150 library instead since is MPU9150 on 68.
John
________________________________
Van: Kris Winer <notifications@github.com>
Verzonden: dinsdag 23 mei 2017 08:53:19
Aan: kriswiner/MPU9250
CC: John Val; State change
Onderwerp: Re: [kriswiner/MPU9250] Could not connect to MPU9250: 0xFF (#58)
Try here: http://www.lucidarme.me/?p=5057
On Mon, May 22, 2017 at 11:45 PM, sakshirawal14 ***@***.***> wrote:
I'm using the Arduino Uno and trying to get the raw values using I2C
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1ql5_GQz3ZyzS7UxooA6UAmslkV1Uks5r8oCGgaJpZM4H_-WG>
.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub<#58 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJ2sJmJj7PctY-q3HAeoqnuOJIBHwJc0ks5r8oJfgaJpZM4H_-WG>.
|
You can't use an MPU9150 library for the MPU9250, the register addresses
are different.
If you can get an ACK from the MPU9250 at I2C address 0x68, then what does
the WHO_AM_I register show? Should be 0x71 for the MPU9250 or 0x73 for the
MPU9255.
…On Tue, May 23, 2017 at 3:18 AM, John Val ***@***.***> wrote:
To my knowledge MPU9250 is on 73. Try the MPU9150 library instead since is
MPU9150 on 68.
John
________________________________
Van: Kris Winer ***@***.***>
Verzonden: dinsdag 23 mei 2017 08:53:19
Aan: kriswiner/MPU9250
CC: John Val; State change
Onderwerp: Re: [kriswiner/MPU9250] Could not connect to MPU9250: 0xFF (#58)
Try here: http://www.lucidarme.me/?p=5057
On Mon, May 22, 2017 at 11:45 PM, sakshirawal14 ***@***.***>
wrote:
> I'm using the Arduino Uno and trying to get the raw values using I2C
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#58 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AGY1ql5_
GQz3ZyzS7UxooA6UAmslkV1Uks5r8oCGgaJpZM4H_-WG>
> .
>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub<https://github.com/
kriswiner/MPU9250#58#issuecomment-303306865>, or mute the thread<
https://github.com/notifications/unsubscribe-auth/AJ2sJmJj7PctY-
q3HAeoqnuOJIBHwJc0ks5r8oJfgaJpZM4H_-WG>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qpsMGzRwljHs2CALzxxT-pdRrlw-ks5r8rJqgaJpZM4H_-WG>
.
|
Kris can you help me I'm trying to write high to the AD0/SDO pin of my sparkfun 9250 but the address is staying at 0x68 even though I made the pin high. my wiring..
and returns Scanning... MPU9250 |
Is pin 12 connected to ADO or not? Is pin 12 showing 3.3 V?
…On Wed, May 23, 2018 at 3:30 PM, Patrickyp ***@***.***> wrote:
Kris can you help me I'm trying to write high to the AD0/SDO pin of my
sparkfun 9250 but the address is staying at 0x68 even though I made the pin
high.
https://i.imgur.com/jaw8rxF.jpg <http://url>
void setup()
{
Wire.begin();
// TWBR = 12; // 400 kbit/sec I2C speed
Serial.begin(38400);
// Set up the interrupt pin, its set as active high, push-pull
pinMode(intPin, INPUT);
digitalWrite(intPin, LOW);
pinMode(myLed, OUTPUT);
digitalWrite(myLed, HIGH);
pinMode(12, OUTPUT);
digitalWrite(12, HIGH);
delay(2000);
I2Cscan();
and returns
Scanning...
I2C device found at address 0x68 !
done
MPU9250
9-DOF 16-bit
motion sensor
60 ug LSB
MPU9250 I AM FF I should be 71
Could not connect to MPU9250: 0xFF
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qp5Oheq1jjrlt6doLyUEg4CW5xMRks5t1eLogaJpZM4H_-WG>
.
|
@Patrickyp You need to soldier your sj2 centre pad to the right one for and then connect AD0 to 3v3 or gnd for 0×69 or 0×68 respectively. |
@MitalPattani are you talking about the white little rectangle next to the square that looks like it has solder on it? SHould I be connecting solder from the square to the the white rectangle? |
@kriswiner I checked it (ADO) once with a volt meter and it seems to be showing around 3v I will double check again when I get a chance to work on it again but it seems like the sparkfun board needs to have some connection to get the address switchin function that I missed from their guide like Mital mentioned. |
https://www.tindie.com/products/onehorse/ultimate-sensor-fusion-solution/#product-reviews @kriswiner would you recommend buying this as alternative to the sparkfun mpu9250? I'm thinking of trying your version to see if it works well for me. |
This has both the MPU9250 (in a better design than that offered by
Sparkfun) and the EM7180 motion co-processor. With the latter, you can read
quaternions or Euler angles (yaw, pitch, roll) directly from the EM7180 via
I2C register reads . It typically offers 2 degree rms heading accuracy with
proper calibration as well as warm start capability; starting from power on
in a previously calibrated state. It is a relatively low-power solution
providing quaternion updates at the rate of the gyro up to 400 Hz
guaranteed.
Compared to the Sparkfun offering, it is an astounding bargain. So yes, I
would recommend it.
…On Tue, May 29, 2018 at 6:53 PM, Patrickyp ***@***.***> wrote:
https://www.tindie.com/products/onehorse/ultimate-sensor-fusion-solution/#
product-reviews
@kriswiner <https://github.com/kriswiner> would you recommend buying this
as alternative to the sparkfun mpu9250? I'm thinking of trying your version
to see if it works well for me.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qoxyGQXCG1pdS6S1Ri69KXFavKKaks5t3fufgaJpZM4H_-WG>
.
|
Yes the silver coloured pads below which sj2 is written. When you desoldier it you will see 3 rectangular pads, you need to connect one on the centre and right. |
Hi Kris,
I try to use read data from a 9 dof which has written MPY 92/65 on the breakout board. On the back it has written 9250/9255/6500/6555.
So I think I should be able to use your example code. But testing it on two Arduino Uno's and with 3 different breakout boards I keep on getting:
Could not connect to MPU9250: 0xFF.
Both with or without the suggested alterations:
We have disabled the internal pull-ups used by the Wire library in the Wire.h/twi.c utility file.
We are also using the 400 kHz fast I2C mode by setting the TWI_FREQ to 400000L /twi.h utility file.
The uno boards have separate SCL SDA pins. I used those but I also used A4 and A5 as in the sketch.
I use the 3.3 V power supply.
Am I doing something wrong or did I just buy some useless plastic and ceramics?
I hope you can help me out.
The text was updated successfully, but these errors were encountered: