Welcome! Log In Create A New Profile

Advanced

thermistor settings

Posted by mccoyn 
thermistor settings
February 09, 2009 09:04PM
I have a 100K thermistor from RRRF. When I started testing my extruder the temperature reported about 90 at room temperature. When I started heating it got to 170 in about 30 seconds. I suspect I have something setup wrong.

The reading rises when the heater is on and falls when it is off so I believe I have everything wired correctly.

Here are the settings I used:
Extruder0_Beta(K) 550.0
Extruder0_Capacitor(F) 0.000003
Extruder0_Rz(ohms) 4837

Any idea why I'm getting these odd readings?

I tested the wire connected to the arduino and it is a little above 2.5 V at room temperature and about 1.9 V when it is reading 170.
Re: thermistor settings
February 10, 2009 04:36AM
The host preferences are not what you change when using the Arduino. You have to change a table in the firmware and recompile IIRC.

The Arduino uses an ADC to measure temperature, not a capacitor.


[www.hydraraptor.blogspot.com]
Re: thermistor settings
February 10, 2009 07:26PM
Ok, I was definitely doing that wrong. I updated the firmware and changed all the values to the correct values. Now, I've updated the firmware and I get the same results.

On my temperature sensor PCB I have a 4.7 kOhm resistor and a 10 uF capacitor. Do I need to remove the capacitor?
Re: thermistor settings
February 11, 2009 04:01AM
No that capacitor is for filtering, it doesn't alter the reading.

4K7 should be right for a 100K thermistor.

You must have some setting wrong, either at the host end, or at the Ardunio. The host setting have no relationship to real values but they do need to be set to some magic values to make it work I believe.


[www.hydraraptor.blogspot.com]
emt
Re: thermistor settings
February 11, 2009 04:29AM
Did you delete the Arduino object files before you recompiled? If not the changed file is not compiled.


Regards

Ian
Re: thermistor settings
February 11, 2009 11:20AM
Yes I did delete the object files. I checked this morning and I was modifying the header file in the wrong directory. This is probably a good reason to not keep multiple copies of something lying around.

I'll try again tonight and see if I can get it working right.

I'm not entirely sure if I have a 10K or 100K thermistor. Does anyone know approximately what resistance each has at room temperature so I can check?
Re: thermistor settings
February 11, 2009 11:38AM
The meaning of a 10K or 100K thermistor is the value at 25C, so depending on how hot your room is, probably slightly more or less than that.

E.g. my 10K thermistor is about 11.5K at my room temperature, which is about 20C in the winter.


[www.hydraraptor.blogspot.com]
Re: thermistor settings
February 11, 2009 02:55PM
I tested it. It was about 11K, so I take it that is a 10K thermistor. I suppose that means the 4.7K resister has to be replaced by a 1.6K one.

I think I've got this problem well surrounded now.
Re: thermistor settings
February 11, 2009 06:30PM
How do you arrive at 1.6K?

If you replace the 100K thermistor with 10K then the series resistor should go from 4K7 to 470R. That will give the same voltage for the same temperature so nothing else needs to change. The value 470 is chosen to give the most linear response over the range we are interested in.

There is some disadvantage to using the 10K thermistor with a 5V supply: the self heating effect will add a few degrees to the mid range values but absolute accuracy is not essential as long as it is repeatable. The only benefit of absolute accuracy is being able to swap settings with other people, but unless you are using exactly the same extruder with exactly the same plastic and exactly the same bed material you are going to have to tweak the temperatures anyway.

More details here: [hydraraptor.blogspot.com]


[www.hydraraptor.blogspot.com]
Re: thermistor settings
February 11, 2009 07:44PM
That was printed on the board, so I assumed it was the value for 10K. Your note about using 470 makes sense. I was trying to get the exact setup to match one of the examples listed at [reprap.org] so that I could copy the table. Is it easier to measure the characteristics of the thermistor and then generate the values?

I've got to pick up a thermometer. I've got a digital one but it updates very slow and I don't trust it much.
Re: thermistor settings
February 12, 2009 04:31AM
I always calibrate my thermistor by putting a thermocouple inside the extruder, where the filament goes, but that is mainly because I want to blog acuurate results. I am sure you could be a machine working just by using one of Zach's tables and tweeking the target temperature settings.

The two temperatures that I find critical are the first layer of the raft and the first layer of the object, but I find those by trial and error each time I change the base material, the filament colour or the extruder.


[www.hydraraptor.blogspot.com]
Re: thermistor settings
February 12, 2009 08:00PM
I've measured my thermistor near my expected working temperature (190 for ABS) and at room temperature with these results:

185 C: 103.5 Ω
18 C: 12.12 KΩ

I calculated beta as 3796.

I'm still not sure how to pick the resisters but it looks like I need values close to the thermistor's value at the working temperature. I also see that the ratio between the two resisters is usually about 2:1. Since I have a 10K thermistor, I'll use the second resister. Checking the resisters I have available I decided on the following:

r1: 150 Ω
r2: 320 Ω

The script gives me the following table:
// 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=12120 --t0=17.8 --r1=150 --r2=322 --beta=3796.577472 --max-adc=322
// r0: 12120
// t0: 17.8
// r1: 150
// r2: 322
// beta: 3796.577472
// max adc: 322
#define NUMTEMPS 21
short temptable[NUMTEMPS][2] = {
   {1, 1252},
   {17, 433},
   {33, 350},
   {49, 307},
   {65, 278},
   {81, 256},
   {97, 238},
   {113, 223},
   {129, 210},
   {145, 198},
   {161, 187},
   {177, 176},
   {193, 165},
   {209, 155},
   {225, 145},
   {241, 134},
   {257, 122},
   {273, 109},
   {289, 93},
   {305, 72},
   {321, 29}
};


I've already got the 10K thermistor embedded in my heater barrel so I'm going to go ahead and try to use it rather than replace it with a 100 K thermistor.
Re: thermistor settings
February 13, 2009 04:16AM
Those values are too low, you will get poor resolution, linearity and excessive self heating.

The ideal value for a 10K thermistor would be a single 470R resistor as far as linearity and rosultion is concerned, but the self heating is excessive on a 5V supply. Using a single 1.6K resistor for R2, as suggested on the thermistor page is a good compromise value in this case. Set R1 to 0 when using the script.


[www.hydraraptor.blogspot.com]
Re: thermistor settings
February 14, 2009 03:52PM
I didn't have a 1.6K resistor so I used a 1.4K one. When I set it up, it read 28 C, which sounds good. I let it heat up and it stopped at 110 C because I haven't put any insulation on the heater yet.

I modified the script to show voltage, self-heating, sensitivity and linearity. The last two numbers are the first and second derivatives. You can see that at [codepad.org]

Here is my table
// r0: 12120
// t0: 17.8
// r1: 0
// r2: 1465
// beta: 3796.577472
// max adc: 1022
#define NUMTEMPS 20
short temptable[NUMTEMPS][2] = {
   {   2,  534}, // 0.01 V    0.03 mW    102.154 C/step    75.69317 C/(step^2)
   {  55,  197}, // 0.27 V    0.87 mW    1.121 C/step    0.02457 C/(step^2)
   { 109,  157}, // 0.53 V    1.62 mW    0.502 C/step    0.00523 C/(step^2)
   { 163,  136}, // 0.80 V    2.28 mW    0.322 C/step    0.00211 C/(step^2)
   { 216,  121}, // 1.05 V    2.84 mW    0.241 C/step    0.00111 C/(step^2)
   { 270,  109}, // 1.32 V    3.31 mW    0.194 C/step    0.00066 C/(step^2)
   { 324,  100}, // 1.58 V    3.69 mW    0.166 C/step    0.00042 C/(step^2)
   { 377,   92}, // 1.84 V    3.97 mW    0.147 C/step    0.00028 C/(step^2)
   { 431,   84}, // 2.10 V    4.16 mW    0.135 C/step    0.00019 C/(step^2)
   { 485,   77}, // 2.37 V    4.25 mW    0.127 C/step    0.00012 C/(step^2)
   { 538,   70}, // 2.63 V    4.26 mW    0.122 C/step    0.00006 C/(step^2)
   { 592,   64}, // 2.89 V    4.16 mW    0.120 C/step    0.00001 C/(step^2)
   { 646,   57}, // 3.15 V    3.97 mW    0.121 C/step    -0.00004 C/(step^2)
   { 699,   51}, // 3.41 V    3.70 mW    0.125 C/step    -0.00011 C/(step^2)
   { 753,   44}, // 3.68 V    3.32 mW    0.133 C/step    -0.00020 C/(step^2)
   { 807,   36}, // 3.94 V    2.85 mW    0.148 C/step    -0.00036 C/(step^2)
   { 860,   28}, // 4.20 V    2.30 mW    0.174 C/step    -0.00066 C/(step^2)
   { 914,   17}, // 4.46 V    1.64 mW    0.227 C/step    -0.00146 C/(step^2)
   { 968,    2}, // 4.73 V    0.88 mW    0.377 C/step    -0.00532 C/(step^2)
   {1022,  -52}  // 4.99 V    0.03 mW    6.975 C/step    -3.22975 C/(step^2)
};

Edited 1 time(s). Last edit at 02/14/2009 03:53PM by mccoyn.
Re: thermistor settings
February 14, 2009 04:26PM
I have never really looked at the tables before because I don't use them. All the calculation is done on the host in my system. In fact the Python class at the top is the host code that does it.

The table solution is doesn't look good because most of the table concerns temperatures below the melting point of the plastic. Nearly all my extrusion would be above 200C so it would all be done by linear interpolation using the first two entries.

Using far less code I have a system that is far more accurate. This craziness is exactly the reason I have nothing to do with the official implementation of the hardware and software.


[www.hydraraptor.blogspot.com]
Re: thermistor settings
February 14, 2009 04:58PM
Yeah, I thought it was odd that we are simulating the PIC method and then using these tables instead of just putting the code on the chip.

I did notice the nasty big jump near 200 C. I generated a larger table and deleted 2 out of every 3 entries for the lower temperatures. Hopefully this will work better.

About the 110 C limit. It turns out I hadn't changed the target temperature so it stopped heating when it reached the default. I noticed after I put the insulation on. I've set it to 190 and it got to it just fine. I'm going to try extruding now.

   {   2,  534}, // 0.01 V    0.03 mW    102.154 C/step    75.69317 C/(step^2)
   {  12,  310}, // 0.06 V    0.20 mW    7.601 C/step    0.82398 C/(step^2)
   {  22,  260}, // 0.11 V    0.36 mW    3.485 C/step    0.20050 C/(step^2)
   {  33,  230}, // 0.16 V    0.53 mW    2.095 C/step    0.07881 C/(step^2)
   {  43,  213}, // 0.21 V    0.69 mW    1.512 C/step    0.04302 C/(step^2)
   {  64,  188}, // 0.31 V    1.00 mW    0.935 C/step    0.01742 C/(step^2)
   {  85,  171}, // 0.42 V    1.30 mW    0.669 C/step    0.00917 C/(step^2)
   { 106,  159}, // 0.52 V    1.58 mW    0.519 C/step    0.00557 C/(step^2)
   { 127,  149}, // 0.62 V    1.85 mW    0.423 C/step    0.00371 C/(step^2)
   { 147,  141}, // 0.72 V    2.10 mW    0.360 C/step    0.00267 C/(step^2)
   { 168,  134}, // 0.82 V    2.34 mW    0.312 C/step    0.00197 C/(step^2)
   { 189,  128}, // 0.92 V    2.57 mW    0.276 C/step    0.00151 C/(step^2)
   { 216,  121}, // 1.05 V    2.84 mW    0.241 C/step    0.00111 C/(step^2)
   { 324,  100}, // 1.58 V    3.69 mW    0.166 C/step    0.00042 C/(step^2)
   { 431,   84}, // 2.10 V    4.16 mW    0.135 C/step    0.00019 C/(step^2)
   { 538,   70}, // 2.63 V    4.26 mW    0.122 C/step    0.00006 C/(step^2)
   { 646,   57}, // 3.15 V    3.97 mW    0.121 C/step    -0.00004 C/(step^2)
   { 753,   44}, // 3.68 V    3.32 mW    0.133 C/step    -0.00020 C/(step^2)
   { 860,   28}, // 4.20 V    2.30 mW    0.174 C/step    -0.00066 C/(step^2)
   { 968,    2}, // 4.73 V    0.88 mW    0.377 C/step    -0.00532 C/(step^2)

Edited 1 time(s). Last edit at 02/14/2009 06:07PM by mccoyn.
Sorry, only registered users may post in this forum.

Click here to login