基于MC51单片机温度测量系统的设计

 2021-12-21 09:12

论文总字数:24058字

摘 要

温度使我们生活中一个重要的环境参数。它可以直接影响我们的日常生活和工作。由于在工业生产过程中有种类繁多的控制对象并且对温度有不同的要求,所以温度控制在工业生产当中就具有很高的重要性和作用。随着科技的发展和技术的进步,在生产中需要控制的对象越来越复杂,要求也越来越高,温度测量方面存在着非常多的难题。我们不仅在工业生产过程中需要温度测量和控制,在农业生产中更是需要对温度进行操作。因此研究温度的测量控制方法和其系统具有非常重要的作用意义。

而随着应用和需求的不断提高,电子技术有了很大的飞跃和进步,单片机相关的技术也有了快速的发展。我们完全可以运用单片机作为核心,加上合适的温度传感器制成测量系统进行温度测量。采用单片机来研制温度测量系统,可以降低产品的成本,同时提高系统性能,提高测量精度,并且提高生产效率,简化操作。

本课题采用STC89C52单片机系统作为核心,DS18B20温度传感器作为检测仪;使用LCD12864显示不同测点温度以及相关汉字;采用RS-485总线方式与PC上位机进行连接并通过MODBUS通讯协议与上位机通讯,将数据传给上位机;上位机采用力控组态软件编程,负责控制指令的发送,控制各个温度测点进行温度采集并收集测量数据,并对测量结果进行显示。课题包括硬件电路板设计,下位机软件设计,上位机软件设计,通讯模块设计等。

关键词:温度测量、STC89C52、DS18B20、LCD12864、RS-485总线、MODBUS通讯协议、力控组态软件。

The DESIGN of temperature measurement system BASED ON THE MC51 Microcontroller

Abstract

Temperature is one of the most basic environmental parameters. For us, it is not just a reflection of a volume. It can directly influence and affect our lives. There are a lot of control objects in the industrial production process and temperature control has great importance and significance. Because the control objects become more and more complex, there are still many problems in temperature measurement. We need real-time temperature measurement not only in industrial production process, but also in agricultural production process. So the study on the temperature measurement methods and devices has great significance.

With the development of technologies and the needs of applications, microcontroller technology has been rapidly developed and electronics has grown with leaps and bounds. We can definitely use microcontroller and temperature sensor for temperature measurement. We can greatly improve the accuracy of temperature measurement, reduce costs, simplify operations, save labor and increase productivity by using microcontroller temperature measurement system.

In this topic, I used STC89C52 microcontroller system as the core and DS18B20 temperature sensors as the detectors. I used LCD12864 to display different temperatures at different measuring points and Chinese characters. By using RS-485 and MODBUS communication protocols, the microcontroller can communicate and transfer data to PC. I used Forcecontrol V7.0 to programming at PC. It sends control commands, control various temperature measuring points to get the temperature and collect the data and display the results. The study includes the designing of circuit boards, the software in microcontroller, the software in PC and the communication module.

KEYWORDS: Temperature Measurement, STC89C52, DS18B20, LCD12864, RS-485, MODBUS Communication Protocols, Forcecontrol V7.0.

目录

摘要 I

Abstract II

第1章 绪论 1

1.1 选题背景和意义 1

1.1.1 背景 1

1.1.2 意义 1

1.2 整体目标 2

1.3 实现方案 2

1.3.1 系统 2

1.3.2 对象 3

第2章 温度传感器 5

2.1 温度传感器简介 5

2.1.1 原理及特点 5

2.1.2 分类 5

2.1.3 发展方向 5

2.2 热电偶 6

2.2.1 热电偶的工作原理 6

2.2.2 热电偶的特点 7

2.3 热电阻 7

2.3.1 热电阻的工作原理 7

2.3.2 热电阻的接线 8

2.3.3 热电阻的特点 9

2.4 半导体热敏电阻 10

2.4.1 工作原理 10

2.4.2 半导体热敏电阻的特点 11

2.5 DS18B20温度传感器 11

2.5.1 DS18B20温度传感器简介 11

2.5.2 DS18B20温度传感器原理 12

2.5.3 DS18B20存储器指令 13

2.5.4 DS18B20通讯时隙 14

第3章 系统硬件设计 16

3.1 单片机模块 16

3.1.1 单片机概论 16

3.1.2 单片机的基本组成 16

3.1.3 单片机最小系统 18

3.2 温度传感器及报警模块 19

3.2.1 温度传感器模块 19

3.2.2 报警模块 20

3.3 LCD显示及键盘模块 21

3.3.1 LCD12864显示模块 21

3.3.2 键盘模块 23

第4章 RS-485通讯 24

4.1 RS-485通讯简介 24

4.1.1 特点 24

4.1.2 电平特性 25

4.1.3 实现方式 25

4.2 RS-485通讯电路设计 26

4.2.1 器件选择 26

第5章 系统软件设计 29

5.1 下位机软件 29

5.1.1 温度测量 29

5.1.2 温度显示 30

5.1.3 RS-485通讯 30

5.1.4 键盘和报警 31

5.2 上位机软件 33

5.2.1 MODBUS通讯协议 33

5.2.2 力控组态软件 34

5.3 系统运行 36

5.3.1 测量对象的连接 36

5.3.2 下位机运行 37

5.3.3 上位机运行 39

第6章 总结与展望 40

6.1 总结 40

6.2 展望 40

参考文献 42

致谢 43

绪论

选题背景和意义

背景

温度用来表现物体的冷热程度。在人类的生产生活中,温度测量起着重要的作用。特别是随着科技的发展和需求的提高,在工作和生活中很多场合都可以见到对温度测量和温度控制的使用。而随着工农业生产要求的不断提高,尤其是工业生产和国防建设中,对温度的测量与控制都提出了更高的要求[1]。我们需要体积小、性价比高、使用寿命长、自动化程度高的温度测量系统。

物体温度变化时,温度传感器的某种特性也会随之变化。温度传感器以此来简介测量被测物体的温度。很多材料的特性都会随着温度的变化而发生改变,所以可以作为温度传感器的材料非常多。由于在具体工农业生产中温度测量的范围非常广,,而不同材料制成的温度传感器只能在一定的温度范围内使用,所以我们需要在不同的场合使用不同的温度传感器。而随着科学技术的发展和需求的变化,新型的温度传感器一定会不断涌现。

剩余内容已隐藏,请支付后下载全文,论文总字数:24058字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;