Impossible to activate i2c multiplexing

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
SuperDuck
New user
Posts: 5
Joined: 15 Jan 2022, 14:38

Impossible to activate i2c multiplexing

#1 Post by SuperDuck » 15 Jan 2022, 14:51

Dear all,

I have an ESP32 that I would like to use with two TSL2591 light sensors. These share the same I2C address, so I have bought a TCA8543A I2C multiplexer. The problem is, I can’t find how to activate it: the section about I2C Multiplexer does not appear in the hardware tab. I am a beginner so maybe missing something trivial, but I have no idea what. Any help would be much appreciated!

I am using the following build: ESP_Easy_mega_20211224_test_A_ESP32_4M316k Dec 24 2021 and my ESP32 board works fine with just one TSL2591 sensor.

Thanks,

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Impossible to activate i2c multiplexing

#2 Post by TD-er » 15 Jan 2022, 15:39

FEATURE_I2CMULTIPLEXER is disabled for "testing" builds as those have "LIMIT_BUILD_SIZE" defined.
We can make a custom build for you if the required plugins are not available in "Normal" builds.
Or if you have an ESP32 unit with 16MB flash, you can use the "Max" builds.

SuperDuck
New user
Posts: 5
Joined: 15 Jan 2022, 14:38

Re: Impossible to activate i2c multiplexing

#3 Post by SuperDuck » 15 Jan 2022, 16:00

Thanks for your answer. I was suspecting something like this but failed to find an exaustive list of the features included in each build. I am using the test_A build because the code for the TSL2591 sensor is not included in the standard build. My ESP32 only has 4MB flash so the max build is out of the question.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Impossible to activate i2c multiplexing

#4 Post by TD-er » 15 Jan 2022, 16:10

What other plugins do you need?

SuperDuck
New user
Posts: 5
Joined: 15 Jan 2022, 14:38

Re: Impossible to activate i2c multiplexing

#5 Post by SuperDuck » 15 Jan 2022, 16:28

I also plan to use a couple of INA219 sensors and maybe a DHT22. But if its not too complex I can try making the build myself? I feel a bit ashamed to have you do it for me ;)

Thanks a lot,

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Impossible to activate i2c multiplexing

#6 Post by TD-er » 15 Jan 2022, 16:49

You can for sure try to make it yourself.
It is best to either edit the tools/pre_custom_esp32.py file and make a "Custom" build using PlatformIO and VS code.
You can also rename the Custom_sample.h file to Custom.h (capital C) and enable whatever you need.

SuperDuck
New user
Posts: 5
Joined: 15 Jan 2022, 14:38

Re: Impossible to activate i2c multiplexing

#7 Post by SuperDuck » 19 Jan 2022, 17:05

Ok, I took me some efforts but I have finally made it. Thanks again for your help!

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Impossible to activate i2c multiplexing

#8 Post by TD-er » 19 Jan 2022, 17:12

Just one thing to keep in mind when using an I2C multiplexer.

Each channel is considered a separate bus, so you must make sure to use pull-up resistors on each channel. (and the main one on the ESP side)

Often sensor boards bought from Ali or Ebay have some pull-up resistors connected, but not all and if you mount the I2C devices yourself they may not be present.

So keep in mind you may need some pull-up from SDA and SCL to 3V3 (or 5V on 5V I2C devices, which is another reason to use such a multiplexer)
Typically those pull-up resistors must be between 2k2 and 10k.
N.B. when adding several boards with pull-up resistors on a single I2C bus you place them in parallel and thus lower the effective resistance.

SuperDuck
New user
Posts: 5
Joined: 15 Jan 2022, 14:38

Re: Impossible to activate i2c multiplexing

#9 Post by SuperDuck » 25 Jan 2022, 21:06

Thanks for the advice!

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests