Shop OBEX P1 Docs P2 Docs Learn Events
multiple pull-ups on I2C bus — Parallax Forums

multiple pull-ups on I2C bus

I'm building a weather data recorder (using flash memory to store data, see [simple spi flash program]) and most of the input devises that use I2C have built in pull-up resistors on the module.
Since all data and clock lines are tied together, can I get rid of some of the resistors? Is just 1 set enough? Or should the built-in ones be replaced by a pair of discreet resistors on the Quickstart board.

On a separate question, are pull-ups needed on both SDA and SCL

As of now there are 4 I2C devices on the bus, each having it's own pull-ups. It is working good right now however 4 4K7 resistors in parallel may be drawing more current than necessary. Could that affect communication?

Thanks for your input
Aaron

Comments

  • BeanBean Posts: 8,129
    One set is all that is needed.

    More than four sets might start causing problems if the propeller can't pull the lines low.

    Bean
  • jmgjmg Posts: 15,173
    AGCB wrote: »
    On a separate question, are pull-ups needed on both SDA and SCL
    Some designs CMOS-drive SCL for simplicity, (saves the SCL pull-up) but that is outside the formal i2c spec, and does not allow SCL clock stretching.
    Some simpler slaves to no use Clock Stretching,

    You can remove pull-ups, but you do need to ensure there is at least one pair.

  • SRLMSRLM Posts: 5,045
    The best way is to scope out the lines and see what the shape of the curve is. As long as it's not a sawtooth you should be fine.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-11-13 23:13
    A lot depends upon how far apart the modules are and how they're connected. If distance is a significant factor, I would put 10K pull-ups at each end of the bus on SDA and a 4.7K pull-up on the slave end only for SCL (unless you're using clock-stretching, in which case SCL should be done the same as SDA). But if the master and all the slave devices are proximal to each other (e.g. on the same board), one pull-up on each line is good enough.

    Also, if the bus is operating at 3.3V, you can easily use smaller pull-ups. For example, 3.3K on a 3.3V bus will source almost as much current as 4.7K on a 5V bus.

    -Phil
  • Thanks for all the info. All modules will be on one board on a pole next to house and USB cable run to inside computer. At least that's how I think it will be.

    Aaron
Sign In or Register to comment.