Ezo pH sensor not working with esp32dev

Hello, trying to get an Atlas pH sensor working with home assistant/esp32dev board and having trouble finding the i2C device. Any recommendations?


  name: esp1
  friendly_name: ESP1

  board: esp32dev
    type: arduino

  - platform: ezo
    id: ph_ezo
    name: "pH"
    address: 99
    accuracy_decimals: 2
    unit_of_measurement: "pH"
    state_class: "measurement"
    update_interval: 15s

  sda: GPIO23
  scl: GPIO22
  scan: true

# Enable logging

# Enable Home Assistant API
    key: "*redacted*"

  password: "*redacted*"

  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  #  ssid: "Esp1 Fallback Hotspot"
  #  password: "hPUXEIW8V3cK"



INFO ESPHome 2023.12.9
INFO Reading configuration /config/esphome/esp1.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esp1 (board: esp32dev; framework: arduino; platform: platformio/[email protected])
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.0.1
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|-- Wire @ 2.0.0
RAM:   [=         ]  12.5% (used 40836 bytes from 327680 bytes)
Flash: [=====     ]  49.7% (used 912133 bytes from 1835008 bytes)
========================= [SUCCESS] Took 3.97 seconds =========================
INFO Successfully compiled program.
INFO Connecting to
INFO Uploading /data/build/esp1/.pioenvs/esp1/firmware.bin (917904 bytes)
Uploading: [============================================================] 100% Done...

INFO Upload took 4.74 seconds, waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from using esphome API
INFO Successfully connected to esp1 @ in 7.116s
INFO Successful handshake with esp1 @ in 0.122s
[14:14:17][I][app:102]: ESPHome version 2023.12.9 compiled on Feb  3 2024, 14:06:44
[14:14:17][C][wifi:573]: WiFi:
[14:14:17][C][wifi:405]:   Local MAC: D4:8A:FC:D0:54:D4
[14:14:17][C][wifi:410]:   SSID: [redacted]
[14:14:17][C][wifi:411]:   IP Address:
[14:14:17][C][wifi:413]:   BSSID: [redacted]
[14:14:17][C][wifi:414]:   Hostname: 'esp1'
[14:14:17][C][wifi:416]:   Signal strength: -69 dB ▂▄▆█
[14:14:17][C][wifi:420]:   Channel: 3
[14:14:17][C][wifi:421]:   Subnet:
[14:14:17][C][wifi:422]:   Gateway:
[14:14:17][C][wifi:423]:   DNS1:
[14:14:17][C][wifi:424]:   DNS2:
[14:14:17][C][logger:439]: Logger:
[14:14:17][C][logger:440]:   Level: DEBUG
[14:14:17][C][logger:441]:   Log Baud Rate: 115200
[14:14:17][C][logger:443]:   Hardware UART: UART0
[14:14:17][C][i2c.arduino:053]: I2C Bus:
[14:14:17][C][i2c.arduino:054]:   SDA Pin: GPIO23
[14:14:17][C][i2c.arduino:055]:   SCL Pin: GPIO22
[14:14:17][C][i2c.arduino:056]:   Frequency: 50000 Hz
[14:14:17][C][i2c.arduino:059]:   Recovery: bus successfully recovered
[14:14:17][I][i2c.arduino:069]: Results from i2c bus scan:
[14:14:17][I][i2c.arduino:071]: Found no i2c devices!
[14:14:17][C][ezo.sensor:015]: EZO 'pH'
[14:14:17][C][ezo.sensor:015]:   State Class: 'measurement'
[14:14:17][C][ezo.sensor:015]:   Unit of Measurement: 'pH'
[14:14:17][C][ezo.sensor:015]:   Accuracy Decimals: 2
[14:14:17][C][ezo.sensor:016]:   Address: 0x63
[14:14:17][C][ezo.sensor:020]:   Update Interval: 15.0s
[14:14:17][C][captive_portal:088]: Captive Portal:
[14:14:17][C][mdns:115]: mDNS:
[14:14:17][C][mdns:116]:   Hostname: esp1
[14:14:17][C][ota:097]: Over-The-Air Updates:
[14:14:17][C][ota:098]:   Address: esp1.local:3232
[14:14:17][C][ota:101]:   Using Password.
[14:14:17][C][api:139]: API Server:
[14:14:17][C][api:140]:   Address: esp1.local:6053
[14:14:17][C][api:142]:   Using noise encryption: YES
[14:14:20][E][ezo.sensor:088]: read error
[14:14:20][W][component:214]: Component ezo.sensor took a long time for an operation (0.41 s).
[14:14:20][W][component:215]: Components should block for at most 20-30ms.

It’s hard to tell what color that led is from the photo. I assume it’s blue and the board is running in I2C mode?

Have you tried connecting sda to GPIO21 (and of course change the YAML code)?

I’m wondering about that…the led is constantly flashing between green and blue, about once a second.

Yes, I’ve tried 21 and 22, changing the code and swapping the jumpers. Bad EZO??

That’s possibly the issue. According to the docs that means it’s in UART mode (which is the default) and flashes blue when transmitting a reading. Needs to switch to I2C then will be solid blue, see page 37 of the linked doc:

1 Like

Wow, are you suggesting I RTFM!? :grin: I had looked through the datasheet before but somehow missed the detailed instructions on page 37. Had tried jumpering TX to PGND while it was operating. Thanks for the help (and for making me feel like an idiot)! :rofl: She’s working great now!

1 Like