Welcome! Log In Create A New Profile

Advanced

Marlin Reading MAX6675 Thermocouple Amplifier

Posted by zfitzgerald 
Marlin Reading MAX6675 Thermocouple Amplifier
November 12, 2014 04:47PM
Hello,
I am attempting to connect the MAX6675 thermocouple amplifier to my Ultimaker v1.5.7 3D printer PCB board. I believe that I have it connected properly but I am having issues getting the software to talk to it. From my understanding, all I should have to do is set TEMP_SENSOR_0 to -2 in the Marlin firmware. Unfortunately, no matter what version of Marlin I use, I get compiling errors. They read stuff like:

temperature.cpp:1011: error: 'DIOMAX6675_SS_WPORT' was not declared in this scope
temperature.cpp:1011: error: 'DIOMAX6675_SS_PIN' was not declared in this scope

Also the page that it opens and highlights when it gives this error looks like:

#ifdef HEATER_0_USES_MAX6675
#ifndef SDSUPPORT
SET_OUTPUT(MAX_SCK_PIN);
WRITE(MAX_SCK_PIN,0);

SET_OUTPUT(MAX_MOSI_PIN);
WRITE(MAX_MOSI_PIN,1);

SET_INPUT(MAX_MISO_PIN);
WRITE(MAX_MISO_PIN,1);
#endif

SET_OUTPUT(MAX6675_SS);
WRITE(MAX6675_SS,1);
#endif

The only other setting that I have changed in the file is #define MOTHERBOARD to 7. Based on the error, I believed that the pins for SPI interfacing weren't defined so I went to the pins.h file and the section that talks about the MAX6675 board looks fine:

#endif // MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77

SPI for Max6675 Thermocouple

#ifndef SDSUPPORT
// these pins are defined in the SD library if building with SD support
#define MAX_SCK_PIN 52
#define MAX_MISO_PIN 50
#define MAX_MOSI_PIN 51
#define MAX6675_SS 53
#else
#define MAX6675_SS 49
#endif

#endif //MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77

Any help is greatly appreciated! Thanks.
Re: Marlin Reading MAX6675 Thermocouple Amplifier
November 12, 2014 05:46PM
Isn't that section only compiled for motherboads 3,33,34,35 and 77? You'd need to define MAX6675_SS in the motherboard 7 pins.
Re: Marlin Reading MAX6675 Thermocouple Amplifier
November 12, 2014 06:10PM
Thanks for the help. I tried putting

#if MOTHERBOARD == 7
#define KNOWN_BOARD
#define MAX_SCK_PIN 52
#define MAX_MISO_PIN 50
#define MAX_MOSI_PIN 51
#define MAX6675_SS 53
#endif

this in the motherboard 7 place but I am still getting the same error. I think I have to edit the file in another way besides notepad because it is saving weird but arduino wont let me open pins.h. Any suggestions?
Re: Marlin Reading MAX6675 Thermocouple Amplifier
November 12, 2014 06:37PM
I use Notepad++. Or you can use CTRL+ALT+Right to get to the next tab in the arduino IDE, which will let you get to pins.h.
Re: Marlin Reading MAX6675 Thermocouple Amplifier
November 12, 2014 07:06PM
I have defined the pins in the right section and then I uploaded the sketch. My lcd is out and I think it is because I am use the SPI bus for the MAX chip so it shuts off. However, I cant read or give commands via my computer. Repeteir-Host just says 1 command waiting, 2 commands waiting... Does anyone know what is going on and how to at least run the printer from my computer?
Re: Marlin Reading MAX6675 Thermocouple Amplifier
November 14, 2014 06:36PM
did this issue get resolved and how did you fix it?
Sorry, only registered users may post in this forum.

Click here to login