ESP32 WROOM, ESPHOME and I2C port extenders issue

Could anyone give me suggestion with my project issue?
I have ESP32 and I2C extenders (PCF8575) connected to it (0x20 and 0x21 addresses). Connected to two I2C, not master-slave mode.
Using ESPHOME to run it
ESP32 has USB connector, which can power whole 3 “chips”
So, if ESP32 powered with USB - both I2C devices recognized, but only one can communicate with ESP32, for second one ESP32 shows “communication failed”
But, if I power up whole schema with 5V 2A module, both I2C devices not even detected by ESP32, ESP32 works just fine with that power.
Power consumption with USB around 0.14A
Any suggestions?

No logs? No yaml?

1 Like

Sorry, made topic with phone

Have no access to logs at the moment, but found similar one part of it (very_verbose gave nothing at all)
This is then ESP32 powered with USB

[22:57:50][C][i2c:035]: I2C Bus:
[22:57:50][C][i2c:036]: SDA Pin: GPIO27
[22:57:50][C][i2c:037]: SCL Pin: GPIO26
[22:57:50][C][i2c:038]: Frequency: 50000 Hz
[22:57:50][I][i2c:040]: Scanning i2c bus for active devices...
[22:57:50][I][i2c:047]: Found i2c device at address 0x20
[22:57:51][C][io.pcf8574:035]: PCF8574:
[22:57:51][C][io.pcf8574:036]: Address: 0x20
[22:57:51][C][io.pcf8574:037]: Is PCF8575: YES

next string swing something like “cannot communicate with I2C device” for one of extender

With AC-DC 5V 2A power module it show something like this

[22:57:50][C][i2c:035]: I2C Bus:
[22:57:50][C][i2c:036]: SDA Pin: GPIO27
[22:57:50][C][i2c:037]: SCL Pin: GPIO26
[22:57:50][C][i2c:038]: Frequency: 50000 Hz
[22:57:50][I][i2c:040]: Scanning i2c bus for active devices...
[22:57:50][I][i2c:047]: No i2c devices found!

Here is YAML

esphome:
  name: esp32test
  platform: ESP32
  board: esp-wrover-kit

wifi:
  ssid: "SSID"
  password: "pass"
  ap:
    ssid: "Esp32Reel Fallback Hotspot"
    password: "pass"

captive_portal:

# Enable logging
logger:
  level: VERY_VERBOSE

# Enable Home Assistant API
web_server:
  port: 80

# Enable Home Assistant API
api:

ota:

i2c:
  - id: ext_1
    sda: 27
    scl: 26
    scan: True 
  - id: ext_2
    sda: 33
    scl: 32
    scan: True 
 
    
pcf8574:
  - id: ext_hub_A
    i2c_id: ext_1
    address: 0x20
    pcf8575: True   
  - id: ext_hub_B
    i2c_id: ext_2
    address: 0x21
    pcf8575: True    

This is my ESP32 module
AC-DC connected to 5v input and GRD (between GPIO12 and 13)

and this is AC-DC module

So, any thoughts?
Small update
With replacement ESP with same model and same yaml, it start communicate with both extenders in case powered over USB

INFO Reading configuration /config/esphome/esp32tst.yaml...
INFO Starting log output from 192.168.1.79 using esphome API
INFO Connecting to 192.168.1.79:6053 (192.168.1.79)
INFO Successfully connected to 192.168.1.79
[19:11:55][I][app:100]: ESPHome version 1.14.5 compiled on Jul 29 2020, 18:43:10
[19:11:55][C][wifi:415]: WiFi:
[19:11:55][C][wifi:283]:   SSID: 'WiFi'[redacted]
[19:11:55][C][wifi:284]:   IP Address: 192.168.1.79
[19:11:55][C][wifi:286]:   BSSID: 8C:53:C3:98:A8:5D[redacted]
[19:11:55][C][wifi:287]:   Hostname: 'esp32tst'
[19:11:55][C][wifi:291]:   Signal strength: -43 dB ▂▄▆█
[19:11:55][C][wifi:295]:   Channel: 10
[19:11:55][C][wifi:296]:   Subnet: 255.255.255.0
[19:11:55][C][wifi:297]:   Gateway: 192.168.1.1
[19:11:55][C][wifi:298]:   DNS1: 0.0.0.0
[19:11:55][C][wifi:299]:   DNS2: 0.0.0.0
[19:11:55][C][i2c:028]: I2C Bus:
[19:11:55][C][i2c:029]:   SDA Pin: GPIO27
[19:11:55][C][i2c:030]:   SCL Pin: GPIO26
[19:11:55][C][i2c:031]:   Frequency: 50000 Hz
[19:11:55][I][i2c:033]: Scanning i2c bus for active devices...
[19:11:55][I][i2c:040]: Found i2c device at address 0x20
[19:11:55][C][i2c:028]: I2C Bus:
[19:11:55][C][i2c:029]:   SDA Pin: GPIO33
[19:11:55][C][i2c:030]:   SCL Pin: GPIO32
[19:11:55][C][i2c:031]:   Frequency: 50000 Hz
[19:11:55][I][i2c:033]: Scanning i2c bus for active devices...
[19:11:55][I][i2c:040]: Found i2c device at address 0x21
[19:11:55][C][pcf8574:021]: PCF8574:
[19:11:55][C][pcf8574:022]:   Address: 0x20
[19:11:55][C][pcf8574:023]:   Is PCF8575: YES
[19:11:55][C][pcf8574:021]: PCF8574:
[19:11:55][C][pcf8574:022]:   Address: 0x21
[19:11:55][C][pcf8574:023]:   Is PCF8575: YES
[19:11:55][C][logger:175]: Logger:
[19:11:55][C][logger:176]:   Level: DEBUG
[19:11:55][C][logger:177]:   Log Baud Rate: 115200
[19:11:55][C][logger:178]:   Hardware UART: UART0
[19:11:55][C][captive_portal:169]: Captive Portal:
[19:11:55][C][web_server:123]: Web Server:
[19:11:55][C][web_server:124]:   Address: 192.168.1.79:80
[19:11:55][C][ota:029]: Over-The-Air Updates:
[19:11:55][C][ota:030]:   Address: 192.168.1.79:3232
[19:11:55][C][api:095]: API Server:
[19:11:55][C][api:096]:   Address: 192.168.1.79:6053
[19:11:56][D][api.connection:583]: Client 'Home Assistant 0.113.0 (192.168.1.3)' connected successfully!

With that power module I got the same…

INFO Reading configuration /config/esphome/esp32tst.yaml...
INFO Starting log output from 192.168.1.79 using esphome API
INFO Connecting to 192.168.1.79:6053 (192.168.1.79)
INFO Successfully connected to 192.168.1.79
[19:09:20][I][app:100]: ESPHome version 1.14.5 compiled on Jul 29 2020, 18:43:10
[19:09:20][C][wifi:415]: WiFi:
[19:09:20][C][wifi:283]:   SSID: 'WiFi'[redacted]
[19:09:20][C][wifi:284]:   IP Address: 192.168.1.79
[19:09:20][C][wifi:286]:   BSSID: 8C:53:C3:98:A8:5D[redacted]
[19:09:20][C][wifi:287]:   Hostname: 'esp32tst'
[19:09:20][C][wifi:291]:   Signal strength: -26 dB ▂▄▆█
[19:09:20][C][wifi:295]:   Channel: 10
[19:09:20][C][wifi:296]:   Subnet: 255.255.255.0
[19:09:20][C][wifi:297]:   Gateway: 192.168.1.1
[19:09:20][C][wifi:298]:   DNS1: 0.0.0.0
[19:09:20][C][wifi:299]:   DNS2: 0.0.0.0
[19:09:20][C][i2c:028]: I2C Bus:
[19:09:20][C][i2c:029]:   SDA Pin: GPIO27
[19:09:20][C][i2c:030]:   SCL Pin: GPIO26
[19:09:20][C][i2c:031]:   Frequency: 50000 Hz
[19:09:20][I][i2c:033]: Scanning i2c bus for active devices...
[19:09:20][I][i2c:049]: Found no i2c devices!
[19:09:20][C][i2c:028]: I2C Bus:
[19:09:20][C][i2c:029]:   SDA Pin: GPIO33
[19:09:20][C][i2c:030]:   SCL Pin: GPIO32
[19:09:20][C][i2c:031]:   Frequency: 50000 Hz
[19:09:20][I][i2c:033]: Scanning i2c bus for active devices...
[19:09:20][I][i2c:049]: Found no i2c devices!
[19:09:20][C][pcf8574:021]: PCF8574:
[19:09:20][C][pcf8574:022]:   Address: 0x20
[19:09:20][C][pcf8574:023]:   Is PCF8575: YES
[19:09:20][E][pcf8574:025]: Communication with PCF8574 failed!
[19:09:20][C][pcf8574:021]: PCF8574:
[19:09:20][C][pcf8574:022]:   Address: 0x21
[19:09:20][C][pcf8574:023]:   Is PCF8575: YES
[19:09:20][E][pcf8574:025]: Communication with PCF8574 failed!
[19:09:20][C][logger:175]: Logger:
[19:09:20][C][logger:176]:   Level: DEBUG
[19:09:20][C][logger:177]:   Log Baud Rate: 115200
[19:09:20][C][logger:178]:   Hardware UART: UART0
[19:09:20][C][captive_portal:169]: Captive Portal:
[19:09:20][C][web_server:123]: Web Server:
[19:09:20][C][web_server:124]:   Address: 192.168.1.79:80
[19:09:20][C][ota:029]: Over-The-Air Updates:
[19:09:20][C][ota:030]:   Address: 192.168.1.79:3232
[19:09:20][C][api:095]: API Server:
[19:09:20][C][api:096]:   Address: 192.168.1.79:6053

Just replaced power module to a 3.3v
and its working now… have no idea why…
Too much power with 5v?

INFO Reading configuration /config/esphome/esp32tst.yaml...
INFO Starting log output from 192.168.1.79 using esphome API
INFO Connecting to 192.168.1.79:6053 (192.168.1.79)
INFO Successfully connected to 192.168.1.79
[19:49:04][I][app:100]: ESPHome version 1.14.5 compiled on Jul 29 2020, 18:43:10
[19:49:04][C][wifi:415]: WiFi:
[19:49:04][C][wifi:283]:   SSID: 'WiFi'[redacted]
[19:49:04][C][wifi:284]:   IP Address: 192.168.1.79
[19:49:04][C][wifi:286]:   BSSID: 8C:53:C3:98:A8:5D[redacted]
[19:49:04][C][wifi:287]:   Hostname: 'esp32tst'
[19:49:04][C][wifi:291]:   Signal strength: -26 dB ▂▄▆█
[19:49:04][C][wifi:295]:   Channel: 10
[19:49:04][C][wifi:296]:   Subnet: 255.255.255.0
[19:49:04][C][wifi:297]:   Gateway: 192.168.1.1
[19:49:04][C][wifi:298]:   DNS1: 0.0.0.0
[19:49:04][C][wifi:299]:   DNS2: 0.0.0.0
[19:49:04][C][i2c:028]: I2C Bus:
[19:49:04][C][i2c:029]:   SDA Pin: GPIO27
[19:49:04][C][i2c:030]:   SCL Pin: GPIO26
[19:49:04][C][i2c:031]:   Frequency: 50000 Hz
[19:49:04][I][i2c:033]: Scanning i2c bus for active devices...
[19:49:04][I][i2c:040]: Found i2c device at address 0x20
[19:49:04][C][i2c:028]: I2C Bus:
[19:49:05][C][i2c:029]:   SDA Pin: GPIO33
[19:49:05][C][i2c:030]:   SCL Pin: GPIO32
[19:49:05][C][i2c:031]:   Frequency: 50000 Hz
[19:49:05][I][i2c:033]: Scanning i2c bus for active devices...
[19:49:05][I][i2c:040]: Found i2c device at address 0x21
[19:49:05][C][pcf8574:021]: PCF8574:
[19:49:05][C][pcf8574:022]:   Address: 0x20
[19:49:05][C][pcf8574:023]:   Is PCF8575: YES
[19:49:05][C][pcf8574:021]: PCF8574:
[19:49:05][C][pcf8574:022]:   Address: 0x21
[19:49:05][C][pcf8574:023]:   Is PCF8575: YES
[19:49:05][C][logger:175]: Logger:
[19:49:05][C][logger:176]:   Level: DEBUG
[19:49:05][C][logger:177]:   Log Baud Rate: 115200
[19:49:05][C][logger:178]:   Hardware UART: UART0
[19:49:05][C][captive_portal:169]: Captive Portal:
[19:49:05][C][web_server:123]: Web Server:
[19:49:05][C][web_server:124]:   Address: 192.168.1.79:80
[19:49:05][C][ota:029]: Over-The-Air Updates:
[19:49:05][C][ota:030]:   Address: 192.168.1.79:3232
[19:49:05][C][api:095]: API Server:
[19:49:05][C][api:096]:   Address: 192.168.1.79:6053