Welcome! Log In Create A New Profile

Advanced

MAX31865 on BTT SKR 1.4 turbo LPC1769

Posted by Lazaro 
MAX31865 on BTT SKR 1.4 turbo LPC1769
April 26, 2020 06:16PM
Hello, I have a problem with trying to connect MAX31865 that works over SPI to BTT SKR 1.4 turbo in Marlin firmware.
I am using a PT100 temperature sensor on the hotend, and since I have very inaccurate temperature reading, I wanted to add MAX31865.

In the Configuration file, I choose -5 sensor and define the CS pin in the board .h file. After that, I got an error that there is no Adafruit_MAX31865 library. After installing it and adding to the platformio.ini file it was reporting error because of missing include file: WProgram.h.
I found somewhere that this is file is the same as Arduino.h so I switched that, and also there was a problem with the SPI mode. As suggested I changed it to SPI_MODE3 in Adafruit_MAX31865.cpp.
After all these changes, I am now able to build the code, but now I can see only Marlin logo on the screen. The printer is not accessible over UART a few seconds after it is turned on, and there is no possibility to access the SD card over USB.
I am still able to flash the board by loading the firmware on the SD card. I tried to disable display since it is also using SPI communication, but there was any effect on this problem.

I assume that there is some problem with SPI communication. Does anyone have some suggestions on what can I try to overcome this problem? Is there support for MAX31865 on LPC1769?

Thank you.
Re: MAX31865 on BTT SKR 1.4 turbo LPC1769
April 30, 2020 06:06PM
I managed to get working, the problem was with the wrong pinout.

Now I am getting an error Open RTD element no matter of the resistance connected. Has anyone faced a similar problem with MAX31865?
Re: MAX31865 on BTT SKR 1.4 turbo LPC1769
June 03, 2020 06:14AM
Hi,

I managed to compile the Marlin firmware to try to use the MAX31865 via SPI using the SKR's E1 pins. I used the Adafruit libraries and swapped to the arduino.h and SPI_MODE3, as you did.

Unfortunately I didn't get as far as you did. It just stuck at the Marlin logo on the screen.

That was the state of play, for me, as of Yesterday.

What pins did you use, physically, and in the config files, in order to move past just displaying the logo? Did you finally get MAX31865 via SPI working? I'd be grateful if you would relay the information if you did.
==

There doesn't seems to be much information around for using the MAX31865 via SPI in Marlin, specifically for SKR 1.4 boards.

There does seems to be a way to use an E3D PT100 amplifier via an amended header file via the ADC on the SKR 1.4, ie not SPI. However this seems to limit the max temperature read by PT100 to circa 360oC as the E3D amplifier would be driven at 3.3V.

I'm sorry that I can't provide a resolution to the problem, only say I have it too.

Best,

Simon
Re: MAX31865 on BTT SKR 1.4 turbo LPC1769
November 14, 2020 08:36PM
I too am looking at seeing if I can get the SKR V1.4 Turbo to work with MAX31865. I did as you all above did. I can get the code to compile. But the issue I am concerned about is the following. When I reported the compiler error to Marlin in the following BUG report, this is the response I got back from Marlin: [github.com]

I can not tell if he is telling me that the SKR V1.4 or SKR V1.4 Turbo are not meant to work the MAX31865 board. He states "Some general purpose Arduino libraries have been tested and/or modified to work with my framework but in general they don't tend to be supported."

So for a library like the Adafruit MAX31865 which checks the ARDUINO compiler constant his Marlin implementation of the LPC176x does not set the ARDUINO compiler constants. He sets the compiler constant ARDUINOLCP instead so the ARDUNIO compiler constant is null and that is why the Adafruit MAX31865 library tries to install WProgram.h file instead of the correct Arduino.h file.

I am going to spend the next couple of days to see if I can get the MAX31865 to work with his framework.

I will let you know if I ever can get this to work. I CAN get the SKR V1.4 Turbo to work with Marlin and the Adafruit MAX31865 board. I will write up a GUIDE and post it here for anyone else interested in how to get the SKR V1.3/ SKR V1.4 or SKR V1.4 Turbo to work with the Adafruit MAX31865 board in both Software SPI and hardware SPI. I even have two boards running in Software SPI on the SKR V1.4 Turbo at the present time.

Give me a couple more days of testing and time to write up how I did it.smileys with beer

Edited 1 time(s). Last edit at 11/15/2020 09:37PM by GadgetAngel.
Re: MAX31865 on BTT SKR 1.4 turbo LPC1769
December 30, 2020 10:58AM
I finished my testing and found that I had to create my own MAX31865 library to get it to work with the SKR V1.3 board, SKR V1.4 board or the SKR V1.4 Turbo board. Please see the appropriate link below for your MCU board:

For the SKR V1.3 board see: [github.com]

For the SKR V1.4 board see: [github.com]

For the SKR V1.4 TURBO board see: [github.com]

I hope this helps others. Have a great day, GadgetAngel
Re: MAX31865 on BTT SKR 1.4 turbo LPC1769
February 26, 2021 12:52PM
Hello I have been trying to get the max31865 to work with my skr1.4 turbo in software spi I got everything to compile but right after the boot screen I get a max temp e1 error just wondering if anyone can help me figure out what I’m doing wrong I’m using the newest marlin 2.0.x bug fix

Edited 1 time(s). Last edit at 02/26/2021 05:42PM by Pstit006.
Re: MAX31865 on BTT SKR 1.4 turbo LPC1769
February 28, 2021 02:53PM
Hello I was wondering if you could help me out I followed your guide as best as I could I have the skr1.4 turbo with tmc2209 and the btt70 running marlin 2.0bug fix. I’m trying to run the max31865 in software spi so that I can still have the marlin screen I managed to get the firmware to compile but after boot up I get a mintemp e1 error so then I plug in the max31865 to the same pins exactly like you have it in the guide then after boot up I get maxtemp e1 error any help would be greatly appreciated
Sorry, only registered users may post in this forum.

Click here to login