Resistors with I2C usage in arduino

Hi, I'm very new to electronics, specifically physical computing. my first real project I'm trying to take on is to build a weather station. I want to hook up my humidity sensor (HH10D), and through the reading that I've done it seems that is communicates via I2C. my question is should i be using a resistor(s) when connecting it to the Arduino pins? and if so where in the circuit should the resistors be? my set up is as follows; Vss - Gnd Vdd - +3.3V SDA - A4 SCL - A5 Some guidance and help would be greatly appreciated. Thanks.

jasonvanwyk: Hi, I'm very new to electronics, specifically physical computing. my first real project I'm trying to take on is to build a weather station. I want to hook up my humidity sensor (HH10D), and through the reading that I've done it seems that is communicates via I2C. my question is should i be using a resistor(s) when connecting it to the Arduino pins?

Only if you're having problems because of long wires, etc. Normally the devices have built-in resistors which are sufficient.

I²C uses open-drain IO pins, so pull-up resistors on the SCA and SCL lines are required. Typically these are around 4.7K? and go from the SCA pin to VCC, and the SCL pin to VCC.

When longer wire lengths are used... the pull-ups may need to be slightly stronger to overcome the impact of copper length. With 4.7K being the starting point, you might see improvement using 3.3K or 2.2K instead. Going to a lower is pull-up value is not ideal and should have you maybe re-thinking the solution... IE; maybe time to add a I2C repeater IC in the path.

The Wire library, which does the I2C communication, enables the internal pull-up by default. However, they are very weak (30-60kOhm). So for relatively short runs, they’ll work fine.

Even so I generally still put a 4k7 resistor on the lines, regardless if it is a “short” length.

[quote author=James C4S link=topic=155717.msg1168217#msg1168217 date=1363983359] The Wire library, which does the I2C communication, enables the internal pull-up by default. However, they are very weak (30-60kOhm). So for relatively short runs, they'll work fine. [/quote]

The I2C gadget on the other end usually has pullups, too...

fungus: The I2C gadget on the other end usually has pullups, too...

True.

However, in this case, it doesn't appear the board has pull-ups: https://www.sparkfun.com/datasheets/Sensors/Temperature/HH10D.pdf

Some oscilloscope screen-shots here showing what the pull-up resistors do:

http://gammon.com.au/i2c