Wiring multiple devices which all use I2C communication.

Hi everyone I'm a beginner to everything Arduino.

I'm sure this topic has been discussed before but I'm not sure about the correct terminology to search and find the answers I'm looking for.

I want to connect 2 different sensors to my Arduino both which use the a4, a5 pin for I2C communication. From what I understand now I just connect and combine the a4 and a5 inputs of each sensor together making one single input for connecting to the Arduino. One sensor however requires a series of resistors and capacitors, while the other doesn't. I'm wondering whether I have to change the resistor and capacitor values because now I have 2 sensors connected to the whole system.

Well without data on the sensors we can have no idea.

How about some links to their data sheets.

All of the A4/SDA pins are tied together and likewise all of the A5/SCK pins. From each of these two, connect a resistor, 4K7, to Vcc. You will also have to make sure the devices have a different I2C address. This is usually accomplished with jumper pads or pins on the device. One is usually left as is and others moved upwards to adjacent addresses. In some cases, they have only one address which calls for a different solution, a port expander.

Thanks for the input and help so far. The two sensors that I'm interested in using are the adafruit HMC5883L 3 axis magnetometer which doesn't use any resistors or capacitors, and the mlx 90614 IR thermometer which uses two resistors and a capacitor. I'm wondering if I change any of the wiring(resistor and capictor values) if I try to hook them both to the a4 and a5 pins.

I understand that within the Arduino code I have to set different addresses and will figure that out later. Just curious about the hardware wiring aspect now.

Hope that helps

I don't understand the "resistors and capacitors" part.

I2C requires a single resistor on SCL and another on SDA to pull the lines up. That's it. There are no capacitors involved.

Can you provide links to the sensors, most of us don't have time to google stuff for someone else as well work on our own problems.

As I said before.

How about some links to their data sheets.

I have attached some pictures of the relevant bits of information describing how to hook up the sensors to the Arduino.

Here are also the data sheets for the

MLX90614 temp sensor https://www.sparkfun.com/datasheets/Sensors/Temperature/SEN-09570-datasheet-3901090614M005.pdf

Adafruit Magnetometer https://cdn-shop.adafruit.com/datasheets/HMC5883L_3-Axis_Digital_Compass_IC.pdf

Here is the second picture which didn't attach the first time. The explain the wiring needed to connect the MLX temperature sensor.