毕设之基于51单片机的温度控制
时间:2026-01-20
时间:2026-01-20
综合课程设计报告
报 告 题 目 :基于DS18B20温度传感器的
温度显示系统
作者所在系部: 机械工程系 作者所在专业: 测控技术与仪器 作者所在班级: B08121 作 者 姓 名 : 肖昭 作 者 学 号 : 20084012104 指导教师姓名: 刘健 刘宝华 完 成 时 间 : 2011年12月28日
摘 要
传统的温度检测以热敏电阻为温度敏感元件。热敏电阻的成本低,需要外加信号处理电路,而且可靠性相对较差,测温准确度低,检测系统也有一定的误差。与传统的温度计相比,这次设计的是基于DS18B20的数字温度计,它具有读数方便,测温范围广,测温精确,数字显示,适用范围宽等特点。
在本设计中选用STC89C52型单片机作为主控制器件,采用DS18B20数字温度传感器作为测温元件,通过SN74LS245N并行传送数据传到数码管上,实现温度显示。设计了一个基于stc89c52单片机的温度监控报警系统,该系统以stc89c52为主控制器,以DS18B20芯片为温度传感器,对温度信息进行采集、放大,并用74LS245对数码管进行实时显示。此外,数码管还显示报警温度,当测试温度达到报警温度值或超出温度测量范围,系统能够给出报警指示并进行语音报警,
本设计的内容主要分为两部分,一是对系统硬件部分的设计,包括温度采集电路和数码管显示电路;二是对系统软件部分的设计,应用C语言编程设置温度设定值、温度的采集与显示。通过DS18B20直接读取被测温度值,送入单片机进行数据处理,之后进行输出显示,最终完成该系统的总体设计。其系统构成简单,信号采集效果好,数据处理速度快,便于实际监测使用。
关键词:单片机STC89C52;温度传感器DS18B20;LEN数码管
Abstract
Traditional temperature examination takes thermistor as temperature sensitive unit.
Thermistor's cost is low, needs the signal processing electric circuit, moreover the reliability is
relatively bad, the temperature measurement accuracy is low, the examination system also has certain error. Compares with the traditional thermometer, what this design is based on the DS18B20 digital thermometer, it has the reading to be convenient, the temperature measurement scope is broad, the temperature measurement is precise, the digit demonstrated that applicable scope wide and so on characteristics.
In this design as the main selection STC89C52MCN control device,using the DS18B20 digital temperature sensor as a temperature measurement devices,the parallel transmission of data tansmitted through SNL245N digital tube,to achieve the temperature display.A MCU STC89c52-based temperature monitoring alarm system is designed in the paper. The system takes MCU STC89c52 as the main controller, DS18B20 as the temperature sensor, and performs temperature information collecting, zoom, and real-time display. In addition, Temperature alarm with digital display, LED shows the alarming-temperature, alarm when the temperature reaches the test temperature value or goes beyond the scope of temperature measurement, the system can give voice instructions and report through telephone dial-up or wireless radio frequency transmitting and receiving module.
.The design of the content is divided into two parts,one part of the system hardware design,incuding he temperature acquisition circuiit and digital display circuit.second part of the system software design,application programming in C on the lower limit temperature alarm set value,temperture of the acquisition and display.DS18B20 temerture measured by dirrect reading the value into the microcontroller for date processing ,the output display after the final completion of the overall systerm design.The system constitutes a simple,effective signal acquisition,data processing speed ,ease of use of the actual monitoring.
Keywords: MCU STC89S52; DS18B20; LEN;
目 录
第一章 绪论 ................................................................................................... 4 1.1课题背景及来源 ...................................................................................... 4 1.2课题内容及要求 ...................................................................................... 4 第二章 系统整体设计 ................................................................................... 5 2.1系统设计方案论证 ................................................................................ 5 第三章 系统的硬件选择及设计 ................................................................... 6 3.1主控制器的设计 ...................................................................................... 6 3.2温度采集电路的设计 .............................................................................. 6 3.3温度显示电路的设计 ............................................................................ 10 第四章 系统的软件设计 ............................................................................. 11 4.1概述 ........................................................................................................ 11 4.2程序流程图 ............................................................................................ 11 4.3 控制源程序 ........................................................................................... 13 第五章 系统调试 ......................................................................................... 21 结 论 ........................................................................................................... 22 致 谢 ..................... …… 此处隐藏:8602字,全部文档内容请下载后查看。喜欢就下载吧 ……