Thermocouple problem with MAX31856
Hello!
I seem to have hit a snag in the process of testing the operation of my controller. I have used a Zero 2 W board with a Adafruit MAX31856 and the existing thermocouple from my kiln. I am quite sure the thermocouple is type S (which is why I went with the 31856), but I'm not 100% sure. I followed the installation instructions without issue until the testing of the thermocouple. It says MAX31856 (so correct board type) and it retrieves a reading every second, however the temperature reads 0,0C every time. The thermocouple itself has been working for years without problems, so I'm quite confident it is not faulty.
I have tried changing the thermocouple type in config.py, the result is always the same. I have also triple checked the connection to the thermocouple itself. I also tried moving the 3V connection to Vin instead of 3Vo, as this was the way the Adafruit documentations tells you to do it. Same thing.
The wiring connections I have are as follows.
Pin 1 -> 3Vo / Vin Pin 9 -> GND Pin 11 -> SDO (spi_miso = board.D17 in config.py) Pin 13 -> CS (spi_cs = board.D27 in config.py) Pin 15 -> SCK (spi_sclk = board.D22 in config.py)
The relay output I haven't connected yet.
The testing I have done by activating the virtual environment and running the test-thermocouple.py.
Any ideas where things might be going wrong?
Cheers!
Paste the part of the config file, starting at try: import board
to the line with 'thermocouple_type='
On Sun, Jun 15, 2025 at 10:24 AM Nikodemuzz @.***> wrote:
Nikodemuzz created an issue (jbruce12000/kiln-controller#218) https://github.com/jbruce12000/kiln-controller/issues/218
Hello!
I seem to have hit a snag in the process of testing the operation of my controller. I have used a Zero 2 W board with a Adafruit MAX31856 and the existing thermocouple from my kiln. I am quite sure the thermocouple is type S (which is why I went with the 31856), but I'm not 100% sure. I followed the installation instructions without issue until the testing of the thermocouple. It says MAX31856 (so correct board type) and it retrieves a reading every second, however the temperature reads 0,0C every time. The thermocouple itself has been working for years without problems, so I'm quite confident it is not faulty.
I have tried changing the thermocouple type in config.py, the result is always the same. I have also triple checked the connection to the thermocouple itself. I also tried moving the 3V connection to Vin instead of 3Vo, as this was the way the Adafruit documentations tells you to do it. Same thing.
The wiring connections I have are as follows.
Pin 1 -> 3Vo / Vin Pin 9 -> GND Pin 11 -> SDO (17 in config.py) Pin 13 -> CS (27 in config.py) Pin 15 -> SCK (22 in config.py)
The relay output I haven't connected yet.
The testing I have done by activating the virtual environment and running the test-thermocouple.py.
Any ideas where things might be going wrong?
Cheers!
— Reply to this email directly, view it on GitHub https://github.com/jbruce12000/kiln-controller/issues/218, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHE3ZQ22PMVH642B3GTLWW33DWF35AVCNFSM6AAAAAB7LMZDSKVHI2DSMVQWIX3LMV43ASLTON2WKOZTGE2DONRZGEZTCMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Blake C. Lewis
Sure thing, @BlakeCLewis, here we go:
try: import board spi_sclk = board.D22 #spi clock spi_miso = board.D17 #spi Microcomputer In Serial Out spi_cs = board.D27 #spi Chip Select spi_mosi = board.D10 #spi Microcomputer Out Serial In (not connected) gpio_heat = board.D23 #output that controls relay gpio_heat_invert = False #invert the output state except (NotImplementedError,AttributeError): print("not running on blinka recognized board, probably a simulation")
#######################################
Thermocouple breakout boards
#######################################
There are only two breakoutboards supported.
max31855 - only supports type K thermocouples
max31856 - supports many thermocouples
max31855 = 0 max31856 = 1
uncomment these two lines if using MAX-31856
import adafruit_max31856 thermocouple_type = adafruit_max31856.ThermocoupleType.S
How big are the wires in the thermocouple? Not the leads, but the actual wires in the thermocouple. A k type for a kiln will be like 1/8", S type will be like hair size and usually in an enclosed ceramic tube. Like a test tube. Platinum is so expensive, that one that looks like a k-type might cost $1000. Think like gold expensive.
On Mon, Jun 16, 2025 at 1:38 PM Nikodemuzz @.***> wrote:
Nikodemuzz left a comment (jbruce12000/kiln-controller#218) https://github.com/jbruce12000/kiln-controller/issues/218#issuecomment-2977669310
Sure thing, @BlakeCLewis https://github.com/BlakeCLewis, here we go:
try: import board spi_sclk = board.D22 #spi clock spi_miso = board.D17 #spi Microcomputer In Serial Out spi_cs = board.D27 #spi Chip Select spi_mosi = board.D10 #spi Microcomputer Out Serial In (not connected) gpio_heat = board.D23 #output that controls relay gpio_heat_invert = False #invert the output state except (NotImplementedError,AttributeError): print("not running on blinka recognized board, probably a simulation")
####################################### Thermocouple breakout boards
####################################### There are only two breakoutboards supported. max31855 - only supports type K thermocouples max31856 - supports many thermocouples
max31855 = 0 max31856 = 1 uncomment these two lines if using MAX-31856
import adafruit_max31856 thermocouple_type = adafruit_max31856.ThermocoupleType.S
— Reply to this email directly, view it on GitHub https://github.com/jbruce12000/kiln-controller/issues/218#issuecomment-2977669310, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHE3ZQYOS3H5RJKWVM4C6ET3D4FLNAVCNFSM6AAAAAB7LMZDSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNZXGY3DSMZRGA . You are receiving this because you were mentioned.Message ID: @.***>
-- Blake C. Lewis
The wires are probably around 0,5mm, maybe a bit less. You can see only a little bit that comes out of the ceramic enclosure that looks like a ~10mm test tube, like you said.
I use a Fluke thermocouple reader connected to the same tc as in the kiln. Try that .
On Tue, Jun 17, 2025, 8:05 AM Nikodemuzz @.***> wrote:
Nikodemuzz left a comment (jbruce12000/kiln-controller#218) https://github.com/jbruce12000/kiln-controller/issues/218#issuecomment-2980742210
The wires are probably around 0,5mm, maybe a bit less. You can see only a little bit that comes out of the ceramic enclosure that looks like a ~10mm test tube, like you said.
— Reply to this email directly, view it on GitHub https://github.com/jbruce12000/kiln-controller/issues/218#issuecomment-2980742210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXA65G6DZYAXLZD66BP5ELL3EAU77AVCNFSM6AAAAAB7LMZDSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOBQG42DEMRRGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
The thermocouple is intact and I'm certain that it works, but in the end I was unable to locate the problem. Changing to a K-type thermocouple that I had produced the same result. So I bought a 31855 and now it works (with the K-type TC obviously).