单片机的多路温度巡回检测系统
日 期: 目录
摘 要 I
Abstract II
一、 概述 1
(一)课题的提出 1
(二)温度检测的现状 1
二、系统设计方案的研究 1
(一)系统的性能要求 1
(二)传感器选择分析 2
(三)多机通信部分 2
(四)系统方案的设计 2
三、系统硬件设计 4
(一)主控芯片 4
(二)Pt100传感器电路 4
1.Pt100恒流源驱动电路 4
2.仪用放大电路 4
3.铂电阻传感器接口 5
4. 电路的计算与分析 5
(三)多路开关的选择 6
(四)A/D转换单元 6
1.电路设计 6
2.所用器件 7
(五)通信电路模块 7
1. RS-485硬件电路 8
2.RS-485通信协议 8
(六)电源模块 9
四、系统的软件设计 9
(一)主程序部分 9
(二)温度的计算模块 10
(三)RS-485通信模块 12
五、设计总结 14
参考文献 16
致谢 17
附录 18
Abstract
Temperature measurement is of great significance in the industrial production and our daily life.In industrial production ,mastering *好棒文|www.hbsrm.com +Q: 3_5_1_9_1_6_0_7_2
the temperature of the environment has a significant meaning in energy-saving.The parameter of the temperature is also related to the comfort of living environment.This thesis investigates a temperature measurement system.
The temperature measurement system use a designed 8-channel detection unit turn collect data.Pt100 is selected to be the sensor with a wide range and high precision.At the same time in order to realize high precision measurement,the Pt100 sensor uses four line access circuit of constant current source and signal amplifier of voltage.The amplified voltage signal access to the multi-way switch CD4051.By using a switch for gating,implements the detection of 8 channels.The microcontroller controls the multiplexer gating and A/D conversion to get a digital voltage signal.Then the microcontroller get the measurement results calculated and sorted and sent to the PC,which receives the data and get further processing.The host machine communicates the detection unit via RS-485 and the use of the microcontrollers serial connection port.Thus the host computer can be centralized to control he detection unit.the host computer control each detection unit through a control command.System can detect the temperature range 0 ° C~ 400 ° C.It use RS-485 bus for transmission,the MAX485 driver chip to convert level transmission.The communication distance is more than 1200m and it has a strong anti-interference ability.A designed DC power which transfer from single-phase 220V AC power supply the entire systems energy.
Key words:Pt100; microcomupter8952; RS-485; A/D converter一、 概述
(一)课题的提出
在工厂生产过程和人们日常生活中,对温度这个变量的测量一直是一个重点。比如供暖、空调、制冷等效果检验;建筑节能的研究等都需要对温度参数进行测量。
对温度的测量有一下几个特点:(1)运行半径大,测点不集中。当对一个覆盖面广,系统大的系统进行温度测量时,测点不集中的情况十分突出。(2)在测点不集中的同时又要对系统的运行进行分析和研究,因此在系统运转期间,需要按顺序检测和记录运行数据。
因为温度的测量存在上述问题,所以需要一种能够进行实时检测和数据的记录,不用手动操作也可以长期运行的测量仪表。本课题的目的就是设计一个这样的测量系统。
(二)温度检测的现状
随着科技的发展,拥有技术成熟、结构简单、使用方便等特点的传统热电偶、热电阻温度测量方法,目前分为一下几类,见表1.1测量方法分类。
表1.1 测量方法分类
类别 特点
新型温度传感器 薄膜温度传感器 体积小、热扰动小、热动态响应快、灵敏度高、方便集成与安装
热电偶材料性能提高 N型热电偶 高温稳定性高、使用寿命更长
钨铼热电偶抗氧化技术 大大延长工作时间
(一)系统的性能要求
设计一个多路温度巡回检测系统,要求:测量温度范围为0℃--400℃;基于温度传感器的数据采集系统;基于单片机的多路温度巡回检测系统电路;通信系统基于RS-485。
(二)传感器选择分析
如果每秒输出一个温度值(1Hz),为了将测量分辨率增加到16位,按以下公式计算采样频率: 。要想对采样频率为fs=256Hz的温度信号进行采样,需要在规定的采样周期内采集到足够的样本,于是16位的输出数据即为这些样本的均值。因此将256个连续样本相加除以16,得到16位的有效数据,增加了4位有效数据。所以最小的AD分辨率为0.635mv。最小的温度变化为0.0061℃。为将工频信号滤除,在40ms时间内采样,然后再取平均值[8]。
摘 要 I
Abstract II
一、 概述 1
(一)课题的提出 1
(二)温度检测的现状 1
二、系统设计方案的研究 1
(一)系统的性能要求 1
(二)传感器选择分析 2
(三)多机通信部分 2
(四)系统方案的设计 2
三、系统硬件设计 4
(一)主控芯片 4
(二)Pt100传感器电路 4
1.Pt100恒流源驱动电路 4
2.仪用放大电路 4
3.铂电阻传感器接口 5
4. 电路的计算与分析 5
(三)多路开关的选择 6
(四)A/D转换单元 6
1.电路设计 6
2.所用器件 7
(五)通信电路模块 7
1. RS-485硬件电路 8
2.RS-485通信协议 8
(六)电源模块 9
四、系统的软件设计 9
(一)主程序部分 9
(二)温度的计算模块 10
(三)RS-485通信模块 12
五、设计总结 14
参考文献 16
致谢 17
附录 18
Abstract
Temperature measurement is of great significance in the industrial production and our daily life.In industrial production ,mastering *好棒文|www.hbsrm.com +Q: 3_5_1_9_1_6_0_7_2
the temperature of the environment has a significant meaning in energy-saving.The parameter of the temperature is also related to the comfort of living environment.This thesis investigates a temperature measurement system.
The temperature measurement system use a designed 8-channel detection unit turn collect data.Pt100 is selected to be the sensor with a wide range and high precision.At the same time in order to realize high precision measurement,the Pt100 sensor uses four line access circuit of constant current source and signal amplifier of voltage.The amplified voltage signal access to the multi-way switch CD4051.By using a switch for gating,implements the detection of 8 channels.The microcontroller controls the multiplexer gating and A/D conversion to get a digital voltage signal.Then the microcontroller get the measurement results calculated and sorted and sent to the PC,which receives the data and get further processing.The host machine communicates the detection unit via RS-485 and the use of the microcontrollers serial connection port.Thus the host computer can be centralized to control he detection unit.the host computer control each detection unit through a control command.System can detect the temperature range 0 ° C~ 400 ° C.It use RS-485 bus for transmission,the MAX485 driver chip to convert level transmission.The communication distance is more than 1200m and it has a strong anti-interference ability.A designed DC power which transfer from single-phase 220V AC power supply the entire systems energy.
Key words:Pt100; microcomupter8952; RS-485; A/D converter一、 概述
(一)课题的提出
在工厂生产过程和人们日常生活中,对温度这个变量的测量一直是一个重点。比如供暖、空调、制冷等效果检验;建筑节能的研究等都需要对温度参数进行测量。
对温度的测量有一下几个特点:(1)运行半径大,测点不集中。当对一个覆盖面广,系统大的系统进行温度测量时,测点不集中的情况十分突出。(2)在测点不集中的同时又要对系统的运行进行分析和研究,因此在系统运转期间,需要按顺序检测和记录运行数据。
因为温度的测量存在上述问题,所以需要一种能够进行实时检测和数据的记录,不用手动操作也可以长期运行的测量仪表。本课题的目的就是设计一个这样的测量系统。
(二)温度检测的现状
随着科技的发展,拥有技术成熟、结构简单、使用方便等特点的传统热电偶、热电阻温度测量方法,目前分为一下几类,见表1.1测量方法分类。
表1.1 测量方法分类
类别 特点
新型温度传感器 薄膜温度传感器 体积小、热扰动小、热动态响应快、灵敏度高、方便集成与安装
热电偶材料性能提高 N型热电偶 高温稳定性高、使用寿命更长
钨铼热电偶抗氧化技术 大大延长工作时间
(一)系统的性能要求
设计一个多路温度巡回检测系统,要求:测量温度范围为0℃--400℃;基于温度传感器的数据采集系统;基于单片机的多路温度巡回检测系统电路;通信系统基于RS-485。
(二)传感器选择分析
如果每秒输出一个温度值(1Hz),为了将测量分辨率增加到16位,按以下公式计算采样频率: 。要想对采样频率为fs=256Hz的温度信号进行采样,需要在规定的采样周期内采集到足够的样本,于是16位的输出数据即为这些样本的均值。因此将256个连续样本相加除以16,得到16位的有效数据,增加了4位有效数据。所以最小的AD分辨率为0.635mv。最小的温度变化为0.0061℃。为将工频信号滤除,在40ms时间内采样,然后再取平均值[8]。
版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/dzxx/dzkxyjs/2187.html