Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Pull-up resistors on i2c bus. Enough is enough?


  • Please log in to reply
3 replies to this topic

#1 Spork

Spork

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 22 September 2011 - 06:27 AM

I've had Adafruit BMP085 and SparkFun DS1307 breakouts on my N+ i2c bus for a while. Both have pairs of pull-up resistors.

Q1: I added a 24LC256 EEPROM to the bus, along with the other two devices. I *didn't* add pull-up resistors along with the EEPROM because I'm assuming that SDA and SCL are already pulled-up by the resistors on the first two breakouts. Am I right?

Q2: If one were to keep adding breakout boards on an i2c bus, and each breakout board had its own pull-ups, that would amount to resistors in parallel so that the overall effect would be less resistance than the smallest of the individual resistors, right? I imagine this would eventually become a problem...

I just found this interesting web page that investigates the effects of different pull-up resistors on i2c signals. I guess that if I'm really concerned about how it's all playing out, I better buy an oscilloscope and do my own similar analysis. Always wanted an excuse to buy one but not sure I'd use it often enough to justify the cost.

#2 Stefan W.

Stefan W.

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts

Posted 22 September 2011 - 06:44 AM

Answer to Q1: yes, if the new device doesn't use a faster speed than the others (see below). Answer to Q2: Yes, you can compute the resistance of resistors in parallal as Rnew = 1/ (1/R1 + 1/R2), so if you add two equal resistors you would end up with the half resistance of a single resistor. Less resistance means there is more current to be sunk if you want to pull the line low (but faster speeds), so you shouldn't go below 625 ohm (which would happen if you have two devices with 1kohm pullups (if they want to use 1mbit/s) in parallel, or 4 devices with 2.2kohm pullups), also if there's power consumption considerations you should count this in.
I believe that no discovery of fact, however trivial, can be wholly useless to the race, and that no trumpeting of falsehood, however virtuous in intent, can be anything but vicious.
-- H.L. Mencken, "What I Believe"

#3 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 22 September 2011 - 07:18 AM

Stefan is right. I would add a couple of thing about. 1) instead of a pull-up, you may consider a constant-current generator. It has the advantage that charges the stray capacitances a bit faster than a resistor. The problem is that many circuits embed a pull-up, and you cannot detach it. 2) the I2C wiring should be kept short enough. However, you may also use a relatively long wiring (e.g. some meter), at the following conditions: use a shielded cable, avoid the fast-mode (keep the clock slow enough), and -important- the impedance must be adapted. By "adapt" the impedance, I mean the pullup resistor must match side-by side. It's much like a point over the I2C, because I've just found some issue over the SPI when the clock frequency is over 10-20MHz, and the wiring is only 15cm long. Sometimes even a simple circuit may not work. Cheers
Biggest fault of Netduino? It runs by electricity.

#4 Tobias Vandenbempt

Tobias Vandenbempt

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts
  • LocationGenth, Belgium

Posted 25 November 2013 - 03:12 PM

Hey, 

 

I'm a beginner in Netduino and I've bought myself the microcontroller and the BMP085 ( amongst other things)

 

I have no experience regarding the wiring of I2C board. Can someone help me get on my way? 

 

I've bought this version, so no pull up resistors are required if I understood correctly.

https://www.sparkfun.../products/11282

 

You can follow my progress on http://netduinoblog.wordpress.com

 

Thanks in advance, 

Tobias






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.