Several thermocouples on raspberry pi

I am new to the GPIO portion of Raspberry Pi. When I need contacts, I usually use Arduino. However, I would really like this project to be combined with one platform, if possible, I would like to do all this on PI.

So, I have three (3) MAX31855 boards and type K thermocouples. I just donโ€™t know where to go by connecting the other two. I do not know if I can use any other contacts (besides power and grounding contacts) for MISO, CSO and SCLK contacts. This may sound like a question for beginners, but, as I said, I'm used to using arduino for this. Any input is appreciated. Thanks in advance.

I am using the code from https://github.com/Tuckie/max31855

from max31855 import MAX31855, MAX31855Error cs_pin=24 clock_pin=23 data_pin=22 unit="f" thermocouple1=MAX31855(cs_pin, clock_pin, data_pin, units) print(thermocouple.get()) thermocouple.cleanup() 
+5
source share
1 answer

You can share the MISO and SCLK between devices, and then each device will have its own CS . Sort of:

Multi Drop SPI

In this case, Master is Pi and Slaves is MAX31855. SS (Slave Select) is the same as CS (Chip Select).

 from max31855 import MAX31855, MAX31855Error cs_pin_1=24 clock_pin=23 data_pin=22 cs_pin_2=21 cs_pin_3=20 units = "f" thermocouple1=MAX31855(cs_pin_1, clock_pin, data_pin, units) thermocouple2=MAX31855(cs_pin_2, clock_pin, data_pin, units) thermocouple3=MAX31855(cs_pin_3, clock_pin, data_pin, units) 
+7
source

Source: https://habr.com/ru/post/1267161/


All Articles