yes, that I know, but I cant get any values (I think it is because my thermistor is PTC)
when I use for example
this python script and setup values are
rp = 4700;
t1 = 25;
r1 = 603;
t2 = 150;
r2 = 1641.9;
t3 = 250;
r3 = 2166;
I have output:
C:\Users\Ivet>python C:\Python27\test.py
-10
// Thermistor lookup table for Marlin
// ./createTemperatureLookup.py --rp=4700 --t1=25:603 --t2=150:1334 --t3=250:2166 --num-temps=36
#define NUMTEMPS 36
short temptable[NUMTEMPS][2] = {
Traceback (most recent call last):
File "C:\Python27\test.py", line 139, in
main(sys.argv[1:])
File "C:\Python27\test.py", line 132, in main
print " {%s, %s}," % (int(t.adc(temp)), temp)
File "C:\Python27\test.py", line 68, in adc
x = sqrt(pow(self.c2 / (3*self.c3),3) + pow(y,2))
ValueError: math domain error
There is some problem I think in some negative number or something like it.
I dont know python, if somebody have it in C, C++, PASCAL, PHP, PLSQL or excel I can look on it.
Or if somebody know how, can you pls generate table for me? thanks you very much.
When I try calculate it with formula I somewhere find for calculate ADC)
U*R/(R+4700) where U=5 I get this strange table:
t r adc
0 498 0,479030396306272
10 538 0,513554791905307
20 581 0,550085211134255
30 626 0,587683064213293
40 672 0,625465376023827
50 722 0,66580597565474
60 773 0,706194043486205
70 826 0,74737604053565
80 882 0,79003941239699
90 940 0,833333333333333
100 1000 0,87719298245614
110 1062 0,921555015619576
120 1127 0,967049939934786
130 1194 1,01289446895148
140 1262 1,05836967460584
150 1334 1,10540271793172
160 1407 1,15195677091862
170 1482 1,19864121643481
180 1560 1,24600638977636
190 1640 1,29337539432177
200 1722 1,34070383058237
210 1807 1,38850468725987
220 1893 1,43561352950099
230 1982 1,48308889554026
240 2073 1,53034106009154
250 2166 1,57733760559278
260 2261 1,62404826892688
270 2357 1,66997307637806
280 2452 1,71420581655481
290 2542 1,75504004418669
300 2624 1,79137083560896
Edited 2 time(s). Last edit at 06/27/2013 03:08AM by Bajn.