Wiring up an i2c Bus

So I’m having trouble actually constructing an i2c Bus.

What I’m doing is trying to is wire together 3 of the Melexis IR Thermometers for sale on SparkFun (see here- http://www.sparkfun.com/products/9570). Even though it’s fairly basic to wire one up, I followed the setup from here- bildr Is it hot? Arduino + MLX90614 IR Thermometer - bildr.

To wire up all three together, I ran leads from the SDA/SCL lines of one sensor to the SDA/SCL lines of the next sensor. I put 4.7k pull-up resistors on all the SDA/SCL lines and 1uF Caps between all the power/ground lines (I didn’t have 0.1uF Caps). I attached two quick pictures of the assembly.

I ran an i2cScanner (Arduino.cc user Krodal wrote it) and it only finds one device at 0x5A, which is the device wired directly in line with Inputs A4/A5. I know it only finds this first device because it reads “No i2C Devices Found” when I disconnect that sensor.

Can anyone see what I’m physically wiring improperly? Or is there an address issue because I’ve got 3 of the same sensor?

Hello,

I looked at the pictures and I noticed that you are using three pairs of pull-up resistor. You should not do that. You must only use one pair for the entire bus. You should change the value of the resistors depending on the number of attached sensors (due to capacitance change). However, in your case it should not make much of a difference.

One other aspect you should consider is the thermometer address. This address must be unique for the bus. So, you should change the device address, in order to communicate with all the three sensors in the same bus.

Hope this helps.

Pedro Santos

I took a shot at removing the other pull-ups and that didn't seem to make a difference.

Forgive my ignorance, but how do you change the address of the other i2c devices?

pgm575: I took a shot at removing the other pull-ups and that didn't seem to make a difference.

Forgive my ignorance, but how do you change the address of the other i2c devices?

Changing addresses is particular to the device, the device you listed requires that you set the address in it's eeprom so your going to have to attach them one at a time and set them to unique addresses. Other devices might have address pins dip switches or just different part numbers.

I just did exactly that and they work flawlessly. The code I found to change their addresses was on this forum, so I won't re-post it here.

The code I found to change their addresses was on this forum, so I won't re-post it here.

Reasonable, but posting a link would be better.

Good call, see here- http://arduino.cc/forum/index.php/topic,54170.msg539601.html#msg539601