Pages: [1]   Go Down
Author Topic: easy resistor/schematic question  (Read 657 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 150
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



howdy again. here you will see a circuit i posted in another thread, but i have a different (slightly embarrassing question)
notice in the upper left corner the shield...note the 30k resistors connecting the lines out to the arduino to 5v.
ok, so radioshack doesn't have 30k resistors, nor do i in my awful and disorganized tangle of resistors.
i do have 33k resistors. could i substitute these? what function do these resistors play in the i2c circuit?

i could POSSIBLY cobble together a couple 30ks from the tangle if i need to but convenience begs me to use the 33ks.

your charity is greatly appreciated.
if you enjoy spaghetti western film score and/or instrumental hip hop, check out my album at http://music.ratsofnym.com
if you like what you hear, shoot me a message and i'll give you a free copy of the mp3s. a small thank you, but a thank you nonetheless.

nym
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
what function do these resistors play in the i2c circuit?

The two I2C signal lines, clock and data, are bidirectional so they require that the signal lines be pulled up to the Vcc voltage with resistors. The value is very non-critical, just use the closest value to the suggested value.

Lefty

 
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 150
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

excellent explanations. thank you.
Logged

Northern California (by San Francisco)
Offline Offline
Sr. Member
****
Karma: 3
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As others have said, the values for the pull-up resistors do not matter too much. So 33k instead of 30k should be fine. But your circuit seems a little strange. I'm no expert on I2C buses, but 30k Ohms seems very high for the pull-up resistors.
Logged

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

Quote
but 30k Ohms seems very high for the pull-up resistors.
I agree, especially with such a low bus voltage as 3v3. With this sort of voltage I would expect a pull up resistor of 3K3 almost ten times lower than you have here.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 150
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for the consideration.
i received this email from Steve Hobley, who hosts this image. he did not create this shield for the i2c, rather adapted it for his own purposes.

Quote
Hi,
 
Technically they're just pullup resistors - so I suspect 33K will be just fine. Most of the time I just 10K, but since we're dealing with 3.3v and not the normal 5v there might be a reason for a higher value.
 ...
In fact, I think I might have used 33K the last time around - for the same reason as you.
 
Steve

but you think 3k would be better suited?
Logged

Northern California (by San Francisco)
Offline Offline
Sr. Member
****
Karma: 3
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

but you think 3k would be better suited?

Unless you've got an unusual application (long wires, different sort of chip), the value of the pull-up resistors is not going to matter much. That said, in those unusual applications, the selection of the pull-up resistors will be important to get good, reliable signals.

Also, due to Ohm's Law, the higher the resistance, the lower the current drawn, so a larger resistor will give you a more efficient circuit. But the practical effect of that here will be minimal.

The tutorial at the link KE7GKP provides above says it well:

Quote
The value of the [pull-up] resistors is not critical. I have seen anything from 1k8 (1800 ohms) to 47k (47000 ohms) used. 1k8, 4k7 and 10k are common values, but anything in this range should work OK. I recommend 1k8 as this gives you the best performance. If the resistors are missing, the SCL and SDA lines will always be low - nearly 0 volts - and the I2C bus will not work.
uote]


Logged

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

Quote
But the practical effect of that here will be minimal.
I disagree. Too high a pull up resistor will increase the susceptibility to interference, it will slow down the clock edge and as a result could reduce the data speed. Finally it could upset other devices on the bus by not supplying enough current into the bus.
You have to look at the data sheet of the devices you are using to find out if this out of the normal value is acceptable.

Quote
so a larger resistor will give you a more efficient circuit
It is a circuit that uses a negligible amount less current, it is not more efficient. In fact if it results in failure then it is not even a circuit.
Logged

Pages: [1]   Go Up
Jump to: