Regarding I2C pull-up resistors on Arduino Mega

Hello Arduino community.

Thank you for spending your time on reading my question
I am new to electronics. I got a trouble. I used Arduino Mega to read the value from multiple I2C sensors. Because the multiple I2C sensors have the same I2C address and it CANNOT be changed. I used an I2C multiplexer from Adafruit ( TCA9548A ). It does not work. I did a research and found a clue. Arduino Mega I2C pins have 10Kohm pull-up resistors on board. The multiplexer module also have 10Kohm on-board resistors. My question it: does pull-up resistors on both side causes failure on I2C communication ? if yes, could anyone please tell me how to solve it?

For wiring, I think there is no problem in my wiring. I checked very carefully.
For code, I think there is no problem in the code. I tested with a single sensor without I2C multiplexer, it works.

Thank you in advance for your help.

Welcome to the forum

Please read the How to get the best out of this forum

You think you have no problem with your wiring and your code but it does not work.

Please provide a schematic (hand drawn is OK) and your sketch (use code tags).

Two 10kOhm resistors in parallel are 5kOhm. That should still be fine.

Do you have a logic analyzer? There are really cheap ones you can find even on Amazon. They will allow you to look at the signals. e.g. see whether the I2C signals between the multiplexer and the sensors are active. Have a look at the PulseView software. It is open source and has decoders for many protocols including I2C.

https://sigrok.org/wiki/Downloads

Google USB Logic analyzer 24MHz. They are around $10 for 8 channels.

leeheungmin:
Because the multiple I2C sensors have the same I2C address and it CANNOT be changed. I used an I2C multiplexer from Adafruit ( TCA9548A ).

I always have to challenge such a suggestion.

Cite the sensors. Give us the Web link. :roll_eyes:

My first question would be whether or not you ran the I2C SCANNER sketch ?

If every part works then why does the system not work. Your TCA9548 does not have pull up resistors on its output side so you have to add them, each of these outputs is a seperate bus and must be treated as such. Check your sensors, I do not know many that do not have address selection, you probably have A0, A1, and A2 on some jumpers, these are address selectors. 3 of them will give you 7 different addresses. I would suggest you read the I2C specification to get an idea of what it is and how it works. On your next response include a circuit schematic, not a frizzy thing, a list of the sensors and hopefully links to them. At this point I think you have a 'hardsoft' (hardware software) problem.

gilshultz:
Your TCA9548 does not have pull up resistors on its output side so you have to add them, each of these outputs is a seperate bus and must be treated as such. ... I would suggest you read the I2C specification to get an idea of what it is and how it works.

You can also check the datasheet of the TCA9548. There is a nice picture on page 18 (Figure 14. Typical Application Schematic).

If you like some more explanation, the I2C Physical Layer part on the Wikipedia page is a bit shorter then the I2C spec. But the spec is a good read too. Link at the bottom of the Wiki page.

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