i2c freeze Drotek 10 dof IMU

Hi,
I am trying to use this 10 dof imu from Drotek containing an MPU-6050 gyro-accelerometer and other sensors.

The code I'm using in setup is:

Serial.begin(9600);
Wire.begin();
Wire.beginTransmission(0x69); //Address of mpu-6050 in this IMU is fixed
Wire.write(0x6B); 
Wire.write(0);
Serial.println("data sent");
Wire.endTransmission(true); //WHERE THE PROBLEM OCCURS
Serial.println("transmission finished"); //NEVER REACHED

When connecting to the MPU6050, no matter what library I use, i2c freezes on initialization, when the first Wire.endTransmission(true) is run. Even the i2c scanner doesn't finish running. The sketch freezes no matter what sensor I'm trying to connect to, and the same problem occurs even when trying to connect to a not existing address.

I've obviously double-checked the connections and disabled the internal pull-up resistors from Wire/utility/twi.c, as recommended by Drotek.

Is anyone else having this problem? How can I solve it? Thanks in advance.

The link on the website of drotek to the schematic doesn't work at this moment.

http://playground.arduino.cc/Main/I2cScanner
Let the i2c_scanner run and try connecting GND, 5V.
Connect the SCL, is the i2c_scanner still running ?
Connect the SDA, still okay ?

When SCL or SDA is shortcut to ground, or shortcut to each other, the Wire.endTransmission halts.

Thanks for answering

Sorry for the broken link, here is is the schematic.

I've done the test you recommended me. I've tried both with internal pull-ups enabled and disabled. These are the results:
PULL-UP on:
Nothing connected: scanner ends with no found devices
+5v and GND connected: scanner ends with no found devices
SDA or SCL (or both) connected: blocked in first loop.
PULL-UP off:
Nothing connected: scanner ends, slowly and with unknown errors for every address
+5v and GND connected: same errors as if nothing connected, slower then with nothing connected
SDA or SCL (or both) connected: blocked in first loop.

I have measured with a multimeter that, obviously, there is connection between SDA and SCL pins, but with an obvious 2kΩ resistance. I've also seen that there is no connection between GND and either SDA or SCL.

Thanks for the schematic. I could not see it because Google was down at that moment :confused:
I'm not happy at all with the circuit design by Drotek :smiling_imp:
Perhaps nothing is broken, but the circuit is the problem. How shall I call that ? "not working by design" ? :confused:

Which Arduino board do you use ? An Arduino Uno or Pro Mini 16MHz ?
Are you sure that you used the Arduino 5V pin to the IMU 5V pin ?

It is possible to use a 3.3V sensor with 4k7 pullup resistors to 3.3V and the internal pullup resistors in the Arduino still active.
But now there are 1k pullup resistors on the IMU to 3.3V. The current when pulled to ground is 3.3mA, and the Arduino specification for I2C is only 3mA.

If you use a 3.3V 8MHz Arduino Pro Mini or a Arduino Due board or a Arduino Mega 2560 board, don't read further...

For a normal Arduino Uno, this is the best : keep the internal pullup resistors active, that's okay. Remove the 1k pullup resistors from the IMU and use a level shifter between the Uno and the IMU.

Those level shifters have 10k pullup on both sides on both SDA and SCL, that is enough pullup.

For testing, remove the 1k pullup resistors from the IMU and use 4k7 pullup resistors to 3.3V. If the 4k7 resistors are soldered well and can't fall off, the internal resistors might be kept active. That will work without level shifter, even if that is beyond the specifications.

Thanks :slight_smile:
I am using an Arduino Uno r3, but i can try with the Mega 2560 of a friend. Would it be different? Isn't the 2560 operating at 5V?
Maybe it can tolerate a higher current?

I think I've understood your suggestion, but i can't find the resistors, there are a lot of capacitors and i can see a 1kΩ resistor, but can't find the other one :grin:

I'm not good at soldering and I think that, once desoldered, I won't be able to solder the SMD resistor back, so I can't just try one component hoping it's the right one :smiley: . I also think the PCB has more than one layer, so it's difficult to follow the tracks.

Can you suggest me any way to find the resistors? Is there any way to achieve the same result without physically modifying the IMU?

The Mega 2560 is not better, stay with the Uno.
Can you buy a I2C level shifter ? Then you can remove the 1k resistors on the IMU module.

All the brown smd components are capacitors.

There are two small black components side by side. Perhaps they have a label "102".
If you follow the copper trace, they are connected to SDA and SCL.
One trace is going to the other side, but I can follow it on the photo.

Take a big blob of solder and drop it on both sides of the smd component. The heat from the big blob should be enough to desolder it. Keep the board on its side or a little up-side-down, and the smd component falls off.

Don't try to connect it to the Arduino Uno without the 1k resistors and without level shifter, you might damage the sensors.

two-resistors.jpg

OK, thanks a lot

I think I'll go for your solution and buy a level shifter. Is this ok? It is 5-3v, not 3v3... (If it's against the forum rules, I'll remove the link to the product)

Just one more question, as I have a raspberry pi, just to test, can I make the IMU work with it before desoldering the components, as it has 3v3 logic level? It can be useful to understand if the damage is in the sensor, too, before I spend time with the IMU.

Thanks :slight_smile:

I think you can try the Raspberry Pi, is there some kind of i2c scanner for it ?

I use those tiny level shifters from Ebay. And they are 3.3V, even if the label says 3V.

You can insert links, that's no problem. If someone has a link to a product in his own shop, that seems to be no problem either. As long as it helps the community and it is clear and open. The moderators are friendly dudes.