Teacup_Firmware icon indicating copy to clipboard operation
Teacup_Firmware copied to clipboard

PT100 support

Open mentaluproar opened this issue 8 years ago • 1 comments
trafficstars

I'm having trouble getting my PT100 working in teacup. I have it connected to my RAMPS via an amplifier board. Looking at the code, It looks like PT100 support is in the todo list. Is there a branch where it works?

mentaluproar avatar Jun 06 '17 00:06 mentaluproar

Easiest way is to make your own thermistortable.h. Little quick and dirty guidance:

The thermistortable.h looks like:

#define NUMTABLES 2
#define NUMTEMPS 25

#define THERMISTOR_EXTRUDER 0
#define THERMISTOR_BED 1

const uint16_t PROGMEM temptable[NUMTABLES][NUMTEMPS][3] = {
  // EXTRUDER temp table using Beta algorithm with parameters:
  // R0 = 100000, T0 = 25, R1 = 0, R2 = 1000, beta = 4092, maxadc = 1023
  {
    {  22,  1995,     0}, //  498 C,     22 ohms, 0.107 V, 0.53 mW, m =  0.000
    {  26,  1898,  6177}, //  474 C,     26 ohms, 0.127 V, 0.62 mW, m =  6.033
    {  30,  1820,  5012}, //  455 C,     30 ohms, 0.146 V, 0.71 mW, m =  4.895
...

First, create the normal thermistertable using the config tool. Take any heater for your PT100. Second part replace the '[3]' behind the NUMTEMPS with '[2]'. Delete in any line the third value with the comma. E.g. ', 0' in the first line, ', 6177' in the second line... and so on. You only need this, when you have two different heaters. And also just for the non-PT100 heater. Third, replace the part for PT100. Take a look here: https://wiki.e3d-online.com/wiki/E3D_PT100_Amplifier_Documentation The ADC-value is the first value in the thermistor list. This is the second value in the E3D documentation. Take that (value * 1024 / 5). The second value in the thermistortable is the temperature. Take the temperature from the E3D documentation * 4. So you have something like:

  {
    {  0,  0}, //  0 C, 0V*1024/5V = 0, 0°C*4 = 0
    {  236,  40}, //  10 C, 1,15V*1024/5V = 236, 10°C*4 = 40
    {  30,  270}, // 50 C , 1,32V*1024/5V = 270, 50°C*4 = 200

Last but not least, take as type 'TT_THERMISTOR' for your PT100 in configtool.

tonnico avatar Jul 27 '17 14:07 tonnico