MPU6050 - Communication with MPU6050 Failed

Hi All,

I’ve been trying for days now to get an MPU6050 setup and working but keep getting a “[E][component:092]: Component was marked as failed.” error followed by a “communication with MPU6050 failed!” error. And of course, no values are reported. Havent had much luck finding resources with possible resolutions. Logs posted below. From what I can tell i2C bus is working, and finds the device address without issue. I have tried 3 x MPU6050 with 2 x other nodemcus. Also swapped out jumper wires a couple of times. No change.

Setup is using a Nodemcu 8266 and connected as follows:

3V3 -> VCC
D2 -> SDA
D3 -> SCL

Log output containing error:

[23:07:29][C][api:022]: Setting up Home Assistant API server...
[23:07:29][C][mpu6050:024]: Setting up MPU6050...
[23:07:29][VV][i2c:056]: Beginning Transmission to 0x68:
[23:07:29][VV][i2c:093]:     Writing 0b01110101 (0x75)
[23:07:29][VV][i2c:061]:     Transmission ended. Status code: 0x00
[23:07:29][VV][i2c:083]: Requesting 1 bytes from 0x68:
[23:07:29][VV][i2c:113]:     Received 0b00001110 (0x0E)
[23:07:29][E][component:092]: Component was marked as failed.**
[23:07:29][VV][scheduler:057]: set_interval(name='update', interval=200, offset=3)
[23:07:29][I][app:059]: setup() finished successfully!
[23:07:29][I][app:105]: ESPHome version 1.17.0-dev compiled on Jan 13 2021, 23:05:50
[23:07:29][C][wifi:443]: WiFi:
[23:07:29][C][wifi:303]:   SSID: 
[23:07:29][C][wifi:304]:   IP Address:
[23:07:29][C][wifi:306]:   BSSID: 
[23:07:29][C][wifi:307]:   Hostname: 'test_nodes'
[23:07:29][C][wifi:311]:   Signal strength: -21 dB ▂▄▆█
[23:07:29][C][wifi:315]:   Channel: 6
[23:07:29][C][wifi:316]:   Subnet:
[23:07:29][C][wifi:317]:   Gateway: 
[23:07:29][C][wifi:318]:   DNS1: (IP unset)
[23:07:29][C][wifi:319]:   DNS2: (IP unset)
[23:07:29][C][i2c:028]: I2C Bus:
[23:07:29][C][i2c:029]:   SDA Pin: GPIO4
[23:07:29][C][i2c:030]:   SCL Pin: GPIO0
[23:07:29][C][i2c:031]:   Frequency: 50000 Hz
[23:07:29][I][i2c:033]: Scanning i2c bus for active devices...
[23:07:29][I][i2c:040]: Found i2c device at address 0x68
[23:07:29][C][logger:185]: Logger:
[23:07:29][C][logger:186]:   Level: VERY_VERBOSE
[23:07:29][C][logger:187]:   Log Baud Rate: 115200
[23:07:29][C][logger:188]:   Hardware UART: UART0
[23:07:29][C][captive_portal:169]: Captive Portal:
[23:07:29][C][ota:029]: Over-The-Air Updates:
[23:07:29][C][ota:030]:   Address: 
[23:07:29][C][api:095]: API Server:
[23:07:29][C][api:096]:   Address: 
[23:07:29][C][mpu6050:085]: MPU6050:
[23:07:29][C][mpu6050:086]:   Address: 0x68
[23:07:29][E][mpu6050:088]: Communication with MPU6050 failed!
[23:07:29][C][mpu6050:090]:   Update Interval: 0.2s
[23:07:29][C][mpu6050:091]:   Acceleration X 'Washer Accel X'
[23:07:29][C][mpu6050:091]:     Unit of Measurement: 'm/s²'
[23:07:29][C][mpu6050:091]:     Accuracy Decimals: 2
[23:07:29][C][mpu6050:091]:     Icon: 'mdi:briefcase-download'
[23:07:29][C][mpu6050:092]:   Acceleration Y 'Washer Accel Y'
[23:07:29][C][mpu6050:092]:     Unit of Measurement: 'm/s²'
[23:07:29][C][mpu6050:092]:     Accuracy Decimals: 2
[23:07:29][C][mpu6050:092]:     Icon: 'mdi:briefcase-download'
[23:07:29][C][mpu6050:093]:   Acceleration Z 'Washer Accel Z'
[23:07:29][C][mpu6050:093]:     Unit of Measurement: 'm/s²'
[23:07:29][C][mpu6050:093]:     Accuracy Decimals: 2
[23:07:29][C][mpu6050:093]:     Icon: 'mdi:briefcase-download'

Am I missing something obvious here with my setup? Appreciate any assistance/guidance.

Solved. 4/5 of the MPU6050s I received must have been defective as they all had the same issue. Last one I connected just ‘worked’ without changing any configuration.

Please tell us which vendor/item it was, so we might avoid them?

Ordered from here:

1 Like

Same exact problem, same exact vendor.

This is due to a bug in the ESPHome MPU6050 implementation, the boards work OK for me with other implementations.
Continuing the discussion here: MPU6050 component error "Communication with MPU6050 failed!" · Issue #2279 · esphome/issues · GitHub