I2C sniffing data / being transparent

Hi!

Because of weird restrictions in this school project, I have to do this one i2c connection very specifically which makes it hard and I need help.

I have an mpu6050 and atmel speaking with eachother over i2c and I want to put an esp32 between them so it can forward and modify the data sent between the atmel and mpu. My current iteration works like so:

  1. both the esp32 and mpu6050 are on the same i2c bus as slaves but with the same address!
  2. Atmel requests data from MPU
  3. This triggers GPIO pin, which triggers address change for MPU (0x68 -> 0x69)
  4. everything works now BUT:
    For the first data request both the mpu and the esp are on the same address and they both respond with ACKS, which corrupts the first batch of data and that ruins everything.

If I now change esp's address to something different, it wont be able to detect the data request sent by atmel and the switching never happens.

So how can I detect the i2c request between atmel and mpu with the esp without being on the i2c bus with the same address?

I'll respond with more information if needed,
Thanks!

Does the Atmel have to be i2c connected to the MPU?
What I mean is, can the Atmel send a message to the ESP32 to do an i2c transfer between the MPU and the ESP32? The ESP32 then manipulates the data and sends it to the Atmel by other means than i2c.

Would an i2c sniffer benefit your problem?

Please post an annotated schematic showing exactly how you have connected everything or plan on doing. Be sure to include all power, ground, power sources and not any leads over 10"/25cm.

The MPU-6050 was discontinued by the original manufacturer many years ago , and you can only hope that the counterfeits or clones you can buy today will perform correctly and reliably, if at all.

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