文献[1]中给出一种DS18S20数字式温度传感器测温修正算法,但这种算法还不能充分利用DS18S20寄存器所给出的数据,最大限度地反映温度传感器的测量数值。其次是没有考虑算法给出的温度的校准问题,这里提出一种精确的测温算法,可以无误差地表示传感器给出的温度值,同时还研究了传感器输出值的校准问题,给出了基于最小二乘法的校准公式。在仿真过程中,以高精度的测温仪器为标准,给出了算法的校正公式,结果表明校正公式的误差优于0.01℃。
An algorithm on temperature measurement calibration for the digital temperature sensor DS18S20 is proposed in Reference [1],but it can′t make full use of the data given by DS18S20 registers to represent the temperature value from the sensor exactly. In addition,the algorithm does not pay attention to the calibration of temperature measurement. A accurate algorithm for temperature measurement is presented in this paper,which can derive the temperature values from the DS18S20 sensor. The calibration of temperature output value of DS18S20 is investigated in this paper. The calibration expression based on the least square method is offered. By dint of the measuring instrument with high precision,the calibration expression was developed. The simuliation results indicate that the calibration expression can greatly improve the measurement precision,and its measurement error is less than 0.01℃.