基于51单片机的温度自动控制系统实现步进电机控制设计毕业设计论文 下载本文

第 1 页 共 84 页

摘 要

温度控制是我们工业生产过程和日常生活中经常遇到的过程控制;在我们日常生活中,家里的饮水机、电风扇、空调、暖气开关、宿舍的热水系统无不需要用到自动温控系统。而要实现对多个温度系统的控制目前在市场上是很少的,单个的主机对各个温控的对象进行控制显得资源浪费,为了解决这个问题,实现一个主机对多个系统进行控制,本课题主要对实现了双通道的温度自动控制系统的说明。

本设计主要是基于STC89C51单片机和DS18B20温度传感器的温度自动控制系统,并采用1602液晶屏作为温度显示模块,设计中充分利用单片机的管脚资源,实现两个通道的温度控制系统,独立键盘可以对正常温度的范围进行设定,还可选择工作的测温通道,控制模块主要是通过控制信号的输出实现对相关升降温器件进行开关控制,从而实现一个双通道的温控自动控制系统。设计中采用MCS-51单片机来对温度进行控制,是因为其具有控制方便、组态简单和灵活性大,集成度高,功能强,通用性好,特别是它具有体积小,重量轻,能耗低,价格便宜,可靠性好,抗干扰能力强和使用方便等方面的独特的优点;而且可以大幅度提高被控温度的技术指标。所以此装置不仅轻便、稳定,而且功能非常实用。

本文从硬件电路的设计、软件设计两方面介绍了MCS-51单片机温度控制系统的设计思路,对硬件原理图和程序框图作了简单的描述,对设计的实现过程和调试过程也做了相应的说明。

关键字:单片机;1602液晶屏;DS18b20;温度控制

1

第 2 页 共 84 页

Abstract

Temperature control is our industrial processes and frequently encountered in everyday life process control; in our daily life, home water dispenser, electric fans, air conditioning, heating switch, dormitories not need to use a hot water system has no automatic temperature control system . In order to achieve a plurality of temperature control of the system currently on the market is very small, for each individual host objects to control the temperature becomes waste of resources, and in order to solve this problem, the realization of a system for controlling a plurality of host the project implements a dual-channel automatic temperature control system.

This design is based mainly on STC89C51 MCU and DS18B20 temperature sensor automatic temperature control system, and the use of 1602 as a temperature LCD display module, designed to fully utilize the microcontroller pin resources to achieve two-channel temperature control system can separate keyboard setting the normal temperature range, temperature may choose to work channel, the control module is implemented by a control signal output of the relevant switching control of heating and cooling devices, in order to achieve a two-channel control system for automatic temperature

2

第 3 页 共 84 页

control. Design used in MCS-51 microcontroller to control the temperature, because of its easy to control, configuration simplicity and flexibility, high integration, strong function, versatility, and in particular, it has small size, light weight, consumption is low, cheap, good reliability, anti-interference ability and ease of use of the unique advantages; controlled temperature and can greatly improve the technical specifications. So this device is not only lightweight, stable, and is very practical. This article from the hardware circuit design, software design introduces two MCS-51 microcontroller temperature control system design, hardware schematics and block diagram briefly described, the realization of the design process and the debugging process has made the corresponding instructions.

Keywords: SCM; 1602 LCD screen; DS18b20; temperature control

3

第 4 页 共 84 页

引言 ........................................................... 7 1 绪论 ........................................................ 8 1.1 温度测量与控制技术的发展与现状 ............................. 8 2 设计任务 ................................................... 10 3 设计构思及理论 ............................................. 10 3.1 设计思路 .................................................. 11 3.2 方案论证 .................................................. 12 3.2.1 主机模块 ................................................ 12 3.2.2 显示模块 ................................................ 13 3.2.3 温度测量 ................................................ 13 4 系统电路的设计及原理说明 ................................... 14 4.1 电路系统说明 .............................................. 14 4.2 电路设计说明 .............................................. 15 4.2.1 单片机电路 .............................................. 15 4.2.2供电系统电路 ............................................ 16 4.2.3 显示模块电路 ............................................ 17 4.2.4 时钟电路 ................................................ 18 4.2.5 复位电路 ................................................ 19 4.2.6 按键电路 ................................................ 20 4.2.7 报警电路 ................................................ 21 4.2.8 控制电路 ................................................ 22

4