Multiple i2c Busses on BeagleBoneBlack (more than 2)

Hello Guys,

I have an Application that uses multiple i2c sensors. The beaglebone black just has 2x I2C busses.

Problem, the i2c sensors cannot have a different address (all of them have a same address). I used a multiplexer fed all the sensors the SCL from the i2c1 bus and mux’d the SDL lines. Everything works well but now the problem is the polling is a bit slow.

A Hack came across my mind. So, instead of using the i2c bus how about Bitbanging the i2c.

Use a Clock Source (SCL from the hardware timer). And the SDL lines Use GPIOs.

So for 8x I2C’s I’d have
gpio_1 - scl
gpio_2 - sda1
gpio_3 - sda2
gpio_3 - sda3

gpio_n - sda_n

Does the approach make sense?

Is there any other way i can connect the 8 sensors in different channels without going through the slow mux?
I want to grab data from all the sensors in a threaded way (parallelly grab data) without chaining them.

I dont want to bitbang every i2c SDA and SCL, since the SCL singnal is going to be common to all of them i want to keep this as only One SCL and have multiple SDA’s

Let me know your thoughts,

Regards

If you can stand bit-banking, the BBB has perfect resources designed specifically for that task.
You have 2 PRU cores (200mhz, 8k memory + 8k program + 16k shared memory with main CPU each)It is perfect for bit-banging in a separate process.
You can mux the GPIO pins to the PRU for processing and store the data in shared memory.

What sensor part are you talking about here ?

Hello Guys,

I have an Application that uses multiple i2c sensors. The beaglebone black just has 2x I2C busses.

Problem, the i2c sensors cannot have a different address (all of them have a same address). I used a multiplexer fed all the sensors the SCL from the i2c1 bus and mux’d the SDL lines. Everything works well but now the problem is the polling is a bit slow.

A Hack came across my mind. So, instead of using the i2c bus how about Bitbanging the i2c.

Use a Clock Source (SCL from the hardware timer). And the SDL lines Use GPIOs.

So for 8x I2C’s I’d have
gpio_1 - scl
gpio_2 - sda1
gpio_3 - sda2
gpio_3 - sda3

gpio_n - sda_n

Does the approach make sense?

Is there any other way i can connect the 8 sensors in different channels without going through the slow mux?
I want to grab data from all the sensors in a threaded way (parallelly grab data) without chaining them.

I dont want to bitbang every i2c SDA and SCL, since the SCL singnal is going to be common to all of them i want to keep this as only One SCL and have multiple SDA’s

Let me know your thoughts,

Have a look at http://www.silego.com/products/greenpak.html

This is a miniature FPGA that would work well. Use 10bit I2C addressing and then use the MSB address to select the SDA channel. You would experience a 3 bit delay in the TX direction and 0 delay in the RX direction. These devices are very flexible and low cost. Silego’s support is really good and if you send them your specs, they will design a solution for you.

Regards,
John