• I see you are using the Steinhart-Hart equation, very nice!
    I follow what your code does except could you explain this equation please?

    var ohms=10000*val/(1-val);
    

    It seems like there should be a factor of 1023 in there somewhere (see here) and maybe something for the voltage too (see here), but perhaps I just don't understand it all (haven't actually tried it myself yet).

    Currently, val is some number between 0 and 1023. Lets see what happens to val/(1-val) for some example values:

    val  :: val/(1-val)
    5    :: 5/(-4)      == -1.25
    100  :: 100/(-99)   == -1.01
    300  :: 300/(-299)  =~ -1
    500  :: 500/(-499)  =~ -1
    1000 :: 1000/(-999) =~ -1
    

    I think you see that something must be wrong here. I am thinking val needs to be normalized to a fraction of 1, ie, something like val/1023.

    Also, I am curious how you went about calculating A, B, and C, ie, how did you stabilize and accurately measure the 3 temperature points as well as the 3 resistance values at those temperatures?

    Thanks!

About

Avatar for Manxome @Manxome started