Posts: 2
Joined: Fri Jan 17, 2020 9:38 am

MAX6675 thermocouple amp insists my kitchen in over 200C!

Fri Jan 17, 2020 9:54 am


I have a MAX6675 hooked up to my Zero W as per the instructions in this post: ... 0#p1097772

Which is:

Max6675 pin 1 GND to Pi pin 6 GND
Max6675 pin 2 VCC to Pi Pin 1 3V DC Power
Max6675 pin 3 DO to Pi pin 21, MISO SPI (GPIO 13)
Max6675 pin 4 CS to Pi pin 24, CE0 SPI (GPIO 10)
Max6675 pin 5 CLK to Pi pin 23, SCLK SPI (GPIO 14)

I've treble checked the pins at both ends and they're right. SPI is enabled.

Using RPiSensors and the library from picoReflow (detailed in the post following the one above) I consistently get a reading of around 261 from it. If I heat or cool the thermocouple in hot or cold water, or just with my hand, I can sometimes read 370-something. Very rarely it reads single digits (my room is cool but it's not that cool!). It doesn't move like expected - so if I hold the thermocouple I'd expect it to go up maybe ten degrees, if I put it in boiling water I expect a rise of about 80, but it seems to just change randomly, or not change at all. If it was consistently off by 240 then I'd just code an offset in.

If I pull or change any of the pins it stops working at all and reads zero. I thought the amp was dodgy and asked the vendor, they agreed and sent me a replacement. Both amps act the same. When I put a known-good thermocouple into the amp (rather than the ones with came with it), I get the same result. When I take the thermocouple out of the amp, I get the same result. Whether I use my own code or the examples which came with RPiSensors/picoReflow, I get the same result. I know my way around python and it's hardly complicated anyway, but fwiw my test script is just this:

Code: Select all

import max6675
import spidev

sensor = max6675.Max6675(0,0)
print sensor.temperature
Are these cheap eBay MAX6775 amps just total junk or have I missed something fundamental?

Related, has anyone used Pimoroni's MCP9600 amp and is that worth grabbing as a replacement (should I need one)?


User avatar
Posts: 37133
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: MAX6675 thermocouple amp insists my kitchen in over 200C!

Fri Jan 17, 2020 10:57 am

6675s are junk compared to MAX31855s.

Do you have a type-K thermocouple.

Code: Select all

# -*- coding: utf-8 -*-

import spidev
from time import sleep

m6675 = spidev.SpiDev(1,1)

def c_to_f(temp):
    f = ((temp/5)*9)+32
    return f

def readTempC():
    tempRead = m6675.readbytes(2)
    temp = (tempRead[0] <<8 | tempRead[1]) >> 3
    return temp * 0.25

while True:
    temp = readTempC()
    print('Thermocouple Temperature: {0:0.3F}°C / {1:0.3F}°F'.format(temp, c_to_f(temp)))

Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Posts: 2
Joined: Fri Jan 17, 2020 9:38 am

Re: MAX6675 thermocouple amp insists my kitchen in over 200C!

Fri Jan 17, 2020 7:05 pm

K-Type, yes.

Well, your code works. Or at least it's putting out numbers that seem right and when I make the thermocouple hotter or colder the output goes up and down respectively. No idea why RPiSensors and picoReflow doesn't play nice, but never mind.

I know the 6775 isn't brilliant but it's cheap and I don't need much in the way of accuracy (to within 5-10C is fine) but I might upgrade to a MAX31855 or MCP9600 later anyway.


Return to “Automation, sensing and robotics”