【正文】
青島農(nóng)業(yè)大學(xué)海都學(xué)院 本科生畢業(yè)論文(設(shè)計(jì)) 題 目: 單片機(jī)溫度 控制系統(tǒng)設(shè)計(jì) 姓 名: 溫紀(jì)慶 系 別: 工程系 專(zhuān) 業(yè): 電氣工程及其自動(dòng)化 班 級(jí): 專(zhuān)升本 學(xué) 號(hào): 2021701040 指導(dǎo)教師: 呂新麗 2021 年 6 月 18 日 單片機(jī)溫度控制系統(tǒng)設(shè)計(jì) 摘 要 溫度是工業(yè)對(duì)象中主要的被控參數(shù)之一。特別是在 化工、 冶金、機(jī)械、食品等各類(lèi)工業(yè)中,人們都需要對(duì)各 種 加熱爐、熱處理 器 和鍋爐中的溫度進(jìn)行檢測(cè)和控制。由于工藝不同,所需要的溫度高低 也不盡相同 ,因而所采用的測(cè)溫元件和測(cè)溫方法也不同 。當(dāng)今,單片機(jī)的技術(shù)已經(jīng)非常成熟了,它集成度高、功能強(qiáng)、存儲(chǔ)量大、速度快、抗干擾性強(qiáng)和指令豐富等的優(yōu)點(diǎn),使它的應(yīng)用遍及各個(gè)領(lǐng)域。本文設(shè)計(jì)的系統(tǒng)就是單片機(jī)應(yīng)用于溫度控制的一個(gè)例子。本系統(tǒng)是一種高精度、測(cè)控速度快、 自我閉環(huán)控制、 測(cè)控溫度范圍廣的應(yīng)用性比較強(qiáng)的基于單片機(jī)的溫度測(cè)控系統(tǒng)。 本設(shè)計(jì)以 AT89S52單片機(jī)為核心的溫度控制系統(tǒng)的工作原理和設(shè)計(jì)方法。溫度信號(hào)由溫度芯片 DS18B20 采集,并以數(shù)字信號(hào)的方式傳送給單片機(jī)。文中介紹了該控制系統(tǒng)的硬件部分,包括:溫度 檢測(cè)電路、溫度控制電路、溫度顯示電路、報(bào)警電路和一些接口電路 。單片機(jī)通過(guò)對(duì)信號(hào)進(jìn)行相應(yīng)處理,從而實(shí)現(xiàn)溫度控制的目的。文中還著重介紹了軟件設(shè)計(jì)部分,在這里采用模塊化結(jié)構(gòu),主要模塊有: LCD1602 顯示程序、鍵盤(pán)掃描及按鍵處理程序、溫度信號(hào)處理程序、單片機(jī)內(nèi)部運(yùn)算比較程序、超溫報(bào)警程序。 關(guān)鍵詞: AT89S52 單片機(jī) 、溫度采集模塊 DS18B液晶顯示 LCD1602。 Single chip microputer temperature control system design Abstract Temperature is one of the main accused parameters in industrial object. Especially in the chemical industry, metallurgy, machinery, food and other kinds of industry, people need to all kinds of heating furnace, hot processor and temperature detection and control of the boiler. Because the process is different, the required temperature is different, so adopted by the temperature measuring element and temperature measuring method is different also. Today, microcontroller technology has very mature, it is high integration, strong functions, large storage, high speed, strong antiinterference advantages of abundant and instructions, etc., make its application in various fields. In this paper, design of system is an example of MCU is applied to temperature control. This system is a kind of high precision, fast measurement and closedloop control, measurement and control temperature range of the applied stronger based on single chip microputer temperature measurement and control system. AT89S52 singlechip microputer as the core of the design principle and design method of temperature control system. By temperature chip DS18B20 temperature signal acquisition and digital signal transmitted to the microcontroller. This paper introduces the hardware part of the control system, including: temperature detection circuit, temperature control circuit, display circuit, alarm circuit and some interface circuit. SCM through the signal is processed to achieve the purpose of temperature control. The paper also introduces the software design part, here USES the modular structure, main modules: LCD1602 display program, keyboard scanning and processing program, the temperature signal processing, single chip microputer internal operation procedures and overtemperature alarm. Key words: AT89S52 SCM, temperature acquisition module DS18B20, liquid crystal display LCD1602. 目 錄 摘要 .. .................................................. 2 Abstract ................................................ 3 目錄 .................................................... 4 第一章 緒論 ............................................. 5 課題背景、目的及意義 ....................................... 5 溫度控制的研究現(xiàn)狀及本文主要研究?jī)?nèi)容 ........................ 5 第二章 溫度控制系統(tǒng)方案選擇 .............................. 11 設(shè)計(jì)要求 .................................................. 11 工作原理 .................................................. 13 第三章 溫度控制硬件系統(tǒng)設(shè)計(jì) .............. 錯(cuò)誤 !未定義書(shū)簽。 芯片介紹 .................................................... 3 AT89S52……………………………………………..……………………………………………………… 3 LCD1602……………………………………………………………………………………………… …… ..6 DS18B20…………………………………………………………..………………… ..…………………... 8 電路原理圖及 PCB 圖 .......................................... 9 電路原理圖及分析 ………………………………………………………… …………… 9 PCB 圖及分析 …… ……………………………………………………………… … .….. 10 第四章 溫度控制軟件設(shè)計(jì) .................................... 28 程序 流程圖 及分析 ........................................... 11 程序及分析 ................................................. 11 第五章 測(cè)試分析 ....................................12 第六章 結(jié)論 ............................. 錯(cuò)誤 !未定義書(shū)簽。 參考文獻(xiàn) ....................................................................................錯(cuò)誤 !未定義書(shū)簽。 致 謝 ...........................................................................................錯(cuò)誤 !未定義書(shū)簽。 附 錄 ...........................................................................................錯(cuò)誤 !未定義書(shū)簽。 第一章 緒論 課題背景、目的及意義 電子 工業(yè) 技術(shù)的飛速發(fā)展,給人類(lèi)的生活帶來(lái)了根本的變革,特別是隨著 集成電路的 誕生而出現(xiàn)了嵌入式微型計(jì)算機(jī) ,更是將人類(lèi)社會(huì) 生產(chǎn) 帶入了一個(gè) 全新的控制時(shí)代。利用微型計(jì)算機(jī)的強(qiáng)大功能, 人們可以完成 各種自動(dòng)化智能 的控制。然而,微型計(jì)算機(jī) 造價(jià)高,對(duì)于大多數(shù)的 簡(jiǎn)單 控制來(lái)說(shuō),也并不需要 微型計(jì)算機(jī)那樣強(qiáng)大的功能,于是單片機(jī)就 應(yīng)運(yùn) 而生了。單片機(jī)將微機(jī)的 CPU、存儲(chǔ)器、 I/O接口 整合到一起 其實(shí)就是一個(gè)簡(jiǎn)化的微機(jī) 。相對(duì)微機(jī)來(lái)說(shuō),單片機(jī)價(jià)格低,非常適合于應(yīng)用在簡(jiǎn)單的控制場(chǎng)合以降低成本。另外,單片機(jī)是按照工業(yè)控制要求設(shè)計(jì)的,其可靠性很高,可在工業(yè)現(xiàn)場(chǎng)復(fù)雜的環(huán)境下運(yùn)行。單片機(jī)依靠其高的可靠性和極高的性?xún)r(jià)比,在工業(yè)控制,數(shù)據(jù)采集,智能化儀表,家用電器等方面得到極為廣泛的應(yīng)用。 1. 2 溫度控制的研究現(xiàn)狀及本文主要研究?jī)?nèi)容 現(xiàn)代工業(yè) 控制設(shè)計(jì) 及日常生活中溫度控制都起著 非常 重要的作用,早期的溫度控制主要用于工廠生產(chǎn)中,能起到實(shí)時(shí)采集溫度數(shù)據(jù)并控制溫度從而提高生產(chǎn)效率和 產(chǎn)品質(zhì)量。隨著人們生活質(zhì)量的提高,現(xiàn)代社會(huì)中的溫度控制不僅應(yīng)用在工廠生產(chǎn)方面也應(yīng)用于 家庭生活中。 在很多精密加工中對(duì)溫度要