I2C Address Changer Expander like addressable leds

Hello everyone,

I need help configuring sensors to be managed similarly to addressable LEDs, meaning I want to avoid wiring each sensor individually. Instead, they should be addressable directly by the microcontroller, allowing for independent data acquisition. In my current setup, all the sensors I've used typically feature two I2C addresses, 0x76 and 0x77, but this isn't sufficient. I'm open to other solutions; the key requirement is that only one set of wires should run from the microcontroller, no matter how many sensors are connected, similar to how addressable LEDs are configured. Could anyone recommend hardware that can achieve this? Additionally, if you have any example implementations, I would greatly appreciate it.

The project is intended for small scale and miniaturized electronics.
The multiplexer is not a solution as it limiting the amout of sensor I could use.

This is a simplifed diagram of what I would like to achieve

Look at the TCA9548 I2C mux; Adafruit has a version:

So 128 wires would be OK?

Given that standard Ethernet uses just 8 wires and already manages to stream vast amounts of cat videos and late-night-watching sessions without a hiccup, sticking to that range might be wise. With 128 wires, we could theoretically push up to 51.2 Gbps, enough bandwidth to practically stream the consciousness of every philosopher since Socrates in real-time. Impressive, but maybe overkill for my sensor setup :smile:

Then I guess you just solved your own problem. Use Ethernet.

1 Like

Unfortunately, this configuration is limiting the amout of sensor I could use based on the multiplexer. I need to build a system that is adaptable without wiring.

I appreciate the humor in our exchange,it certainly makes the technical discussion more lively. Thanks to your reply tough, I realized I forgot to mention that this is aimed at an SMD and miniaturized PCB project. I've updated the original post to reflect this.

Thanks.

Then I think you'll have to roll-your-own interface. pick a processor with two native I2C ports, use one as master for the sensor and the other as slave to the Microcontroller, and go to it. That way, you control the whole layer, and can deal with addressing as you see fit.

Or, go RS485 multidrop - allows you to address as you see fit, the sky's the limit. But, there's lots of latency to deal with, so we'd need to know more than you've revealed about your scenario, for sure.

Use an ATtiny85 or similar on you custom design as an I2C decoder. You will only be limited to the number of 7 bit addresses.

You can use up to 8 multiplexers for 64 devices. Not sure what "adaptable without wiring" means.

If you picked a small CPU with an I2C port, you could use any other interface on the other side (SPI, RS232) to act as the bus.

I guess you have already explored the possibility of using sensors that support SPI, for example.

Thta is definetly a solution we are trying to explore.

Sorry if the graph is not clear. Immagine that you have an addressable led strip, you have just to connect the led to the end of the last strip. Thtat's the level of simplicity I need.

I think I found a solution for my need and it's called I3C.

Ok, got it. Kinda like DMX but smaller :slight_smile:

Is there an Arduino that implements I3C?

I'm open to use other hardware. Also the size of the master is irrelevant, It could also be a PC, and I will explore this solution.

Unfortunately SPI needs a wire to be wired from the microcontroller back to the sensor. This would require a lot of rewiring.

How far apart are the sensors?

So basically anything electronic?

From 10 to 40 cm more or less. The sensor I'm using are BMP280.

Sure,

In fact this could be a really elegant solution in conjunction with BMP581 that is i3c capable and quite cheap.

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