Go Down

Topic: easy resistor/schematic question (Read 1 time)previous topic - next topic

nym

Jun 03, 2011, 06:02 pm

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.

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

retrolefty

#1
Jun 03, 2011, 06:17 pm
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

nym

#2
Jun 03, 2011, 06:48 pm
excellent explanations. thank you.

Daanii

#3
Jun 03, 2011, 07:53 pm
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.

Grumpy_Mike

#4
Jun 03, 2011, 11:04 pm
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.

nym

#5
Jun 03, 2011, 11:10 pm
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?

Daanii

#6
Jun 03, 2011, 11:51 pm

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]

Grumpy_Mike

#7
Jun 05, 2011, 01:55 am
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.

Go Up