Trying to connect the MAX6675 to a D1 mini, got 'invalid value' from sensor

Looking at the docs it says in the example:

spi:
  miso_pin: D0
  clk_pin: D1

sensor:
  - platform: max6675
    name: "Living Room Temperature"
    cs_pin: D2
    update_interval: 60s

From that it needs three pins apart from 3.3v and gnd.
MISO
CLK
CS

Looking at the pinout for the D1 mini:

I guess CLK is SLCK?

I made my config like this:

esphome:
  ...
  platform: ESP8266
  board: esp8285

...

spi:
  miso_pin:GPIO12
  clk_pin: GPIO14

sensor:
  - platform: max6675
    name: "Raclette Temperature"
    cs_pin: GPIO15
    update_interval: 30s

But it gives me this:
[W][max6675:040]: Got invalid value from MAX6675Sensor (0xFFFF)

Please help me with some insights…

This does not look like the correct board definition for a Wemos D1 mini.

esphome:
  ...
  platform: ESP8266
  board: esp8285

I use:

esphome:
  name: whatever
  platform: ESP8266
  board: d1_mini

Also what pins have you connected the sensor board to as marked on the board (D1 - D8)?

1 Like

Hi Tom

Ahh, yes, I can’t find the board type definitions, so I’m a bit blind there. I corrected it but no change.
I entered this in the code
MISO: GPIO12
CLK: GPIO14
CS: GPIO15

I’ve also tried
MISO: D6
CLK: D5
CS: D8

But that gave me the same result :cry:

Board definitions are here (ESP8266) and here (ESP32). Bookmark them. Clicking on your board type will take you to a page with the definitions.

I can see what pins you used in the code, I wanted to make sure you were physically connected to the correct pins. So I wanted the ‘D’ numbers on the board to see if they corresponded to the GPIO numbers you had in the code.

If you are connected to these:

MISO: D6
CLK: D5
CS: D8

Then that’s all good.

The MAX6675 works from 3 to 5V so supplying it from 3.3V is not an issue (do not use 5V, you need 3.3V logic on the other pins).

So I’m out of ideas. :man_shrugging: Sorry.

EDIT: is the thermocouple connected?

1 Like

Ok, darned :grinning_face_with_smiling_eyes:

This is what is built at the moment…



DOOH, when looking at the picture I saw that I had put it to MOSI instead of MISO, darned, so I moved it and, taddaaa

Yes, it’s that hot in Denmark at the moment, pheew.

2 Likes

Ha! So that was a big ‘if’.

1 Like