Welcome! Log In Create A New Profile


Experimental MAX31865 on Marlin

Posted by achase79 
Experimental MAX31865 on Marlin
February 10, 2018 09:06AM
I liked the idea of a PT100 reader with 0.03 C resolution, and Adafruit already made the library available, so I quickly hacked support into Marlin if anyone is interested (I think there's currently a feature freeze, so I'll submit it later). Note that this only works for heater 0 (it piggybacks off MAX6675 support).

1. Get the Adafruit MAX31865 breakout board

2. Wire the board.
On RAMPS 1.4, Aux 2 top row = GND, 63[sdi], 40 [sck], 42 [sdo], 65 [cs]

If you want to change pin assignments, look for this line in temperature.cpp

Adafruit_MAX31865 max31865 = Adafruit_MAX31865(65,63,42,40); // Hardware SPI bricks LCD (?and SD)

2. Install the Adafruit MAX31865 library

3. Config.h

#define TEMP_SENSOR_0 -2 // MAX 6675
#define MAX6675_IS_MAX31865

4. Replace the temperature.cpp in your Marlin directory with the attached one.

5. Enjoy 0.03 C resolution!

I've trialed this for a month with no problems. However, do this at your own risk, and don't leave your 3D Printer unattended! I take no responsibility for whatever happens with your 3d printer.

The MAX31865 supports error handling, which has not yet been implemented. Also, hardware SPI doesn't play nice with the LCD, so currently it's bitbanged over extra pins.
open | download - temperature.cpp (71.7 KB)
Re: Experimental MAX31865 on Marlin
June 15, 2018 04:18AM
Hi, i have a MKS GEN L v.1 board, which is basically a RAMPS 1.4

i have tested my MAX31865 board + PT100 3 wire version with Arduino Uno and Adafruit example file and all works fine. Therefore I can exclude an error on the MAX31865 board

1. I have wired on MKS Gen L Aux 2 top row = GND, 63[sdi], 40 [sck], 42 [sdo], 65 [cs]
2. copied temperature.cpp in Arduino folder
3. install Adafruit library MAX31865
4. in configuration.h
#define TEMP_SENSOR_0 -2 // MAX 6675
#define MAX6675_IS_MAX31865

I have disconnected my before thermistor from MKS Gen L, therefore Pin 13 is empty

Compiled, upload is ok, but directly Marlin throws the ERR: MAXTEMP

My intuition tells me, that the empty PIN13 makes the problem.

Do you have an idea how to troubleshoot?


Edited 1 time(s). Last edit at 06/15/2018 04:20AM by HM.
open | download - MKS GEN L.png (642.5 KB)
Re: Experimental MAX31865 on Marlin
September 20, 2020 03:45PM
how would i install one with marlin 2.x.x on skr pro 1.4 turbo with tmc2209s ?
Sorry, only registered users may post in this forum.

Click here to login