1、温度自动控制系统的设计 摘 要 随着科技的不断进步,在工业生产中温度是常用的被控参数,而采用单片机 来对这些被控参数进行控制已成为当今的主流。 本文介绍了数字温度测量及自动 控制系统的设计。 阐述了以 AT89C52 单片机为核心的温度控制系统的工作原理和 设计方法。主要组成部分:AT89C52 单片机、温度传感器、显示电路、温度控制 电路。它可以实时的显示和设定温度,实现对温度的自动控制。而且设有超温报 警程序。测试表明,本设计对温度的控制有方便、简单的特点,大幅提高了被控 温度的技术指标。温度信号由温度芯片 DS18B20 采集,并以数字信号的方式传送 给单片机。 文中介绍了该控制系统的硬
2、件部分, 包括: 温度检测与温度控制电路。 单片机通过对信号进行相应处理,从而实现温度控制的目的。 关键词: 温度自动控制,AT89C52,DS18B20,PID ABSTRACT With the development of science and technology, temperature is used to be controlled parameter in industrial production. Controlling controlled parameter by microcontroller has been main trend in todays societ
3、y. This paper introduces the design of digital temperature measurement and automatic control system .It consists of AT89C52 microcontroller, temperature sensor, show circuit and temperature control circuit. It is able to display and set temperature in real-time. The purpose is to achieve the control
4、 of temperature. Besides, it has over- temperature alarm program. Tests show that this design not only controls temperature conveniently and simply but also improve the technical indicators of controlled temperature greatly. With as the core of microcontroller, this design achieves the control of te
5、mperature. Temperature signal is collected by temperature chip DS18B20 and transmitted to microcontroller in the form of digital signal. This paper introduces the hardware of the system including temperature detection and temperature control circuit. Microcontroller achieves the purpose of temperatu
6、re control by processing sign correspondingly. KEY WORDS: automatic temperature control, AT89C52 , DS18B20, PID I 目 录 前 言 1 第 1 章 系统总体设计 2 1.1 系统设计任务与要求. 2 1.1.1 系统设计任务与要求 2 1.1.2 重点研究内容 2 1.1.3 实现途径及方法 2 1.2 系统总体方案设计. 3 第 2 章 系统硬件各功能模块的设计 5 2.1 主控模块的设计. 5 2.1.1 AT89C52 单片机简介 5 2.1.2 温度传感器的选择 6 2.1.3 复位和时钟电路的设计. 9 2.1.4 温度采集电路 10 2.2 人机接口设计. 11 2.2.1 键盘的设计 11 2.2.2 显示电路的设计 11 第 3 章 软件设计 13 3.1 主程序模块 13 3.2 数据采集和显示模块 14 3.3 输入模块 21 第 4 章 PID 控制和参数整定. 24 4.1 PID 调节器控制原理 24 4.2 PID 控制的分类 25 4.3 数字