0

Example for ML-R I2C address translator, double (mrm-i2c-tran)

Prerequisites

If not already done so already, install Arduino software and make basic connections, as described in page for MRMS ESP32: Arduino, IMU, eFuse, BT, WiFi, CAN Bus (mrm-esp32). This setup is convenient, but it is not mandatory. You can connect some other microcontroller and power supply.

Task

We have 2 or more devices with the same fixed I2C address and need to use them in a same bus.

Connections

Starting from the basic connection, let's add a ML-R I2C address translator, double (mrm-i2c-tran) and ML-R Distribution Pins 3x Passive (mrm-distrib-c). 3.3 V supply can be made using Dupont cables with 0.1" plugs. Use some more Dupont cables to connect SDA and SCL lines. If there are more I2C boards, You will have to use some other power distribution, like ML-R Distribution Pins 7x Passive (mrm-distrib-d) because mrm-esp has only 3 SCL and SDA pins.

If the device has a fixed address 0x68, we will be able to use 3 of them. One connected directly, which still has the same address, and 2 more connected through ML-R I2C address translator, double (mrm-i2c-tran), now with addresses 0x69 and 0x6A.

If You have 2 I2C interfaces, You can get up to 6 boards with the same addresses working together. Each bus will have a directly connected board and 2 via this translator.

Program

Any program You have been using will continue working as before. The translator is invisible for software and does not need any setup.

Alternative connection

Uključite kablove u konektore odgovarajućih boja MRMS Power Supply 3x (mrm-ps3x) ili MRMS Power Supply 3x B (mrm-ps3xb) pločice. Spojite ostalo Dupont kablovima. Mikrokontroler će vidjeti 3 senzora na adresama 0x68, 0x69 i 0x70, bez obzira što je svaki postavljen na 0x68.