Welcome! Log In Create A New Profile

Advanced

Repetier firmware and thermocouple via MAX6675 issues

Posted by Mattasmack 
Repetier firmware and thermocouple via MAX6675 issues
March 16, 2014 08:38PM
Hi all,
My heated bed thermistor just died, and while I wait for new ones to arrive I've been trying to use a thermocouple and MAX6675 that I had on-hand, and I've been having a few problems ...

First, Repetier takes temperature measurements too frequently for the MAX6675. The MAX6675 takes up to 220 ms to perform a measurement, and if you ask it for a new one before it finishes, it cancels the current measurement and returns the previous value. The temperature measurement loop in Repetier seems to run at about 10 Hz, which means no temperature conversion ever finishes after the first one, so the MAX6675 returns the same initial temperature measurement every time. I added a hack to prevent the firmware from asking for a new temperature measurement unless at least 250 ms has passed since the previous measurement, and this seems to be working. But it's not a good solution. Is there a way to slow down the temperature loop overall to ~ 4 Hz?

Second, the temperature control is messed up (or I have messed it up with the hack mentioned above). The heat bed goes to eight times the temperature I set (in degrees C). That is, if I set the bed to 8 degrees, it goes to 64. If I set 12, it goes to 96. But the temperature display in Repetier-Host is correct! I haven't the foggiest idea what's going on here. Any ideas, anyone?

And lastly, it took me quite a while to get the MAX6675 working because I couldn't figure out how to configure the pins. In configuration.h, HEATED_BED_SENSOR_PIN needs to be set to the DIGITAL pin that is connected to the MAX6675's chip select pin. I couldn't find this documented anywhere -- I figured it out by going through the firmware source code -- and I wish it were documented. (And so I mention it here, so at least the next person who tries this might be able to find it.) Pin 53 seems to be a common one to use, since it is in the same header as the SPI interface on a RAMPS board.

Edited 1 time(s). Last edit at 03/16/2014 10:38PM by Mattasmack.
Sorry, only registered users may post in this forum.

Click here to login