Multiple SPI Devices on one ESPHome device?

Newbie here (and, yes I did some searching first) I want to use two K thermocouple readers for a smoker/grill I am planning on connecting two max31856 devices with a common miso_pin and mosi_pin and each with its own Chip Select pin. Am I on the right track and is this the best way to do that?

# Example configuration entry
spi:
  clk_pin: GPIO18
  miso_pin: GPIO19
  mosi_pin: GPIO23
sensor:
  - platform: max31856
    name: "Grill Temperature"
    cs_pin: GPIO17
  - platform: max31856
    name: "Meat Temperature"    
    cs_pin: GPIO15
Summary

This text will be hidden

Am I on the right track?

Thanks in advance,

Jules

I don’t have any experience with ESPHome, but from an electrical perspective, yes, you are correct. And that config looks correct at first glance.

Thank you. I have two on order so I will know soon. A little research on SPI busses says this should work as well.

Jules

Hey Jules,
I’m interested also in answering that question.
Did you have any progress here?
If yes how did it work finally?

1 Like

I would also like to know if it works.
I wanted to connect 2 TFT ILI9341.

1 Like

I was successful! Here is my code:

spi:
  miso_pin: GPIO21
  clk_pin: GPIO22

sensor:
  - platform: max6675
    name: "Kamado Joe Temp"
    cs_pin: GPIO18
    update_interval: 20s
    filters:
     lambda: return x * (9.0/5.0) + 32.0;
    unit_of_measurement: "°F"
  - platform: max6675
    name: "Meat Temp"
    cs_pin: GPIO19
    update_interval: 20s
    filters:
     lambda: return x * (9.0/5.0) + 32.0;
    unit_of_measurement: "°F"
    
  - platform: wifi_signal
    name: "BBQ wifi"
    update_interval: 60s

  - platform: uptime
    name: "BBQ Uptime"
    update_interval: 60s
4 Likes

Hi Jules,

Thanks for sharing, I wanted to let you know that you answered exactly my question, so big thanks! Just curious, how is your experience grilling with measuring the thermocouples in real life? Do you use it?

Best,
Tijn