dazed.dnc Wrote:
-------------------------------------------------------
> jgilmore Wrote:
> --------------------------------------------------
> -----
> > I thought that the "cannonical" way do adjust a
> > temp table for more accuracy in the range
> you're
> > interested in was to generate a table with many
> > more entries than you really need (say, 50) and
> > then delete most of them. You can delete the
> > almost all of the ones that are low (say,
> <150C)
> Makes sense. Instead of using a linear change in
> adc values, I guess it should fit some sort of
> curve. However, is the best "curve" for this going
> to depend on some property of the thermistor or
> should it be relatively universal?
They way I was doing it depends on if your printing with ABS or PLA

What matters is the range of temperatures you're interested in. Having said that, towards the higher end the response curve does look less like a straight line and more like a curve. Which means that if you want to average out your inaccuracy over the whole range of temperatures, you should have your table values closer together on the higher end.
> > I recently adjusted the original
> > createThermistorTable.py program to generate
> > entries in in 1/4 degree increments (i.e.
> > tempuratures are listed as temp*4, rounded to
> > nearest integer) for the 5DoA firmware, which
> uses
> > 14.2 fixed point notation (same thing as above)
> > for temps. Python is a pleasure to work with.
> I'm not trying to be rude or anything, but I don't
> understand what you are getting at here. Are you
> saying this was the table you chopped values out
> of or did you use the whole table? I thought using
> huge tables would cause excessive memory
> consumption and/or processing delays. Besides
> that, I noticed while using 200 entries that a
> significant range of adc values actually
> correlated to the same temperature once it was
> rounded to the nearest whole number in order to
> fit within an array of type "short" - at least,
> this was my understanding of why it had to use
> whole numbers only.
The table still has only twenty values in it, but the values look like "{21, 1329}, // 332.48 C" instead of "{21,332}". I.E. there aren't more numbers, but the numbers that are there are more accurate. It's storing 332.5 instead of 332. Doesn't make much difference (1/4°? who cares?) the point is that the table is now storing the values in the same format that the firmware is using them, a great improvement for the 5DoA firmware.
The reason it has to use whole numbers only (for the ADC side) is that the ADC unit in the chip measures voltage and converts it to a number between 0 (0V) and 1023(5V). The point of the thermistor table is to take this number and convert it to a temperature via the relatively simple linear interpolation, rather than trying to make the poor overloaded 8-bit processor try to calculate logarithmic functions.
For the temp side of the table, it's because the standard firmware uses an integer to hold the value anyway. Given that, there's no point in a more accurate number b/c it would just be truncated anyway.
I mention in mainly
because I have a swollen ego to say that I've struggled with it recently. Staring at the stupid thing and trying to figure out why it's not working gives plenty of time for thinking about irrelevant aspects of it as well. That's really the only reason that I regenerated my table with the actual resistance reading. i.e. it will improve accuracy right? It won't compensate for the calculations being off by 200°, but since I don't yet know why that's happening, I'll do what I can while I think about it.
> > I don't know how much difference it makes (too
> > lazy to actually work through the math) but the
> R1
> > resistor that's part of the voltage divider
> (the
> > other part is the thermistor) is only rated to
> 5%
> > accuracy. I redid my table with the measure
> > resistance instead of using the 4.7KΩ. It's an
> > easy thing to do, presuming that you have a
> > ohm-meter and a way of regenerating the
> thermistor
> > table.
> I measured my resistors to be 4460 and 4440 ohm
> (extruder and thermistor respectively). I plugged
> these into my spreadsheet and it only noticeably
> affects the higher end temperatures. At around the
> 313C mark, using the actual values added another
> 5C. Unless I have done something wrong, It makes
> just over 0.1% difference. If you are talking
> about comparing one machine to another, the 5C
> temperature difference might account for how
> settings that work well on one machine would not
> work as well on another. Otherwise, I don't think
> that really matters since people just
> guess-and-check until they find a working
> temperature regardless of of whether or not it is
> actually the true temperature.
I think you slipped a digit there, 5.0/313.0=0.015, or 1.5% difference. Which is still rather small. It does mean that in our systems the accuracy depends on the resistor (±5%) rather than the thermistor (±1%) at high temperatures, but that the inaccuracy of the resistor doesn't make any difference at lower temperatures. Presumably that's because at low temps, the relatively higher resistance of the thermistor drowns out the inaccuracy in the resistor. Good to know, thanks.
You're correct that it would only matter when moving settings between different machines. Even a different batch of plastic would probably make enough difference to swallow 5C.
--
I'm building it with
Baling Wire