Thermistor/ru

From RepRap
Revision as of 08:57, 9 January 2013 by LunaticRL (talk | contribs) (Created page with '{{Languages|Thermistors}} = Термисторы = Термисторы это резисторы которые менять свое сопротивление с измен…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Термисторы

Термисторы это резисторы которые менять свое сопротивление с изменением термпературы. Термисторы хорошего качетсва предсказуемы, с точно известной величиной сопротивления при каждой температуре в пределах рабочей зоны температур. Понижение или повышение сопротивления с повышением температуры в Кельвинах (или Цельсиев, если вам удобней) зависит от типа термистора. Это называется термальный коэффициент термистора. При положительном термальном коэффициене(ПТЦ) (англ. Positive Thermal Coefficient, PTC) сопротивление будет увеличиваться с увеличением температуры, и соответственно, при отрицательном (Negative Thermal Coefficient, NTC) сопротивление будет падать. Но на практике зависимость сильно не линейна, поэтому часто точная таблица измерений лучше чем линейная формула. Эти таблицы обычно можно найти в документации к термистору.

Теория

You cannot directly measure resistance. To test the resistance, you can put a voltage on a wire and see how much current will run. Another alternative is to use it together with another resistor of a known value, and measure the potential (or voltage) between the resistors. This is what a multimeter does to be able to show you the (deduced) resistance. Remember that there usually is a dial on a multimeter, this allows you to select a range to measure in. This is because the value of the known resistor has to be varied to have the potential (voltage) be in a range that can be measured accurately.

This can best be explained by example: You have two resistors between 0 and 5V. The two resistors are R2=4.7K Ohm at the 5V side and R1=1K Ohm at the ground side. The two resistors act as what is known as a voltage divider. Between the resistors, the voltage is based on the ratio of the two resistances. If you have the 5V power source (Vcc) turned on, this means that the voltage will be: 5V - 5V * 4700/(4700+1000) = ~ 0.88 V. This is also the voltage you would measure at the R2 + R1 junction with a multimeter/voltmeter. If you add a resistor to the mix that changes strongly with a change in temperature, this will affect the value of the voltage divider and the resulting voltage in between. This is because two parallel resistors of which one changes resistance, the total resistance of the total resistance will change as well.

If the thermistor Rth is connected between the ground (0 Volts) and the middle of the two resistors, the value of resistance between the middle junction and the ground will be based on the following formula:

Rpair = 1 / (1/R1 + 1/Rth) = 1 / (1/1000 + 1/Rth) = Rpair

Rpair is the resistance between 0 V and the middle junction. If Rpair is known, based on the calculation of the voltage divider, you can deduce the resistance of the thermistor (Rth).

Through algebraic manipulation you get the formula for Rth: Rth = 1 / (1/1000 - 1/Rpair)

In voltage terms, the voltage at the junction Vout is:

 Vout = Vcc*Rpair/(R2+Rpair)

The ADC in reprap hardware measures Vout as the fractional voltage between its reference voltage Vref (commonly Vref=Vcc) and 0V, expressed as a count of steps (commonly 0 to 1023) at the resolution of the ADC (commonly 1024 or 10 bits.)

As a ratio, the voltage difference is:

 Vout/Vcc = Rpair/(R2+Rpair)

As a ADC count, the ADC produces:

 ADC_count = 1024*Vout/Vref = 1024*Rpair/(R2+Rpair)

ADC_count is limited to the range (0,...,1023) and the device may be damaged with Vout below 0 or above Vref.

Reprap firmware typically uses a table of values mapping an ADC voltage count to a temperature in Celcius (see example below). One could create this table manually by measuring the temperature of the sensor and reading the count from the ADC, or by measuring the temperatures and corresponding voltages (Vout) and calculating the 1024*Vout/Vref, or one could use a program to do these calculations for you.

Note that the tables below refer to a broken link, and that the tables were likely generated with a modified copy of createTemperatureLookup.py.

Note also that several of the tables below for 100Kohm thermistors indicate a R1=0, which, to the createTemperatureLookup.py program, indicates a non-existent R1 (R1 is an open circuit or an infinite resistance). The higher resistance thermistors do not commonly require an R1 to be stable at the operating temperatures. A non existent R1 simplifies the above equations in that Rpair = Rtherm, and the basic ADC count as read by the electronics is:

 ADC_count = 1024*Vout/Vref = 1024* Rth /(R2+Rth)  # for 100K thermistors without R1.

Thermistors vs thermocouples

A thermistor is usually more accurate than a thermocouple, but thermocouples can handle higher temperatures and are linear. A thermocouple gives a really small voltage (Type K produces 8.138mV @200C) that can be calibrated and conditioned by an IC (AD595A Amplifier or MAX6675 SPI) into a form readable by the electronics. Thermocouples can be more sensitive to noise because of the low voltage. See also Wikipedia "Thermocouple on Wikipedia"

Mendel Parts thermistor

RepRap Thermistors

Each thermistor has a variety of special values such as Beta and Rz value. A variety of thermistors you may encounter when building a RepRap are listed below, along with the appropriate information. These tables were calculated using this Python script. The resistors are labeled as in Temperature_Sensor_2_0#Schematic.

EPCOS 100K Thermistor (B57540G0104F000)

Supplier Part Number
Digi-Key 495-2125-ND
Mouser 871-B57540G104F
  • Rz: 348394
  • Temperature rating: -55 degC ~ 200 degC
// EPCOS 100K Thermistor (B57540G0104F000)
// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts)
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 4066
// max adc: 1023
#define NUMTEMPS 20
short temptable[NUMTEMPS][2] = {
   {1, 841},
   {54, 255},
   {107, 209},
   {160, 184},
   {213, 166},
   {266, 153},
   {319, 142},
   {372, 132},
   {425, 124},
   {478, 116},
   {531, 108},
   {584, 101},
   {637, 93},
   {690, 86},
   {743, 78},
   {796, 70},
   {849, 61},
   {902, 50},
   {955, 34},
   {1008, 3}
};


EPCOS 100K Thermistor (B57560G1104F)

Supplier Part Number
Farnell 1791917
Mouser 871-B57560G1104F000
// EPCOS 100K Thermistor (B57560G1104F)
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4092 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 4092
// max adc: 1023
#define NUMTEMPS 20
short temptable[NUMTEMPS][2] = {
   {1, 821},
   {54, 252},
   {107, 207},
   {160, 182},
   {213, 165},
   {266, 152},
   {319, 141},
   {372, 131},
   {425, 123},
   {478, 115},
   {531, 107},
   {584, 100},
   {637, 93},
   {690, 86},
   {743, 78},
   {796, 70},
   {849, 60},
   {902, 49},
   {955, 34},
   {1008, 3}
};


EPCOS 100K Thermistor (B57560G104F)

Supplier Part Number
Farnell 3878697
// EPCOS 100K Thermistor #3(B57560G104F)
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4036 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 4036
// max adc: 1023
#define NUMTEMPS 20
// {ADC, temp }, // temp
uint16_t temptable[NUMTEMPS][2] PROGMEM = {
   {1, 864}, // 864.165363324 C
   {54, 258}, // 258.53991594 C
   {107, 211}, // 211.310066205 C
   {160, 185}, // 185.861725716 C
   {213, 168}, // 168.31793816 C
   {266, 154}, // 154.754297589 C
   {319, 143}, // 143.52544406 C
   {372, 133}, // 133.784751118 C
   {425, 125}, // 125.033500921 C
   {478, 116}, // 116.945124847 C
   {531, 109}, // 109.283980973 C
   {584, 101}, // 101.861768746 C
   {637, 94}, // 94.5095302806 C
   {690, 87}, // 87.0542728805 C
   {743, 79}, // 79.2915563492 C
   {796, 70}, // 70.9409729952 C
   {849, 61}, // 61.5523326183 C
   {902, 50}, // 50.25271896 C
   {955, 34}, // 34.7815846664 C
   {1008, 2} // 2.86606331838 C
};


RRRF 100K Thermistor

Supplier Part Number
RS 198-961
  • Rz: 337254
// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts)
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=3960 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 3960
// max adc: 1023
#define NUMTEMPS 20
short temptable[NUMTEMPS][2] = {
   {1, 929},
   {54, 266},
   {107, 217},
   {160, 190},
   {213, 172},
   {266, 158},
   {319, 146},
   {372, 136},
   {425, 127},
   {478, 119},
   {531, 111},
   {584, 103},
   {637, 96},
   {690, 88},
   {743, 80},
   {796, 71},
   {849, 62},
   {902, 50},
   {955, 34},
   {1008, 2}
};


RRRF 10K Thermistor

  • Rz: 29000
// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts)
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=10000 --t0=25 --r1=680 --r2=1600 --beta=3964 --max-adc=305
// r0: 10000
// t0: 25
// r1: 680
// r2: 1600
// beta: 3964
// max adc: 305
#define NUMTEMPS 19
short temptable[NUMTEMPS][2] = {
   {1, 601},
   {17, 260},
   {33, 213},
   {49, 187},
   {65, 170},
   {81, 156},
   {97, 144},
   {113, 134},
   {129, 125},
   {145, 117},
   {161, 109},
   {177, 101},
   {193, 94},
   {209, 86},
   {225, 78},
   {241, 69},
   {257, 59},
   {273, 46},
   {289, 28}
};



RS 10K Thermistor

Cache-R4840127-01.jpg
  • Beta: 3480
  • Rz: 29000
// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts)
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=10000 --t0=25 --r1=680 --r2=1600 --beta=3480 --max-adc=315
// r0: 10000
// t0: 25
// r1: 680
// r2: 1600
// beta: 3480
// max adc: 315
#define NUMTEMPS 20
short temptable[NUMTEMPS][2] = {
   {1, 922},
   {17, 327},
   {33, 260},
   {49, 225},
   {65, 202},
   {81, 184},
   {97, 169},
   {113, 156},
   {129, 145},
   {145, 134},
   {161, 125},
   {177, 115},
   {193, 106},
   {209, 96},
   {225, 87},
   {241, 76},
   {257, 64},
   {273, 50},
   {289, 29},
   {305, -45}
};

Honeywell 100K Thermistor (135-104LAG-J01)

Supplier Part Number
Farnell 1383986
Mouser 785-135-104LAG-J01
RS 2508333162
Digi-Key 480-3135-ND
// Honeywell 100K Thermistor (135-104LAG-J01)
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=3974 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 3974
// max adc: 1023
#define NUMTEMPS 20
short temptable[NUMTEMPS][2] = {
{1, 916},
{54, 265},
{107, 216},
{160, 189},
{213, 171},
{266, 157},
{319, 146},
{372, 136},
{425, 127},
{478, 118},
{531, 110},
{584, 103},
{637, 95},
{690, 88},
{743, 80},
{796, 71},
{849, 62},
{902, 50},
{955, 34},
{1008, 2}
};



// Honeywell 100K Thermistor (135-104LAG-J01)
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=3974 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 3974
// max adc: 1023
#define NUMTEMPS 20
short temptable[NUMTEMPS][2] = {
{1, 916},
{54, 265},
{107, 216},
{160, 189},
{213, 171},
{266, 157},
{319, 146},
{372, 136},
{425, 127},
{478, 118},
{531, 110},
{584, 103},
{637, 95},
{690, 88},
{743, 80},
{796, 71},
{849, 62},
{902, 50},
{955, 34},
{1008, 2}
};

ATC Semitec 104GT-2

Supplier Part Number
Rapid Electronics 61-0452
// /usr/local/bin/createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4267 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 4267
// max adc: 1023
#define NUMTEMPS 20
short temptable[NUMTEMPS][2] = {
   {1, 713},
   {54, 236},
   {107, 195},
   {160, 172},
   {213, 157},
   {266, 144},
   {319, 134},
   {372, 125},
   {425, 117},
   {478, 110},
   {531, 103},
   {584, 96},
   {637, 89},
   {690, 83},
   {743, 75},
   {796, 68},
   {849, 59},
   {902, 48},
   {955, 34},
   {1008, 3}
};

Thermistor Calculations

If you are using a non-standard thermistor or you simply want more information on how they work, check these pages out. Do bear in mind that the PIC will not correctly calculate temperature if the resistance drops below 1K so if yours does, stick a small resistor in series with the thermistor to ensure that the overall resistance remains above 1K.

Thermistor Workings Illustrated

Generation 7 Electronics Research shows how thermistors behave and how the surrounding parts can be calculated.

Calculating Thermistor Beta / Rz Values

This is how you calculate the Beta and Rz values for a thermistor. You will need these if you plan on using a non-standard thermistor. The following page contains a javascript calculator to help make things easy.

Read more here

Calculating PIC Temperatures

The PIC uses a capacitor and charges it through the thermistor. It sends the temperature back to the host as a timer reading. This page describes how it is calculated and how to choose the right capacitor.

Read more here