Hi,
i hope you could help me or add some tips. I have some issues with MAX6675 component. I get always 0°C result from the breakout.
my hardware configuration:
- esp32 doit devkit v1
- max6675 breakout - about 4 years old from CN
- pins:
DO = 19;
CS = 5;
CLK = 23;
I’ve checked this: - wiring ok
- with Arduino IDE it works
- with Platformio it works
- with ESPhome it doesn’t work
- MAX6675 library ver. 1.1.0 from Adafruit
Part of my ESPHome yaml:
spi:
miso_pin: GPIO19
clk_pin: GPIO23
sensor:
- platform: max6675
name: “TC”
cs_pin: GPIO5
update_interval: 30s
Thank you in advance!
G
Update #1 my whole yaml:
Tested versions: 1.14.5, 1.16.0-dev
esphome:
name: test01
platform: ESP32
board: esp32doit-devkit-v1
wifi:
ssid: "SSID"
password: "PASSWORD"
# Enable fallback hotspot (captive portal) in case wifi connection fails
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "OTApass"
ota:
password: "OTApass"
i2c:
sda: GPIO21
scl: GPIO22
scan: True
id: bus_a
pcf8574:
- id: "pcf8574_hub_output"
address: 0x20
pcf8575: false
- id: "pcf8574_hub_input"
address: 0x24
pcf8575: false
switch:
- platform: gpio
name: "PUMP_1"
pin:
pcf8574: pcf8574_hub_output
number: 0
mode: OUTPUT
inverted: true
binary_sensor:
- platform: gpio
name: "TEST_INPUT_0"
pin:
pcf8574: pcf8574_hub_input
number: 0
mode: INPUT
inverted: true
- platform: gpio
name: "TEST_INPUT_1"
pin:
pcf8574: pcf8574_hub_input
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "TEST_INPUT_2"
pin:
pcf8574: pcf8574_hub_input
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "TEST_INPUT_3"
pin:
pcf8574: pcf8574_hub_input
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "TEST_INPUT_4"
pin:
pcf8574: pcf8574_hub_input
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "TEST_INPUT_5"
pin:
pcf8574: pcf8574_hub_input
number: 5
mode: INPUT
inverted: true
- platform: gpio
name: "TEST_INPUT_6"
pin:
pcf8574: pcf8574_hub_input
number: 6
mode: INPUT
inverted: true
- platform: gpio
name: "TEST_INPUT_7"
pin:
pcf8574: pcf8574_hub_input
number: 7
mode: INPUT
inverted: true
spi:
miso_pin: GPIO19
clk_pin: GPIO23
id: "spi_max"
dallas:
- id: "dallas_hub_1"
pin: GPIO15
sensor:
- platform: max6675
spi_id: spi_max
name: "TC"
cs_pin: GPIO5
update_interval: 30s
- platform: dallas
address: 0xC7031554B6CCFF28
name: "TestDS"
dallas_id: dallas_hub_1
Update #2 - Problem solved
I’ve changed the wiring. MAX6675 CLK pin has been resoldered to pin 18. It’s the CLK pin of HW SPI of the board. The relevant SPI settings in config is this:
spi:
miso_pin: GPIO19
clk_pin: GPIO18