Electrical – I2C Strange Behaviour with RTC and MPU6050

arduinoi2csensor

I encountered a very strange i2c behaviour in my project.

I use an Adafruit Feather M0 (3.3V) as i2c master and 3 slaves (MPU6050 Gyro Sensor, DS3231 RTC, M24C01WP EEPROM) schematic below

The EEPROM works flawless, the Gyro returns 0 on all existing registers and the RTC only works in minutes and seconds. Date and Hours are always returned wrong.

Due to the Adafruit Feather M0 and the standard Arduino library, the I2C bus runs on 3.3V with 100kHz. I used 1kOhm Pullups.

All the Datasheets tell that the devices are compatible with 3.3v and 100kHz. Also the 3 devices have different i2c addresses.

I built the device twice, so i dont think that the gyro or rtc are broken.

Again the devices respond to requests. Only the values are wrong.

MPU6050: https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf

DS3231: https://datasheets.maximintegrated.com/en/ds/DS3231.pdf

Edit: C1 is between 3V3 and Ground, NOT scl and data
i2c bus

Best Answer

  1. 1 kΩ pullup to 3.3 V is out of spec. The maximum required current to drive either line low is 3 mA.
  2. What the heck is C1 doing there!? That's going to mess up time constants, and couple edges from one line to the other. I can't even imagine what hallucinations led to doing this.