Effects of Varying I2C Pull-Up Resistors

Internal-Pull-up100kHz

I2C is a popular communication protocol in embedded systems.  When interfacing with the slave device a pull-up resistor is needed on each bi-directional line.  One common question that arises is "what size pull-up resistor should I use?".  Instead of going through a bunch of theory and calculations I thought it would be easier to show what happens to the signals when different resistor values are used.

Since the Arduino is a popular micro-controller among hobbyists we'll use it for the following examples.  We'll interface the Arduino to a DS3231 Real Time Clock, which is a 5 volt device.  We'll also look at the effects on the signal with varying speeds of I2C (100 and 400kHz clock signals).

We'll set up our oscilloscope to measure rise time, frequency and peak voltage.  Frequency? Why do we want to measure frequency, I thought the clock frequency was running at 100kHz...well let's just see what the scope says.  Since the capacitance is roughly the same for the SDA (data) and SCL (clock) lines we'll only vary the resistance on the SCL line and keep a standard 4.7k ohm resistor on the SDA line.  It's just easier to analyze a repetitive clock signal on the oscilloscope than a data pattern.  

Page 5 of 5

Login

 GET IN TOUCH

Go to top