Hello.
I'm building a project on a hot air gun station. Now the basic premise is that the hot air gun's internal temperature sensor will constantly show a reading on a 7 segment display.
two buttons are used to increase or decrease the set temperature. If the set temperature is more than the heater's temperature sensor reading it turns on the heater until it reaches the same temp.
I have averaged the temperature sensor reading (for smoothness) and mapped it like so:
for(int i = 0; i < TempSamples; i++)
{
TempIndexreadtotal += analogRead(TempSensorPin);
}
TempAverage = TempIndexreadtotal / TempSamples;
TempIndexreadtotal = 0;
delay(1); // delay in between reads for stability
// int TempmappedValue = map(TempAverage, MinSetHeaterTemp, MaxSetHeaterTemp, TempRangeMin, TempRangeMax);
int TempmappedValue = map(TempAverage, 202, 434, 200, 400);
Now the mapping is done like this because I want the minimum temp to be 200 and maximum temp to be 400.
Upon calibration with an RTD and Max31865, I have managed to map the bottom end accurately (i.e. from 200 - 300 degrees the values are matching the one shown my max31865). But whenever I read closer to the top end (350+) the deviation just keeps increasing (i.e. at 400 degrees it shows 450 and keeps increasing). If i lower the top end value of the temperature range it then messes with my bottom end calibration (i.e. what was earlier showing 205 at 200 degrees now shows 180).
I am just not able to calibrate it successfully. Any advice and suggestions would be useful.