Multiple thermocouples on raspberry pi
Asked Answered
B

2

6

I am pretty new to the GPIO part of the raspberry Pi. When I need pins I normally just use Arduino. However I would really like this project to be consolidated to one platform if possible, I would like to do it all on the PI.

So I have three (3) MAX31855 boards and type K Thermocouples. I just don't know where to go with hooking up the other two. I don't know if I can just use any other pins (besides power and ground pins) for the MISO, CSO, and SCLK pins. This may sound like a rookie question but like I said I'm used to using arduino for this stuff. Any input is appreciated. Thanks in advance.

I'm using 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()
Blintz answered 25/4, 2017 at 22:48 Comment(1)
you could use a TH7 which has 7 thermo-couple inputs on one PCB for the raspberry pi github.com/robin48gx/TH7Ecuador
D
12

You can share the MISO and SCLK lines among the devices, and then each device will need its own CS. Something like:

Multi Drop SPI

In this case Master is the Pi, and Slaves are the MAX31855's. 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)
Denbrook answered 25/4, 2017 at 23:3 Comment(1)
Checked and up voted. I apparently don't have enough reputation to up vote.Blintz
E
0

You could use a TH7 pi hat which allows up to seven thermocouple inputs. This PCB uses the standard python SPI interface. Python Code plus documentation below. https://github.com/robin48gx/TH7

Ecuador answered 4/11, 2018 at 11:1 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.