raspberry pi 上的多个热电偶

Multiple thermocouples on raspberry pi

我对 raspberry Pi 的 GPIO 部分还很陌生。当我需要别针时,我通常只使用 Arduino。但是,如果可能的话,我真的希望这个项目能够整合到一个平台上,我想在 PI 上完成所有工作。

所以我有三 (3) 个 MAX31855 板和 K 型热电偶。我只是不知道去哪里连接另外两个。我不知道我是否可以将任何其他引脚(除了电源和接地引脚)用于 MISO、CSO 和 SCLK 引脚。这听起来像是一个菜鸟问题,但就像我说的那样,我已经习惯使用 arduino 来解决这些问题。任何输入表示赞赏。提前致谢。

我正在使用来自 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()

您可以在设备之间共享 MISOSCLK 线路,然后每个设备都需要自己的 CS。类似于:

本例中Master是Pi,Slaves是MAX31855的。 SS(从Select)与CS(芯片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)

您可以使用 TH7 pi 帽子,它最多允许七个热电偶输入。 此 PCB 使用标准 python SPI 接口。 Python代码加 下面的文档。 https://github.com/robin48gx/TH7