Temperature lookup table of NTC-20KGJG, Samkyung thermistor for Rich Cattell’s Marlin v1.0

NTC_thermistors_samkyung

Name: NTC-20KGJG
Resistance: 20k (25C)
Operating temperature: -40C to 250C
B constant: 3991K

Configuration.h

// 20 is 20k Samkyung NTC-20KGJG (4.7k pullup)
// 60 is 100k Maker's Tool Works Kapton Bed Thermister
//
// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
// (but gives greater accuracy and more stable PID)
// 51 is 100k thermistor - EPCOS (1k pullup)
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan) (1k pullup)

// Custom thermistor
#define TEMP_SENSOR_0 20 // 5 (E3D V6 Hotend)

thermistortables.h

// Thermistor lookup table for Marlin
// ./createTemperatureLookup.py --rp=4700 --t1=25.0:20000.0 --t2=115.0:877.52 --t3=250.0:54.44 --num-temps=60

#if (THERMISTORHEATER_0 == 20) || (THERMISTORHEATER_1 == 20) || (THERMISTORHEATER_2 == 20) || (THERMISTORBED == 20)
const short temptable_20[][2] PROGMEM = {
{97, 284},
{105, 278},
{114, 272},
{124, 266},
{135, 260},
{147, 254},
{161, 248},
{176, 242},
{193, 230},
{212, 224},
{233, 218},
{257, 212},
{284, 206},
{315, 200},
{349, 194},
{388, 188},
{433, 182},
{484, 176},
{542, 170},
{609, 164},
{685, 158},
{773, 152},
{874, 146},
{991, 140},
{1126, 134},
{1282, 128},
{1462, 122},
{1672, 116},
{1914, 110},
{2195, 104},
{2519, 98},
{2892, 92},
{3320, 86},
{3809, 80},
{4363, 74},
{4985, 68},
{5675, 62},
{6431, 56},
{7245, 50},
{8105, 44},
{8996, 38},
{9897, 32},
{10784, 26},
{11636, 20},
{12431, 14},
{13153, 8},
{13792, 2},
{14341, -4}
};
#endif

ADC read codes

read_ADC_function

temperature.h
// public functions
void tp_init(); //initialise the heating
void manage_heater(); //it is critical that this is called periodically.
void read_ADC();

temperature.cpp
// shown ADC value for current temperature
void read_ADC()
{
for(uint8_t e=0;e<EXTRUDERS;e++)
{
SERIAL_PROTOCOLPGM("ADC:");
SERIAL_PROTOCOLLN(current_temperature_raw[e]);
}
}

Marlin_main.cpp

case 105 : // M105
if(setTargetedHotend(105)){
break;
}
#if defined(TEMP_0_PIN) && TEMP_0_PIN > -1
SERIAL_PROTOCOLPGM("ok T:");
SERIAL_PROTOCOL_F(degHotend(tmp_extruder),1);
SERIAL_PROTOCOLPGM(" /");
SERIAL_PROTOCOL_F(degTargetHotend(tmp_extruder),1);
#if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1
SERIAL_PROTOCOLPGM(" B:");
SERIAL_PROTOCOL_F(degBed(),1);
SERIAL_PROTOCOLPGM(" /");
SERIAL_PROTOCOL_F(degTargetBed(),1);
#endif //TEMP_BED_PIN
for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) {
SERIAL_PROTOCOLPGM(" T");
SERIAL_PROTOCOL(cur_extruder);
SERIAL_PROTOCOLPGM(":");
SERIAL_PROTOCOL_F(degHotend(cur_extruder),1);
SERIAL_PROTOCOLPGM(" /");
SERIAL_PROTOCOL_F(degTargetHotend(cur_extruder),1);
}
#ifdef ADC_DEBUG
read_ADC(); // __debug__
#endif

About janpenguin

Email: janpenguin [at] riseup [dot] net Every content on the blog is made by Free and Open Source Software in GNU/Linux.
This entry was posted in Reprap 3D Printer and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s