Electronic – How to deal with multiple pull-up resistors on modules

i2cmicrocontrollerparallelpullupspi

I was thinking about doing a modules for a development board I did a few days ago that will include spi/i2c interfaces.

The problem is that I didn't included pull-up resistors in the MCU pins in the main board and was thinking to add them in the modules to make them more "generic" so every user could use them without need to add extra resistors in the prototype board.

But then I faced the next problem. If I add the pull-up resistos in the extra modules and I connect for example two or more modules to the same bus I'll get those resistors in parallel so the resistance will drop and will not accomplish their function.

But if I add the pull-up resistors to the main board I'll have those pins in the MCU always as active low.

So the main question is:

How to have multiple modules connected to the same bus having on each of them the pull-up resistors but not get them in parallel when you've more than one module? Is that possible?

Or the best solution here is enable the pullup resistors in the MCU and don't inlcude them in the modules?

Thanks.-

Best Answer

I'll assume that the total length of each of your buses is under 1 meter, which is typical for plain I2C and SPI. Also, the bus capacitance is within the spec.

There should be only one (1) set of pull-up resistors. As a result, the best place for them is on the main controller board. Don't put the pull-ups on the modules.

If you want to have pull-up in some cases and not have them in other cases.

  • Do not populate the pull-up resistors, when you don't need them.
  • Design the main controller board such that pull-ups are connected to the signal lines through jumpers. Remove the shorting blocks, when you don't need the pull-ups.

edit: Frankly, I think it's a mistake that Sparkfun puts pull-ups on I2C slave modules. Unfortunately, not everyone who buys modules realizes that excessive pull-up can be a problem. It would be nicer if the controller boards (instead of slave peripheral boards) had pull-ups with solder jumpers.

Oh... Wait... Arduino doesn't carry the (optional) pull-ups (although perhaps it should). So, let's schlep pull-ups everywhere. Easier initial out-of-the-box experience. But add a few slave modules and the bus will stop working.

update (May 2015) :

update (Dec 2015) :
Similar questions about troubleshooting I2C with multiple modules keep popping up on message boards. Attempt at an extended general response.