-1

I am reading NTC thermistor values via ADC with 12bit resolution. 10 samples are read within span of 100 m/s at ambient (no heating or cooling) looks like this

ADC(PA0)= 1 -> 3919
ADC(PA0)= 2 -> 3934
ADC(PA0)= 3 -> 3932
ADC(PA0)= 4 -> 3922
ADC(PA0)= 5 -> 3907
ADC(PA0)= 6 -> 3925
ADC(PA0)= 7 -> 3930
ADC(PA0)= 8 -> 3919
ADC(PA0)= 9 -> 3915
ADC(PA0)= 10 -> 3928
ADC(PA0)= 11 -> 3915
ADC(PA0)= 12 -> 3922
ADC(PA0)= 13 -> 3918
ADC(PA0)= 14 -> 3918

What would be the appropriate statistical function(mode,average,mean etc.) to extract most relevant value out of this set. In hindsight, also consider the values could be read during when the Heater element turned on and also during the cooling (Fan turned on).

TonyP
  • 5,655
  • 13
  • 60
  • 94
  • What does NTC mean? What does ADC mean? What does "m/s" mean? What is the definition of "most relevant value" to you? – Xukrao Apr 03 '19 at 17:41
  • NTC= Negative Temperature Coefficient. ADC=Analog to Digital Conversion., m/s=milli second – TonyP Apr 03 '19 at 20:19
  • I don't think you are interested in a "statistical function". You are interested in what is the best way to regulate the temperature using your setup. Right? There is no "most relevant value" from this set, these are just measurements, all are relevant. I don't understand your question. – KamilCuk Apr 04 '19 at 09:58

1 Answers1

1

You values look like the "normal" deviation of an ADC converter. Depending on you temperature regulation element (TEC, PT, Fan, ... ) and you load I would suggest to run the PID algorithm every 100m (as a first try). If you system is really slow, you could use a event longer Kt.

Since temperatures (or temperature changes) are mostly linear you could use a moving average to eliminate some noise from your input.

In a good designed hardware a heater or fan should not have any influence on your measurement. On a bad design the averaging will eliminate most of the noise from your signal (if it is not to big)

theSealion
  • 1,082
  • 7
  • 13