Hi all,
I'm using a AVR microcontroller board to connect to an NXT I2C port. The board comes with an 82B715 chip that provides a buffered I2C bus. The original pull-up resistors were only 330 ohm each, so I had them replaced with 82 kohm ones. I haven't been able to get the AVR and NXT to respond to each other, so I'm wondering whether it has anything to do with the pull-up resistance.
http://www.datasheetcatalog.com/datashe ... B715.shtml
On Page 5 of the documentation for the 82B715, it states:
"In calculating the pull-up resistance values, the gain of the buffer introduces scaling factors which must be applied to the system components. Viewing the system from the Buffered bus, all I2C bus capacitances have effectively 10 times their I2C bus value."
Does that mean that I should use 8.2 kohm resistors instead, or does the NXT insist on 82 kohm resistors no matter the cirumstance? Thanks.
Cheers
Hippie
Buffered I2C bus and pull-up resistance
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Buffered I2C bus and pull-up resistance
The NXT uses 4k7 "protection" resistors in line on the I2C IO lines. That means that with 8.2k pullups, the lowest bus voltage the NXT can sink it to will be over 1.7 volts (as a LOW)!
The 82B715 IC is to extend I2C lines up to 10x the normal distance limit (of about 1 meter). You would use a pair of those ICs, one at each end of longer wires. It would be like this: NXT > 82B715 > Long Wires > 82B715 > I2C device.
According to the datasheet, it sounds like you only need one set of pullups. I'm not sure what value you should use, but 82k is probably good (considering the buses "share" somehow). The only issue I can think of with such week pullups, is the rise time due to capacitance (especially with longer wires).
The 82B715 IC is to extend I2C lines up to 10x the normal distance limit (of about 1 meter). You would use a pair of those ICs, one at each end of longer wires. It would be like this: NXT > 82B715 > Long Wires > 82B715 > I2C device.
According to the datasheet, it sounds like you only need one set of pullups. I'm not sure what value you should use, but 82k is probably good (considering the buses "share" somehow). The only issue I can think of with such week pullups, is the rise time due to capacitance (especially with longer wires).
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
-
- Posts: 19
- Joined: 12 Jun 2011, 20:51
Re: Buffered I2C bus and pull-up resistance
Thanks for the reply, Matt. I just realised something. The AVR operates on 5V while the NXT's I2C ports run on 3.3V. The datasheet of NXT's ARM processor says that the chip is 5V tolerant, so I haven't used any logic lever shifter/converter in between. However, I'm now wondering whether this affects the required pull-up resistance. By the way, only SCL, SDA and GND are connected between the two.
I've read the documentation of 82B715 again and there's another part that has come my attention. On Page 4, it states:
"The buffer has an effective current gain of ten from I2C bus to Buffered bus. Whatever current is flowing out of the I2C bus side, ten times that current will be flowing into the Buffered bus side (see Figure 2)."
Might this also have a consequence on the required pull-up resistance? Unfortunately, electronics isn't my forte and so this is a bit beyond me.
Cheers
Hippie
I've read the documentation of 82B715 again and there's another part that has come my attention. On Page 4, it states:
"The buffer has an effective current gain of ten from I2C bus to Buffered bus. Whatever current is flowing out of the I2C bus side, ten times that current will be flowing into the Buffered bus side (see Figure 2)."
Might this also have a consequence on the required pull-up resistance? Unfortunately, electronics isn't my forte and so this is a bit beyond me.
Cheers
Hippie
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Buffered I2C bus and pull-up resistance
Since the ARM in the NXT isn't driving the lines high (they are being pulled up), 3.3v (5v tolerant) doesn't really mean anything. Essentially it's 5v (as far as I2C in concerned).
Basically, if you are using one of the 82B715s, you need to use two (one for each side). As far as I understand, they basically use lower impedance to increase the current, and decrease the capacitance effect (for longer wires). You haven't made it clear yet that you are using one on the NXT side of the lines, and if you aren't, that is most likely your problem. I don't really know what pullups you should use, but try 82k, 47k, and maybe 33k. You could also try using 47k-100k resistors on all three buses (NXT>82B715, 82B715>82B715, and 82B715>AVR).
Basically, if you are using one of the 82B715s, you need to use two (one for each side). As far as I understand, they basically use lower impedance to increase the current, and decrease the capacitance effect (for longer wires). You haven't made it clear yet that you are using one on the NXT side of the lines, and if you aren't, that is most likely your problem. I don't really know what pullups you should use, but try 82k, 47k, and maybe 33k. You could also try using 47k-100k resistors on all three buses (NXT>82B715, 82B715>82B715, and 82B715>AVR).
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
-
- Posts: 19
- Joined: 12 Jun 2011, 20:51
Re: Buffered I2C bus and pull-up resistance
I forgot to respond to this part in your earlier post.
I've already tried 82 kohm resistors before and I'm currently using 8.2 kohm ones. Since the I2C bus was never really functional due to the lack of a second 82B715, I might have to try the 82 kohm resistors again after I unsolder the 82B715. Then again, wouldn't a 5V circuit require stronger (lower resistance) pull-ups?
A re-read of the documentation has indicated that a pair of 82B715s is necessary for the I2C system to function properly. The board comes with the 82B715 already soldered on. The arrangement of the circuity is something like this: AVR - 82B715 - pull-ups - NXT. See Page 5 of the attached schematic. Since I only have one 82B715, it seems I may have to remove it after all. Thanks for rectifying my oversight.mattallen37 wrote:You would use a pair of those ICs, one at each end of longer wires. It would be like this: NXT > 82B715 > Long Wires > 82B715 > I2C device.
I've already tried 82 kohm resistors before and I'm currently using 8.2 kohm ones. Since the I2C bus was never really functional due to the lack of a second 82B715, I might have to try the 82 kohm resistors again after I unsolder the 82B715. Then again, wouldn't a 5V circuit require stronger (lower resistance) pull-ups?
- Attachments
-
- AVR200 Schematic colour.pdf
- JED Microprocessors AVR200 controller board with Atmel ATmega32
- (96.34 KiB) Downloaded 329 times
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Buffered I2C bus and pull-up resistance
Either you need to remove it, or you need to get another one for the NXT side.
A 5v circuit compared to a 3.3v circuit would require weaker pullups for the same effect.
As far as I understand what the 82B715 does, it is completely impossible to get a normal I2C device (NXT) to work on the buffered lines.
A 5v circuit compared to a 3.3v circuit would require weaker pullups for the same effect.
As far as I understand what the 82B715 does, it is completely impossible to get a normal I2C device (NXT) to work on the buffered lines.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
-
- Posts: 19
- Joined: 12 Jun 2011, 20:51
Re: Buffered I2C bus and pull-up resistance
I've removed the 82B715 and replaced the pull-ups with 82 kohm resistors. There is still no interaction between the AVR and NXT. Using a digital multimeter, I measured the voltages of SDA and SCL to see if they're pulled low to signal a START condition. They each measured 4.4 V and remained pretty constant. So, it seems the START condition isn't initiated. Next, I disconnected the I2C cable from the AVR but left it attached to the NXT. I then ran a program that has been tested with the compass sensor and measured the voltages of SDA and SCL again. This time they measured 3.7 V each and remained at that level. I understand that the logic levels are considered to be in a "floating" state without pull-up resistors being connected. However, doesn't the ARM7 microcontroller operate at only 3.3 V?
Who is online
Users browsing this forum: Majestic-12 [Bot] and 1 guest