Knowledge Builders

what happens if the pull up resistor for an i2c signal is too large

by Ernesto Streich Published 3 years ago Updated 2 years ago

If your pull-up resistor is too large, then it won't be able to overcome the leakage current. If it just barely overcomes the leakage current, then any noise in the circuit could be enough to change the input.

What happens if the pull-up resistor for an I2C signal is too large? This will limit the data rate. While the actively driven high to low transitions are sharp, the low to high transitions will be comparatively slow.

Full Answer

What happens if pull-up resistor too high?

If the pull-up resistance value is too high, combined with a large leakage current of the input pin, the input voltage can become insufficient when the switch is open. This condition is called having a weak pull-up.

What does pull-up resistor do in I2C?

The pullup resistors pull the line high when it is not driven low by the open-drain interface. The value of the pullup resistor is an important design consideration for I2C systems as an incorrect value can lead to signal loss.

How do I choose a pull-up resistor for I2C?

These pull-ups would draw 3.3V / 1.77 k = 1.86 mA each when SCL / SDA is low. So, theoretically, if this bus has the absolute maximum amount of capacitance on it, this bus should use at least 1.77 k Ohm pull-up resistors, down to 171 Ohm resistors if their maximum low drive strength is 13.5 mA each during SCL/SDA low.

Do you need a pull-up resistor for I2C?

The I2C bus must have pull-up resistors, one on the SDA line and one on the SCL line. They're typically 4.7K or 10K ohm, but should be in the range of 2K to 10K.

How many pull up resistors for I2C?

The I2C bus only needs one set of pull up resistors, regardless of how many target devices are connected.

How do you determine the pull-up resistor value?

The voltage across the pull-up resistor is equal to Vout minus VPG. The datasheet gives a maximum value for VPG (called VOL and typically 0.3 V or 0.4 V), but it could be 0 V which would result in a higher current flowing through the pull-up resistor than if it were at the maximum specified voltage.

Why do we connect pull up resistors to SCL and SDA lines in I2C protocol?

Why is a pull-up resistor used in I2C? Because there are only 2 logic level outputs from I2C, Low and open circuit. The default condition is all chips on the line are in open circuit mode, and the pull-up resistor makes the line high. The master chip can send an address signal to one of the chips on the line.

How do you wire a pull up resistor?

We will feed it 5V of power, so we give +5V to pin 14 and we connect pin 7 to GND. This establishes power to the chip. Next we connect pull up resistors to each of the inputs of the NAND gate. A pull up resistor circuit first has a resistor connected to positive voltage and then a pushbutton connected to ground.

What is clock stretching in I2C?

Clock stretching is a method for any I2C device to slow down the bus. The I2C clock speed is controlled by the master, but clock stretching allows all devices to slow down or even halt I2C communication. Clock stretching is performed by holding the SCL line low.

How do you use a pull down resistor?

Unlike the pull-up resistor, the pull-down resistor pulls the pin to a low value instead of high value. The pull-down resistor which is connected to the ground or 0V sets the digital logic level pin to default or 0 until the switch is pressed and the logic level pin becomes high.

Does Arduino I2C have pull up resistors?

The total pullup resistor (the lowest resistor value) can be calculated for a maximum of 3mA. A very high pullup value makes the I2C bus high impedance for when the signal is high. I would recommend at least 4k7 pullup resistors, but many use 10k pullup resistors. Good: 4k7 pullup resistors at the Arduino board.

How do you check I2C lines?

Test and Validate Key I2C FeaturesSTART and STOP condition generation. ... ACK and NACK condition generation. ... The response of the device under test in different states: idle, read, write, address_match, ACK.Synchronization of the clock between the master and slave. ... Validation of 7-bit address.More items...•

What is the resistor on an I2C circuit?

As discussed in the I2C Basics module, the resistors that are commonly seen on I2C circuits sitting between the SCL and SDA lines and the voltage source are called pull up resistors. But what is a pull up resistor?

What is pull up resistor?

A pull up resistor is used to provide a default state for a signal line or general purpose input/ouput (GPIO) pin. Typically they are of high resistance thousands or tens of thousands of ohms of resistance.

What is 18K resistor?

An 18K resistor represents the largest resistor we could use for pullup resistors on the I2C and SPI Education Shield (because 18K would work for both buses, no need to use two different values). Conversely, a 1K5 resistor is the smallest value we could use without burning up the I2C pins of our devices. We want to hit a value somewhere in the middle, and that is why when you look at the schematic excerpt of the I2C subsystem from the Education Shield at the very top of page, the pull up resistors are 10K.

What voltage should SCL and SDA lines be?

So, when we hook everything up to our Arduino, we need to ensure that our SCL and SDA lines are above 3.5V to register as a logic high signal, and below 1.5V to register as a logic low signal. Everything in between is… well… HIC SVNT DRACONES.

Why do you care about capacitors?

So, you’ve got a bunch of little capacitors all laying around connected to your I2C buses, why do you care? Because a capacitors job is to develop and release a charge across it’s conductive elements, and the larger the capacitor, the longer it takes for that charge to build up or release. So if your I2C bus, with all the PCB capacitance and pin capacitance added together, winds up with a capacitance large enough, it will work to prevent the rapid changing of a voltage level on that bus, and suddenly you can’t make those quick snaps from logic low to logic high as cleanly as necessary.

What is a capacitor in a circuit board?

A capacitor is a pair of electrically conductive surfaces with some sort of dielectric material sandwiched between them. This is pretty much also the exact definition of what a printed circuit board is. Unless you’re doing home etching or cheap power supply design, your boards will have the capability of copper laid on both sides of the board. Typically, at least one of those sides is used as a “ground plane”, meaning a giant field of copper that can be connected to from any point on the board by drilling a copper plated hole through the thing to provide a very quick and very low resistance path to ground. The thing that gets drilled through, is typically a material called FR4, a form of fiberglass… technically a flame resistant glass-reinforced epoxy laminate sheet if you’d like to impress your geek friends. What you wind up having is copper on the top, copper on the bottom, and dielectric smack dab in the middle: a capacitor — a dramatically inefficient one — but a capacitor none the less.

Is Arduino fast mode plus?

These two aspects of pull up resistor specification are captured in these two charts from the NXP I2C Manual (note: the Arduino is not capable of Fast-mode Plus)…

Why is pull up resistor needed?

As you can see; the pull-up resistor is needed to ensure a logic 1 is seen at the output when the TTL logic is not driving the output low. TTL logic cannot drive the lines high as I already mentioned. If this were not present, the output would be left floating and it's unpredictable what you may see at the output (for all you know, your microwave or the intestinal dysfunctions of your co-workers caused by a certain sugar-free gummy bear could cause the value to fluctuate).

What is I2C protocol?

1. I2C is a TTL-logic protocol ; so your data and clock lines are open-drain. In other words, the I2C hardware can only drive these lines low; they are left floating when not a zero. That's where the pull-up resistors come in. This is a simplified diagram, but work with me for a second.

What is the VCC of a PIC18F4550?

PIC18F4550, Vcc=+5V, 2.2kΩ pull ups. Waveform shows SCL. The rise time on SDA is about the same. The physical size of the bus is moderate: 2 slave devices, PCB length ≈100mm.

Does ATmega have pull ups?

Probably, you have internal pull-ups enabled on the ATmega. From what I've read 1, ATmega have 20kΩ internal pull-ups, which can be enabled or disabled from the firmware. 20kΩ is way too weak for the I 2 C pull-up. But if the bus has a low capacitance (physically small) and communication is slow enough, then 20kΩ can still make the bus work. However, this is not a good reliable design, compared to using discrete pull-up resistors.

Can I2C be used with a microcontroller?

Now, if you were to implement I2C in software with a microcontroller, this would likely not be too much of an issue as it will most likely be using CMOS logic, which can drive outputs both high or low.

Does I2C work?

Your I2C lines will not work at all. If I'm not mistaken, I2C just asserts low signals, but does not return them to back to a high state, which is why you need those resistors.

Can I 2 C be used for communication?

There will be no communication on the I 2 C bus. At all. The MCU will not be able to generate the I 2 C start condition. The MCU will not be able to transmit the I 2 C address.

What happens if a resistor is too large?

If your pull-up resistor is too large, then it won't be able to overcome the leakage current. If it just barely overcomes the leakage current, then any noise in the circuit could be enough to change the input.

How much would 10k resistors reduce current?

Using a 10K resistor would reduce both current and power by a factor of three. If there will be a lot of communication on the I2C bus, that power consumption may end up being a significant portion of overall power drain especially if the bus may sit low for extended periods of time.

What is the maximum pin capacitance of a microchip?

The Microchip 24LC256 specifies a maximum pin capacitance of 10pF (which is fairly typical). Count up the number of devices you have in parallel on the bus and use the formula above to calculate a range of values that will work.

How to save power on I2C?

To save power, it may be helpful to have a "pull-up" resistor connected to an I/O pin rather than to VDD. While I haven't seen hardware I2C implementations offer support for this, having the master output data on a separate I/O pin that's connected to the bus via resistor rather than using an open-collector driver and a fixed pull-up resistor will avoid wasting current when the master wants to output a "0". In addition, if the master is going to leave SCK low for awhile without caring about what's on SDA, the master may disable the pull-up until it's ready for some more communication. If none of the devices need to use clock stretching, the master can simply use a direct output for SCK and not bother with any pull-up on that wire.

What resistor is needed for SDA bus?

The SDA bus requires a pull-up resistor to VCC (typical 10 kΩ for 100 kHz, 2 kΩ for 400 kHz and 1 MHz).

Why do higher frequencies require lower resistance pull ups?

It makes sense that higher frequencies require lower resistance pull-ups: a lower resistance will charge/discharge the cable's capacitance faster, which results in steeper edges. With the wider pulses of lower frequencies a less steep edge won't influence the pulse's shape as much.

How much current does a digital output need to be to pull the pin down?

If you use less than 1k, the output will not be able to sink enough current to pull the pin all the way down to 0V. If you use a bigger value, like 10k, then the pin only has to sink 0.5 mA, which is much less than it's rating.

How does a pull down resistor work?

A Pull-down resistor works in the same way as the previous pull-up resistor, except this time the logic gates input is tied to ground, logic level “0” (LOW) or it may go HIGH by the operation of a mechanical switch.

What is the maximum pull down resistor?

Then the maximum pull-down resistor value is calculated as 2kΩ. Again, as with the pull-up resistor calculations, this 2kΩ resistor value leaves no room for error as the voltage drop is at maximum. So if the resistance is too large, the voltage drop across the pull-down resistor may result in a gate input voltage beyond the normal LOW voltage range, so to ensure correct switching it is better to have an input voltage of 0.5 volts or less.

What is the maximum voltage of a TTL logic gate?

From above we saw that the maximum voltage level that represents a logic “0” (low) for a TTL 74LSxxx series logic gate is between 0 and 0.8 volts, (V IL (MAX) = 0.8V). Also when LOW, the gate sources current to the value of 400μA, (I IL = 400μA). The maximum pull-down resistor value for a single TTL logic gate is therefore calculated as:

What is the maximum resistive value for pull up resistors?

Then we can see that while there may be a maximum allowable resistive value, the resistance value for pull-up resistors is not usually that critical with resistance values ranging from between 10k to 100k ohms acceptable.

What is the maximum pull up resistance required to drop 3 volts for a single TTL 74LS logic?

Then using Ohms Law, the maximum pull-up resistance required to drop 3 volts for a single TTL 74LS series logic gate would be 150kΩ. While this calculated value would work, it leaves no room for error as the voltage drop across the resistor is at its maximum while the input current is at its minimum.

Why is a passive pull down resistor more critical with TTL logic gates than with similar CMOS gates?

This is because a TTL input sources much more current out of its input in its LOW state.

What is the minimum LOW current value?

Reducing the resistive value further, will produce a smaller voltage drop tying the input further to ground (low). This datasheet value of 400μA or 0.4mA (I IL) is the minimum LOW current value but it may be higher.

What is the connection for an I2C resistor?

For i2c communication either pullup resistor or pull down resistor is connected to the i2c bus line.

What happens when a pull down resistor is low?

With the pull down resistor being low, the combined parallel impedance to ground of the input and the pulldown becomes smaller than the smaller value, the pull down resistance, which is far smaller than the input impedance. The parallel impedance to ground now merges into a single series element in series with the parasitic capacitance to an arbitrary Vcc noise source. The smaller the impedance to ground compared to the large capacitive reactance, the closer the Vdrop from the pin to ground gets to 0V. Without the pull down resistor, the input impedance would rival the size of the parasitic capacitive reactance and VRof the input would be much larger as R would be a much larger portion of the circuit impedance.

What is the logic for i2c?

You also can define, that if nothing is send, the line should be 0, so you need a pull-DOWN. i2c uses also positiv logic (1=HIGH, 0=LOW) but let the line HIGH on IDLE. the reason is that in most cases it is easier to have only one V+ connection and let the devices pull-DOWN the line to ground if they want send data so they use pull-UP.

Why pull down resistor?

In general, a pull down resistor is required to bring a pin to a defined voltage when the effects of near and far field interference are exacerbated such as when the pin has a high input impedance and is left floating. In order to read a 0 on the pin, it has to be pulled to 0 in these conditions, because if it is left floating, you will read an arbitrary value. The lower resistance between the input and the place of 0 potential, the lower the magnitude of the noise such that it fits within the noise margin of correctly reading a digital 0.

What does it mean when the input is high-Z?

High-Z means that the pin is not pulled high or low, and the input impedance is high enough to see high enough voltage noise that the state does not fit within the margins of the defined logic levels.

Is EMI a far field effect?

The overriding of far field effects such as EMI is much more complex to explain, but it effectively has the same result

Is the voltage at the input pin defined by Ohms law?

Similarly here, without the pull down resistor, the voltage at the input pin defined by ohms law is completely unknown.

1.What happens if the pull-up resistor for an I2C signal is …

Url:https://www.quora.com/What-happens-if-the-pull-up-resistor-for-an-I2C-signal-is-too-small

32 hours ago  · The multiple sets of pull up resistors act in parallel and thus reduce the total pull up resistance as seen by the I2C bus. However, this is generally not an issue, since I2C will …

2.What happens if I omit the pullup resistors on I2C lines?

Url:https://electronics.stackexchange.com/questions/102611/what-happens-if-i-omit-the-pullup-resistors-on-i2c-lines

9 hours ago  · I2C maximum value of pull-up resistor (explanation), Pull-up resistor value I2C; higher than 400 pf capacitance, I2C pull-up resistors calculation & where to place them …

3.Is there a correct resistance value for I2C pull-up resistors?

Url:https://electronics.stackexchange.com/questions/1849/is-there-a-correct-resistance-value-for-i2c-pull-up-resistors

4 hours ago The maximum pullup resistance is limited by the bus capacitance (Cb) due to I2C standard rise time specifications. If the pullup resistor value is too high, the I2C line may not rise to a logical …

4.Pull Up Resistors | Working with I2C Devices - Adafruit …

Url:https://learn.adafruit.com/working-with-i2c-devices/pull-up-resistors

33 hours ago What happens if the pull-up resistor for an I2C signal is too large? If your pull-up resistor is too large, then it won’t be able to overcome the leakage current. If it just barely overcomes the …

5.Pull-up Resistor and Pull-down Resistor Explained

Url:https://www.electronics-tutorials.ws/logic/pull-up-resistor.html

14 hours ago

6.what is the purpose of pullup and pulldown resistor in i2c …

Url:https://stackoverflow.com/questions/16291994/what-is-the-purpose-of-pullup-and-pulldown-resistor-in-i2c-bus

17 hours ago

7.I2C Bus Pull-Up Resistor Calculation - Texas …

Url:https://www.ti.com/lit/an/slva689/slva689.pdf

14 hours ago

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9