Pull up resistors

Hi,

I was using the arduino uno, and i had to use external pull up resistors (with the external i mean resistors that aren't in the board, not talking about the chip), to connect my modules to the I2C bus.

I just bought a arduino mega 2560, and from what i saw from the schematics of the arduino mega 2560, they have internal pull up (in the board) resistors connected to the SCL and the SDA.

Let me try to explain better, to connect a MPU6050 or any other I2C component, i had to connect too 2 2.2K resistors. With the arduino mega i have to do the same thing? Or the ones in the board do that?

Grateful

Internal pullup resistors are in the microcontroller. External pullup resistors are outside the microcontroller.

You have done well reading the datasheet, the Arduino Mega 2560 is the only board with 10k pullup resistors on the SDA and SCL lines. Those 10k pullup resistors are external pullup resistors.

Because those 10k pullup resistors on the board are connected to +5V, the I2C bus is a 5V I2C bus, and you can not connect that to an MPU-6050. You need a level shifter.

I use one of these. They have a voltage regulator on the board for 3.3V. http://www.ebay.com/sch/i.html?_sacat=0&_from=R40&_sop=15&LH_BIN=1&_nkw=i2c+level&rt=nc&LH_PrefLoc=2 With that level shifter you have a 5V I2C bus and a 3.3V I2C bus (but the signals travel in both directions so eveything is connected).

Why do you need a low value for the pullup resistors. Are you using long wires ? Or wrong wires ? With long wires, the SDA and SCL should be not close to each other, and also not close to power supply wires. Ribbon cable is the worst for I2C, but also many thin cables are not so good for I2C.

With the arduino mega i have to do the same thing? Or the ones in the board do that?

No the ones on the board do that for you. No need to add any more.

Thanks for all of your replies.

About your reply Caltoa, i know the internal pull up resistors are inside the microcontroller, as explained, i spoke about internal pull up resistor if are in the board or external pull up resistor if they are outside the board.

About the level shifter, i read that they retard a bit the reading of data, is that correct?

About the low values of resistors, they were the recommended ones for the modules that i'm using

Grateful

i read that they retard a bit the reading of data, is that correct?

No, it is rubbish.

Grumpy_Mike:

i read that they retard a bit the reading of data, is that correct?

No, it is rubbish.

Ok, thanks for the reply

Anything outside the microcontroller (the Atmel chip, the ATmega2560) is considered external. So the 10k pullup resistors on the Arduino board are external (well, that is how I see it).

When you want to use the MPU-6050 with the maximum I2C speed, a lower pullup value is better. But not too low ofcourse. With such a level shifter you have : 10k (on arduino board), 10k (one side level shifter), 10k (other side level shifter), 2k2 to 10k (on board of the MPU-6050). That combined will already be a low pullup resistor value.