Teacup Firmware: Thermistor not reading? Maybe pin definition? <solved> February 10, 2011 05:15PM |
Registered: 16 years ago Posts: 438 |
Re: 5DoA: Thermistor not reading? Maybe pin definition? February 10, 2011 08:04PM |
Registered: 13 years ago Posts: 155 |
Re: 5DoA: Thermistor not reading? Maybe pin definition? February 10, 2011 08:10PM |
Registered: 16 years ago Posts: 1,094 |
Re: 5DoA: Thermistor not reading? Maybe pin definition? February 10, 2011 08:44PM |
Registered: 16 years ago Posts: 438 |
Re: 5DoA: Thermistor not reading? Maybe pin definition? <solved> February 10, 2011 09:51PM |
Registered: 16 years ago Posts: 1,094 |
Re: 5DoA: Thermistor not reading? Maybe pin definition? <solved> February 10, 2011 11:25PM |
Registered: 16 years ago Posts: 438 |
pin:2 Raw ADC:994 table entry: 19 temp:526.25 Sensor:0 pin:1 Raw ADC:995 table entry: 19 temp:523.0 Sensor:1
{881, 221}, // 55.490742511 C {981, 96}, // 24.0432854283 C {1010, 3} // 0.975765549111 C };
// Linear interpolating temperature value // y = ((x - x₀)y₁ + (x₁-x)y₀ ) / (x₁ - x₀) // y = temp // x = ADC reading =995 // x₀= temptable[j-1][0]=981 // x₁= temptable[j][0] =1010 // y₀= temptable[j-1][1]=96 // y₁= temptable[j][1] =3In python, that yeilds 51, but when the firmware does it, it comes up with 554.25 (2217) No idea why. And ((x - x₀)y₁ + (x₁-x)y₀ ) = 1482, no sub-expression is negative. That should all fit in a 16-bit unsigned number, right? But something is off somewhere.
Re: 5DoA: Thermistor not reading? Maybe pin definition? <solved> February 11, 2011 11:13PM |
Registered: 14 years ago Posts: 71 |
Re: 5DoA: Thermistor not reading? Maybe pin definition? <solved> February 12, 2011 12:13AM |
Registered: 16 years ago Posts: 438 |
Re: 5DoA: Thermistor not reading? Maybe pin definition? <solved> February 13, 2011 03:12PM |
Registered: 14 years ago Posts: 71 |
Re: 5DoA: Thermistor not reading? Maybe pin definition? <solved> February 14, 2011 07:47PM |
Registered: 13 years ago Posts: 155 |
Re: 5DoA: Thermistor not reading? Maybe pin definition? <solved> February 14, 2011 07:52PM |
Registered: 16 years ago Posts: 1,094 |
Re: 5DoA: Thermistor not reading? Maybe pin definition? <solved> February 14, 2011 08:24PM |
Registered: 16 years ago Posts: 438 |