1、 2009 级电子信息工程 基于单片机温度控制电路课程设计报告 设计题目 基于单片机温度控制电路的设计 姓名及 学号 学院 工程技术学院 专业 电子信息工程 班级 指导教师 ii 目目 录录 1 引言 . 1 2 设计任务 . 2 2.1 设计内容 . 2 2.2 技术指标 . 2 2.3 各部分的设计 . 2 3 方案的分析与选择 . 3 3.1 方案的分析 . 3 3.2 方案的选择 . 3 3.3 设计框图 . 4 4 硬件部分理论设计 . 5 4.1 AT89C51 单片机的引脚功能说明 . 5 4.2 AT89C51 单片机最小系统 . 6 4.3 LED 显示器接口原理 . 7 4
2、.4 按键部分的设计 . 8 4.5 数字温度传感器 DS18B20 的发展 . 9 4.6 DS18B20 的主要特性 . 9 4.7 DS18B20 工作原理 10 4.8 DS18B20 主要的数据部件 11 4.9 高速暂存存储器 11 4.10 本设计中 DS18B20 使用中注意事项 . 12 4.11 固态继电器的分析与选择 . 13 4.12 电源 . 14 5 软件部分的理论设计 15 5.1 硬件的整合 . 15 5.2 软件的设计 15 参考文献 17 致谢 18 iii 摘 要 本文是一个关于恒温控制器的设计, 本文单片机控制部分采用 AT89C51 单片机为核 心,单
3、片机具有功能强,体积小,成本低等优点,设计采用 DS18B20 数字式温度传感器, 温度精度可以控制在 1以内,采用软件编程,使用 C 语言来编写程序,用控制电炉的 加热来实现对水温温度的控制。适用于环境参数经常变化的小型温度控制电路。恒温温 度控制在日常生活中有很重要的作用,尤其是水温的温度恒定,恒定的水温对水产养殖, 工厂污水的处理,家庭生活用水等有重要的意义。 关键词关键词:恒温控制器;AT89C51 单片机;DS18B20 温度传感器;C 语言编程 iv Abstract I use the AT89C51SCM design a constant temperature consta
4、nt water temperature controller of control, the design of single-chip microcomputer control AT89C51 microcontroller as the core, SCM has strong function, small volume, low cost, this design using digital temperature sensor DS18B20, temperature control precision of 1 in May, within the software progr
5、amming, using C language program, with the control of electric heating water temperature to realize the control of the temperature. Apply to environmental parameters often changes of small temperature control circuit. Constant temperature and temperature control in everyday life there is very import
6、ant role, especially the temperature constant water temperature, constant water temperature of aquaculture, sewage treatment plant, family life such as water has an important significance. Keyword: Constant temperature controller; AT89C51SCM; The temperature sensor DS18B20; The C programming language. 1 1 引言 温度是工业对象中一个主要的被控参数,它是一种常见的过程变量,因为它直接 影响燃烧、化学反应、发酵、烘烤、煅烧、蒸馏、浓度、挤压成形,结晶以及空气流 动等物理和化学过程。温度控制不好就可能引起生产安全,产品质量和产量等一系列 问题。温度控制是许多设备的重要的构成部分,它的功能是将温度控制在所需要的温 度范围内,以利于进行工件的加工与处理。不论是在生活中还是在工业生