ESP32-PoE-ISO with MAX31855

I’m trying to get an Olimex ESP32-PoE-ISO to measure temperature using the Adafruit MAX31855. I’m getting the following error message:

[E][max31855:050]: No data received from MAX31855 (0xFFFFFFFF). Check wiring!

I’m using the following configuration:

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
  power_pin: GPIO12

spi:
  miso_pin:
    number: GPIO1
  clk_pin: 
    number: GPIO3

sensor:
  - platform: max31855
    name: "Temperature Sensor"
    cs_pin: GPIO5
    update_interval: 5s

I’m fairly certain that I’ve wired it up correctly. Any thoughts on where I’m going wrong? If I invert GPIO1, I can get it to report 0 for a temperature, but every other thing I’ve done results in the same error message saying no data received.

Any ideas on what I’m doing wrong?

It’s not uncommon that the sources of problems are where one is super-confident about :wink:
Maybe post a picture of your wiring just in case…

I’ve now included an image. I’m guessing that there’s something super obviously wrong with what I’m doing. I tried using the 3.3V pins as well with the same result. I’ve measured voltage across the Vin and 3Vo pins to ground and they come up in the correct voltage ranges. I’ve also wired up 2 sets of these with identical results (on a solder-less breadboard as well as on a solder-able breadboard) and probed each connection for continuity, so I don’t think it’s a matter of a bad hardware sample or soldering technique.

According to the docs the spi config is a little different from what you have

spi:
  miso_pin: D0
  clk_pin: D1

I’m just using the “advanced” pin schema: Configuration Types — ESPHome

Mmm… VIn should be 3.3V, not 5V. Tolerance is 4V

Vin is 5V according to Breadboarding the circuit | Connecting the MAX31855 Thermocouple Amplifier breakout to an Electric Imp | Adafruit Learning System

It says: “The MAX31855 breakout has an onboard voltage regulator, and can be powered by either 3.3v at the 3Vo pin, or higher voltages at the Vin pin.”

(I’ve also tried wiring 3.3V to the 3Vo pin with the same result.)

Well, the datasheet says max 4V.
Anyway, maybe try 3.3V with different pins. You might have fried the current ones if 5V was fed back to them.

I was experimenting with this some more and it seems that if I move CS to GPIO16, I get temperature ratings. I haven’t been able to confirm accuracy of the readings yet, but they seem to trend in the right direction.

Any explanations for why it seems that GPIOs 0-5 can’t be used for this? I tried just about every configuration possible with the GPIO pins on that side with no luck.

I haven’t tried the rest of the pins on the side of the chip with GPIO16, but needing to use the pins on the other side definitely make breadboarding much more annoying. (Probably easier to just use DuPont connectors instead.)

If anyone comes looking here for a solution, here’s the configuration that finally worked:

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
  power_pin: GPIO12

spi:
  miso_pin: 
    number: GPIO15
    mode:
      input: true
  clk_pin:
    number: GPIO13

sensor:
  - platform: max31855
    name: "Temperature Sensor"
    cs_pin: GPIO14
    update_interval: 5s

I’ve also wired 3.3v to Vin.

I can’t explain why, but I could never get GPIO pins 1-5 to work correctly with the MAX31855. I tried using those pins on all 4 units of the ESP-32-PoE-ISO that I have and it just simply didn’t work for me. In the future, I’m just going to try to avoid using those pins since it seems like it isn’t worth the headache.