1、 毕业设计(论文) 课题 基于单片机的基于单片机的 PIDPID 温度控制器的设计温度控制器的设计 学学 院院 电子电子信息信息工程工程学院学院 专业专业(方向)(方向) 应用电子技术(通信电子)应用电子技术(通信电子) 班班 级级 电子电子 104104 学学 号号 姓姓 名名 完成日期完成日期 20122012 年年 1111 月月 3030 号号 指导教师指导教师 I 基于单片机的 PID 温度控制器的设计 摘 要 本文从软硬件两方面设计了一个温度自动控制器系统。本设计系统以单片机 (STC89C51RC)为控制核心,主要包括按键部分、DS18B20 温度采集部分、温度报警部 分、160
2、2 显示部分、温度控制部分及 MAX232 通信接口部分等硬件部分,从而实现智能 温度控制。 本系统通过按键预设加热的最终保持水温的温度并进行实时显示预设温度和当前 温度,并采用 PID 算法的控制输出宽度可调的 PWM 波来控制双向可控硅的导通和关断 用以调整输出加热功率,使之切断或接通加热器,从而控制水温稳定在预设值上。 文中还着重介绍了软件设计部分,在这里采用模块化结构,主要模块有:LCD1602 显示程序、键盘扫描及按键处理程序、温度信号处理程序、温度控制程序、超温报警程 序。 本系统的主要设计思想是以硬件为基础,软件和硬件相结合,最终实现各个模块的 功能。 关键词关键词:单片机;DS
3、18B20;PID 算法;PWM 波;双向可控硅; II Project name The Design of PID Temperature Control System Based on SCM Abstract This article from two aspects of hardware and software design of a temperature automatic controller.This design system with single chip microcomputer (STC89C51RC) as the control core, includi
4、ng the key part, DS18B20 temperature acquisition part, temperature alarm part, 1602 portion of the display, temperature control part and MAX232 communication interface and other hardware components, thereby realizing the intelligent temperature control. This system through the keys to the preset heating ultimately keep water temperature and real-time display preset temperature and the temperature, and PID algorithm is used to control the output with adjustable width PWM to control