数据驱动的传感器分类方法基于LM35温度传感器温控系统设计

数据驱动的传感器分类方法基于LM35温度传感器温控系统设计

导语:

该系统体积小、成本低、工作可靠,具有很高工程应用价值。系统稍加改动或扩展,还可以完成温度测量等功能。

摘要:

本文介绍了一种应用LM35温度传感器开发的温控系统,重点阐述了系统结构、工作原理以及采样值量化。同时对LM35传感器特性、系统硬件电路设计、软件设计也作了介绍。该系统体积小、成本低、工作可靠,具有很高工程应用价值。系统稍加改动或扩展,还可以完成温度测量等功能。

关键词:温度传感器 工作原理 硬件设计 软件设计

1.引言

在各类民用控制、工业控制以及航空航天技术方面,温度测量和temperature control得到了广泛使用。在很多工作场合,元器件work temperature指标达不到industrial level or military level要求,可以通过design add heat circuit的办法得以解决。small size, low power consumption, high reliability and low cost的temperature sensor已经越来越受到designer关注。本文介绍了一种基于LM35 temperature sensor development of the heating system hardware circuit design and software design.

2.LM35 Temperature Sensor

LM35 is a linear temperature sensor from National Semiconductor. It has a very high accuracy and wide operating range. The output voltage is directly proportional to the Celsius temperature with an accuracy of ±1/4℃ at room temperature (25℃). The output impedance is 0.1Ω when loaded to 1mA.

3.System Structure & Working Principle

The control circuit consists of sensing circuit, signal conditioning circuit, A/D conversion circuit, microcontroller system, output control circuit and heating circuit. The basic working principle: the sensing signal is converted into a voltage by the sensing amplifier in the sensing stage; then it goes through amplification in the signal conditioning stage; after that it enters into A/D conversion stage where it's converted into digital data; this digital data will be processed by microcontroller system which controls whether or not to turn on/off heating circuits based on given temperatures.

4.Core Hardware Circuit Design & Sampling Value Quantization

The LM35AH was used as core component for its small size and low power consumption. The supply voltage was set as DC15V while work current was set as 120mA during full-range operation with minimal change in current under various temperatures.

5.System Software Design

Software uses PLM/51 language mixed programming with ASM structure mainly consisting of main module, AD sampling module initialization module timer interrupt handling error processing modules etc., modification maintenance are very convenient. AD interface with AT89C55 CPU using interrupt mode when AD completes reading CPU reads numerical value comparing if greater than corresponding numerical value for 0℃ sends low level otherwise high level.

In order to avoid false actions due to interference software redundancy error handling measures were taken In AD sampling data processing adopted software filter method eliminating sharp peaks possible within circuits through continuous five times sampling comparing discarding maximum minimum values taking average three remaining values making valid data for CPU comparison against 04E2H (0℃ corresponding numerical value)

AD_mod:

DO j=0 TO 4;

DO i=0 TO 20;

dtime=dtime+1;

END;

IF NOT(ad_ok)

THEN DO;

adtemp(j).x = port_ad_read;

adtemp(j).y = port_ad_read;

END;

temp(j) = SHR(temp(j),4);

END;

max = temp(0);

mini = temp(0);

DO j=1 TO 4;

IF temp(j)>max THEN max=temp(j);

IF temp(j)<mini THEN mini=temp(j);

END;

6.Conclusion

Based on LM35 developed thermostat systems have been repeatedly tested proven stable reliable possessing characteristics such as small volume sensitivity short response time strong anti-interference ability This system cost-effective components all standard parts has great engineering applications currently applied in some unmanned aerial vehicle flight control systems With slight modifications this system can easily expand become integrated measurement functionality