For mine, there is no response. LM35 are priced at quite a premium on TI's web, certainly not those aliexpress prices.
Either way, don't get LM35, the lesson learnt is RF interference can cross 10s of millivolts, huge !
And the wires to the probe becomes an RF antenna and if that temperature sensor is a diode after all, it becomes an AM radio (stm32 ADC can easily sample the whole AM frequencies, the unintended SDR) !
Get those LMT86 instead
https://www.ti.com/product/LMT86
LMT86 are 'NTC' ones, the voltage reduce kind of 'linearly' (not really) from 2.2v. There is an equation provided by TI in the specs sheet.
I actually used that equation, and since I'm using a stm32f401 which has an FPU, i did floating point math to translate from voltages to temperatures based on TI's formula for LMT86. Works well, saves coding a big table to look up and interpolate values.
Much neater codes, here is the implementation in my sketch TI's formula:
Code: Select all
// param: mv - millivolts from sensor
// returns: temperature deg C
float lmt86(float mv) {
float t = 0.0F;
float v = 1777.3F - mv;
//t = 10.888 - sqrt((-10.888)*(-10.888) + 4.0 * 0.00347 * v);
//t = t / ( 2.0 * -0.00347) + 30.0;
t = 10.888F - sqrt(118.548544F + 0.01388F * v);
t = 30.0F - t / 0.00694F ;
return t;
}
Either way, my use of semiconductor sensors is mainly as a temperature reference, say to calibrate thermistors.
But that things like LMT86 may be useful for cold junction compensation for thermocouples, as well as measuring temperatures up to boiling point of water 100 deg C.