MAX31850 1-wire device


#1

I’m using a MAX31850 to measure temps in an electric kiln. However, Cayenne doesn’t give me a reading on it. If I check it from the terminal I get a good reading and it works with other programs I’ve used. I added it manually and put the serial number in, but that didn’t do any good.The serial number starts with a 3b- if that makes a difference. I know in one of the programs I played with I just needed to include the 3b- in the section of code that defined what numbers to look for. I love the interface and how easy it is to setup different triggers. Hopefully I’ll be able to use this system on this particular project soon.


#2

Drivers have been a hot request item since launch. Unfortunately right now it’s not possible to get data from MAX31850 sensors. I actually have some MAX6675 sensors that I want to use as well. Once they get the custom code widgets released we can write our own python scripts.


#3

The whole family could be supported, just use a different physical layer.

Going to build a WebIOPi driver this weekend for my MAX31855s.

Be careful with the MAX6675s Adam unless your device is kept at ambient temperature as there is no compensation on them. You can however buy the chips and swap out the MAX6675s on your boards as they are pin compatible.

Cheers,

Craig


#4

It’s just for a smoker so I’m not super worried about it. As long as it’s close ±10 degrees it’s fine. But for clarification you mean the actual MAX6675 device, right?


#5

Yeah. The physical SOIC pinout for the MAX31855 and MAX6675 are the same. The driver is different to accommodate a slightly different readback.


#6

Moving this to Ideas / Suggestions so I can track the MAX31850 device in road map. Hope you don’t mind.

-B


#7

Found a good pi python driver for the MAX31855 tonight. https://github.com/Tuckie/max31855

Was looking for something that didn’t include a bunch of libraries, was flexible, and also included the reference junction reading. This one works great!

Should be straightforward now to integrate into a Cayenne driver.

Here’s my test code.

#!/usr/bin/python
from max31855 import MAX31855, MAX31855Error
import RPi.GPIO as GPIO #needed for board definitions

#if referring to GPIO Channel names
#cs_pin = 8
#clock_pin = 11
#data_pin = 9
#units = "c"
#board = GPIO.BCM

#if referring to GPIO header pins
cs_pin = 24
clock_pin = 23
data_pin = 21
units = "c"
board = GPIO.BOARD

thermocouple = MAX31855(cs_pin, clock_pin, data_pin, units, board)

tc = thermocouple.get()
rj = thermocouple.get_rj()

print("tc: {} and rj: {}".format(tc, rj))

thermocouple.cleanup()

#8

Looked over that driver, it need to be reworked to directly use SPI interface instead of GPIO.
You can look on MCP23Sxx WebIOPI drivers to see how SPI works, but should be more efficient.


#9

Thx Eriic.

Yeah, for sure. Now will we be able to use more than the two chip selects with the hardware SPI?

Cheers,

Craig


#10

The driver that’s used for the DS18B20 will also work for the MAX31850. Somewhere in the driver it’s going to state what strings to look for to determine the serial number. Just add a new family number of 3b. Here’s one example of what I’m getting at. Both sensors respond to the same commands with the same output.