I2C & Pull-up Resistors

Hi,

I’m working with an I2C device that requires pull-ups of the SDA/SCL lines to 3.3V. The attached shows a single pull-up as I have them wired; does this look to be correct? I have my doubts as running a scan of the I2C addresses does not show any available. Thanks for any insight into this.

Kind regards,
Mark Davies

The Uno has pullup resistors built in that pull the SDA and SCK to 5 volts. You must disable those to prevent too much voltage on the I2C bus for your device.

This is from page 215 of the Atmel datasheet.

As depicted in Figure 21-1, both bus lines are connected to the positive supply voltage through
pull-up resistors.

http://www.atmel.com/Images/doc8161.pdf

Here is a post that shows how to disable the pullups.

Thank you for your reply. I have both commented out the Wire code as well as set the ports directly, without effect.

From what I can tell, without the pull-up resistors the I2C lines will not function properly, requiring a base voltage to pull down from. Does anyone know if my wiring is correct (please see Fritzing snapshot above) for a pull-up to 3.3V? Thanks for any insight.

I've been running an adafruit oled panel, a DS1307 RTC and 2x EEPROMs with no external pullups on a Uno ..... but maybe they were working because the built-in ones were activated by default.

Currently I have the EEPROMs removed, but I often run the oled and the rtc with no external pullups.

Sounds interesting. What are these devices rated at; 3.3V? Just to clarify: you're running I2C devices using only the internal pullups? If so, perhaps the use of the resistors is overkill. I'll have to test more, but thanks for verifying this behavior :)

Those are both 5V devices. (Actually the oled is I think 3.3V but it's on a module that allows it to take 5V.) The reason I don't have external pullups is that I didn't even know I2C needed them in the first place, and it's all just worked since I stuck it all together.

I'm not for a moment suggesting my way is a good way, just pointing out that so far it's worked for me. YMMV, E&OE, Ts & Cs apply..... 8) )

Gotcha. I’ve been re-reading the datasheet for the sensor (a CMOS imaging chip) and I believe 3.3V is the max acceptable voltage. Given the cost of the unit I’m hesitant to gamble.

Have you wired an external pull-down circuit before? I’m mostly curious if my wiring is correct.

You need to disable to internal pull-ups and add a pullup resistor to both, the SDA and the SDL line.

The 20k internal pull-ups are very weak and the usual recommendation is 4.7k. For the 400KHz standard I2C frequency the 4.7k will be fine, for higher frequencies and longer lines things can get more complicated.

As you are connecting a 5V device (the Arduno UNO) to 3.3V device a logic level converter is recommended to prevent damage to th 3.3V device. Adafruit has one or more breadboard ready but be aware that some of these breadboard ready offerings already have pull-ups on board so you don't need any additional ones. Read the spec sheets ;-)

Either way, a pullup resistor is an I2C requirement, it will not work without it.

Here's some reading:

Effects of vrying I2C resistors

Nick Gammons I2C pages,

SurferTim: The Uno has pullup resistors built in that pull the SDA and SCK to 5 volts. You must disable those to prevent too much voltage on the I2C bus for your device.

Too much voltage? Like, 100 volts?