Pages: [1]   Go Down
Author Topic: I2C pull-ups  (Read 479 times)
0 Members and 1 Guest are viewing this topic.
Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know that in an I2C environment, one needs to add pull-ups to the SDA and SCL lines.  I'm seeing more and more devices that have those pull-ups on them.  So the question is: is it ok to have more than one set of pull-ups along the chain?  For example, if I add 10K pull-ups at the beginning of the chain (right at the master), then plug in two devices that have their own pull-ups, one with 4.7K and another with 10K, will that cause problems?
Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 282
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That depends ;-)

The pull-up resistors in the set- up your setup  are basically arranged on the bus in parallel configuration so 2x 10k and one 4.7 k comes out to 2.42 Ohm. That should still be ok.

Usually you only need one pair of pull-up resistors on the I2C bus.

There are a couple of excellent resources that explain things in more detail:

http://gammon.com.au/i2c
http://dsscircuits.com/articles/effects-of-varying-i2c-pull-up-resistors.html
Logged


Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, the problem is these devices that come with the pull-ups already installed on them and no way to disable them.
Logged

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am experimenting with I2C at the moment , and hope to have 30 chips ( close together ) running off the same SCL , with 2k2 pullups.

The SDA  are fed via analog multiplexers - CD4051 .

I have kept the pullups low resisance to try and counteract the capacitance of the cable and the 30 chips.

I only have a couple of chips connected at the moment while I get the software tested, but I might have to slow the I2C clock down to 10 KHz  ( from 100 KHz ) if I run into timing problems.

So your 10k and 4k7 should cause no problems, my 2k2 is working fine.
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

They won't cause problems ... now.  If I end up with 50 devices, each with 10K (max) pull-ups, I'm not sure how well that'll work.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33961
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the problem is these devices that come with the pull-ups already installed on them and no way to disable them.
A soldering iron is a good way to disable them. Failing that get devices without pull ups on. They are only on ready made boards not the actual chips. Good board have links so you can disable the pullups.
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2883
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ohms law and the current capacity of the port driving the 12C bus will determine the min value for the pull-up's. The more current available the faster the port can drive the bus and as noted bus capacitance can be controlled by making more current available for the bus by lowering the pull-up resistance.

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Pages: [1]   Go Up
Jump to: