Pull up resistors on SCL and SDA
Alexander (Sandy) Hapgood
Posts: 360
I've been looking through the schematics for the various Prop boards out there.
All have pull up resistors on the SDA line but only some have pull ups on the SCL line. These are usually 10K resistors but I note that one board uses 4.7K on both the SCL and SDA lines.
The P8X32A Datasheet shows a 10K pull up on the SDA line only so I'm guessing that is probably a safe way to go?
Why wouldn't the application of resistors be consistent across the various designs?
Regards,
Alexander (Sandy) Hapgood
All have pull up resistors on the SDA line but only some have pull ups on the SCL line. These are usually 10K resistors but I note that one board uses 4.7K on both the SCL and SDA lines.
The P8X32A Datasheet shows a 10K pull up on the SDA line only so I'm guessing that is probably a safe way to go?
Why wouldn't the application of resistors be consistent across the various designs?
Regards,
Alexander (Sandy) Hapgood
Comments
The application of resistors is not consistent across various designs because different people have done the designs. For example, I'm partial to using both resistors even though you can get by with only a resistor on SDA.
-Phil
I'll install 4.7K resistors on both lines. Interesting there's such a variation between circuits that do the same thing.
Sandy
You shouldn't really think that this is unusual at all. For instance many pullup resistors are given as a nominal value but for most purposes can vary greatly. A circuit that works with a pullup of 10K can usually work just as well with 1K or 100K. The 10K value specified for I2C is fine for pulling the line up when it would otherwise be floating, the problem is that the bus capacitance could delay how long it takes to charge sufficiently. Hence therefore the reason that 4K7 was mentioned and I have in fact used 2K myself but this depends upon speed and capacitance etc. In fact the lower value won't hurt it at all as I2C devices are specified to handle lower value pullups to less than 1K in fact. The SCL line is usually driven high and low from the Prop and never needs to be floating in most systems which is why some don't even bother to have a pullup on this line. If you do have one it doesn't hurt.
As this is not push/pull, a high Vcc level is only accomplished through the Resistor.
A low level on the other hand is done through a N-Channel mosfet and is fast.
And if multiple locations by mistake are pulling the line low (ORed) safe against a blown circuit.
So it's like filling up the bath tub with different water spicket settings.
The above pic is for a 10K Ohm pull-up and a 70cm long wire (=large bathtub) results in a 540ns rise time,
a 15cm wire/trace will get you a much faster 30ns.
So why not using 2k Ohm all the time?
Is because you are nearly creating a short through the system when you want a zero level.
So it's a compromise between speed and power it uses.
A higher value will also have better immunity against noise on the Vcc line,
just like a smaller spicket settings will run water in a slower but steadier pace even if main line is fluctuating in pressure.