I²C to more I²C expander?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
M*I*B
Normal user
Posts: 319
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

I²C to more I²C expander?

#1 Post by M*I*B » 23 Nov 2019, 17:11

Hi friends of short circuit,

for a new "try and error" project I have to less I²C adresses to choise. So I need a Chip to expand the single ESP-I²C to more, i.e. 4 more Ports... I know that this type of chip exist but I can't find them..

Any helpfull out there? :D
DLzG
Micha

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

Re: I²C to more I²C expander?

#2 Post by TD-er » 23 Nov 2019, 17:31

See plugin 9 - MCP23017
plugin 19 - PCF8574

Or isn't that what you meant?

User avatar
M*I*B
Normal user
Posts: 319
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: I²C to more I²C expander?

#3 Post by M*I*B » 23 Nov 2019, 18:09

... nope, that's wrong. I don't need more simple IO's, I need more I²C busses due I have many sensors with the same and unchangeable I²C- Adress ... The Chip simple shift the Baseadress of the Busses if I remember right...

Chip have i.e. 0xAB00 then ...
... ext. bus 1 is ACxx where xx are the adresses of the slaves at this bus
... ext. bus 2 is ADxx where xx are the adresses of the slaves at this bus
... ext. bus 3 is AExx where xx are the adresses of the slaves at this bus
... ext. bus 4 is AFxx where xx are the adresses of the slaves at this bus
Attachments
Zwischenablage01.jpg
Zwischenablage01.jpg (51.29 KiB) Viewed 18874 times
DLzG
Micha

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

Re: I²C to more I²C expander?

#4 Post by TD-er » 23 Nov 2019, 19:20

Well as far as I know this is not possible.
If there would be such a chip, then we must also add support for it to make sure commands for each are sent to the right bus.

User avatar
M*I*B
Normal user
Posts: 319
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: I²C to more I²C expander?

#5 Post by M*I*B » 23 Nov 2019, 20:10

... hmmm, I think no... If I remember right the Data are transparent. The only thing to do, in my opinion, would be to expand the bus scan area to include the extended area. For the ESP, the chip is in fact not visible. The ESP sees only the I²C clients, which only now have a different address than native
DLzG
Micha

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: I²C to more I²C expander?

#6 Post by ThomasB » 24 Nov 2019, 02:53

PCA9518 might provide the I2C expansion feature for your application.
http://www.ti.com/lit/gpn/pca9518

- Thomas

Flying Domotic
Normal user
Posts: 37
Joined: 27 Aug 2019, 23:57

Re: I²C to more I²C expander?

#7 Post by Flying Domotic » 24 Nov 2019, 10:43

You may also have a look at https://github.com/MajorLee95/nanoI2CIOExpander, using a nano as I2C IO expander

User avatar
M*I*B
Normal user
Posts: 319
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: I²C to more I²C expander?

#8 Post by M*I*B » 24 Nov 2019, 12:14

@ThomasB:

Yes, you hit the 1st target; thx a lot ;o) This chip does almost what I need. The good news about this chip is that you are calling all clients with the same address by choosing the correct extension port. The problem I see is that you need at least two additional ports to switch between two extension lines or, if you place a bin2hex chip in between, three extensions (see table on side 11).
I'm hopefull to find the one I described before. But if not I will give them a try .

@Flying Domotic:
Ty also for that. Looks also like a good idea, but for my projekt a too much space grabbing version...
DLzG
Micha

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

Re: I²C to more I²C expander?

#9 Post by TD-er » 24 Nov 2019, 13:11

It still needs an extension to the software to trigger the right GPIO pin for enabling the correct I2C bus.
I think it should be done by making a wrapper to the Wire interface.
Meaning it is not a plugin, but something at the core of ESPEasy, or else you have to adjust every single plugin to adapt to this.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: I²C to more I²C expander?

#10 Post by ThomasB » 24 Nov 2019, 19:19

The problem I see is that you need at least two additional ports to switch between two extension lines or, if you place a bin2hex chip in between
To save ESP GPIO pins, your i2c extension selection could be handled by a i2c GPIO expander chip. There are plugins for the MCP23017 and PCF8574.
It still needs an extension to the software to trigger the right GPIO pin for enabling the correct I2C bus.
I think it should be done by making a wrapper to the Wire interface.
A wrapper would be convenient indeed. But to test out this "try and error" project there may be a temporary workaround that uses rules to control the i2C extension selection and also perform the R/W to the selected i2c device.

- Thomas

User avatar
M*I*B
Normal user
Posts: 319
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: I²C to more I²C expander?

#11 Post by M*I*B » 25 Nov 2019, 21:47

... japp ... For that T&E I will use the PCF8574 to control the PCA9518. Maybe later then I find the special chip I'm talking about, if the T&E goes to success ;o)
DLzG
Micha

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: I²C to more I²C expander?

#12 Post by ThomasB » 25 Nov 2019, 22:37

Maybe later then I find the special chip I'm talking about, if the T&E goes to success
Here's some candidates for that special chip:
LTC4316, https://www.analog.com/media/en/technic ... 4316fa.pdf
LTC4317, https://www.analog.com/media/en/technic ... 4317fa.pdf
MAX7356, https://datasheets.maximintegrated.com/ ... AX7358.pdf

I think that the LTC431x are brilliant because there would be no changes needed to an existing ESPEasy Plugin. But only available in DFN package.

The MAX7356 is similar to the PCF8574 / PCA9518 solution, so not as clever as the LTC431x. And it would require a custom plugin. But this single chip solution is available in SSOP package for easier DiY soldering.

- Thomas

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

Re: I²C to more I²C expander?

#13 Post by TD-er » 25 Nov 2019, 23:12

Hmm those are indeed brilliant :)
Only thing that may need to be changed for only some plugins is to add some extra addresses for the configuration.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: I²C to more I²C expander?

#14 Post by ThomasB » 25 Nov 2019, 23:28

Only thing that may need to be changed for only some plugins is to add some extra addresses for the configuration.
Oh pooh. That will indeed require a code change to a plugin with fixed i2c address choices.

But on a positive note, I just noticed that the LTC431x chips are also available in MSOP package; Substantially easier to hand solder than DFN.

- Thomas

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

Re: I²C to more I²C expander?

#15 Post by TD-er » 25 Nov 2019, 23:32

ThomasB wrote: 25 Nov 2019, 23:28 [...]
Oh pooh. That will indeed require a code change to a plugin with fixed i2c address choices.
Not to mention years of beta-testing...
Maybe even setup a voting committee to select the most appropriate addresses for the selection and a test panel to make sure the offered choices are political correct and will not offend anybody. (and also those without a body, just to make sure no man/woman/etc. feels excluded)

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: I²C to more I²C expander?

#16 Post by ThomasB » 26 Nov 2019, 00:05

I found an abandoned ESPEasy pull request for adding the TCA9548A i2c multiplexer chip. It is similar to the MAX7356 chip (but easier to purchase).
https://github.com/letscontrolit/ESPEasy/pull/254

I didn't dig into the PR's details, but it is interesting; It shows that someone else has traveled on this road before.

- Thomas

User avatar
M*I*B
Normal user
Posts: 319
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: I²C to more I²C expander?

#17 Post by M*I*B » 26 Nov 2019, 00:14

Not to mention years of beta-testing... .../... not offend anybody. (and also those without a body, just to make sure no man/woman/etc. feels excluded)
:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:
GREAT!

AND: Yippie Yah Yei!!! The TCA9548A is exact the Chip I have searched for... Now tomorrow I can go to Berlin with peace of mind and kick some politicians to the shin ... :D
DLzG
Micha

krikk
Normal user
Posts: 118
Joined: 28 Feb 2017, 07:57
Location: Austria
Contact:

Re: I²C to more I²C expander?

#18 Post by krikk » 26 Nov 2019, 10:31

the TCA9548A multiplexer chip was working fine with my commit, but someone else has do update my PR to the newer codebase, sorry i do not have the time for such a project now, good luck would be really usefull if this will be integrated in the code...

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests