I2c multiple device not working

i'm using 3 different sensors via i2c to arduino. The 3 sensors are: mikroe air quality 7 click, sensirion svm41, and sciosense ens160 kit. My problem is that the mikroe doesn't work (doesnt give the correct data) when the sensirion is connected, specifically, when the sensirion SDA line is connected. I realised this after trying different combinations of the sensors. All the the sensors come with pull up resistors in their respective boards so i didnt add any.
Any ideas how i should work around this? thanks!

What Arduino? Please provide clickable links to the three sensors.

im using arduino uno wifi rev2. and here are the sensors: sciosense ens160 , mikro aq 7 click and sensirion svm41

You may have to remove a couple of those pullups. They are in parallel, and the combined resistance should not be below about 2.2K Ohms.

Test each sensor alone by running the I2C Address Scanner, and check for address conflicts.

Finally: there are reports of sensors that interfere with each other on the I2C bus, even if the addresses are different. If that turns out to be the case, you may have to use software I2C for one of them, on separate pins.

2 Likes

this is what i plan to do as a last resort. they are tiny smd resistors and may be difficult to remove.

i did this, and confirmed they have different address

first time hearing this software i2c. i will have to look into this, sounds like an easier solution. thanks!

To remove a smd resistor, use a solder iron with a big blob of solder and heat up the entire component until it drops off (it should drop off in a few seconds).

There are other things to check.
Your Arduino board is a 5V board with a 5V I2C bus. The sensors are probably 3.3V sensors with a 3.3V I2C bus.
When a (very short) cable is used, then SDA should not be next to SCL.
The code for the mikroe seems odd. It should not give bad data when it can not communicate with the sensor. It should tell that there are problems with the sensor.

Both SDA and SCL are bi-directional open-drain (open-collector) signals. However, almost every sensor accepts the SCL as a clock and does not interfere with it. The SDA is used to send data to the sensor and the sensor uses it to send data to the Arduino board. If your I2C bus is not okay, then trouble with the SDA might happen.

I just swipe them off with the tip of hot solder pencil. Takes 2-3 seconds.

this is true. The sensors have their SCL and SDA lines pulled up to 3V3.
Should i add pull ups to 5V? is that a good idea?

i tried i2c scanner with all 3 sensors connected. it says unknown error at the mikroe address

yeah my problem is that the SMDs are so close to each other, i might accidentally remove or damage the others. i'll try other options first before doing this

im afraid that i'll damage the sensor chip or other smd as they are very near to each other. i'll try other options first tho, before resorting to this. thanks

i measured the resistance between vcc and sda/scl with all 3 sensors connected, it's around 2.6kOhm. this should be ok yeah? after reading through the datasheets i realised one of the sensors doesnt have pull ups, so the total resistance isnt so low.

Should be. Let us know if you get all the devices working!

Those are exceptionally easy to remove, just apply an iron and a small blob of solder, heat and push gently sideways. It will slide right off.

i got it all to work now. i used software i2c for one of the sensors as @jremington suggested. i didnt remove any pull ups as i didnt want to damage the sensors.
thanks everyone! :heart:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.