基于ds18b20智能溫度控制器設(shè)計.doc
基于ds18b20智能溫度控制器設(shè)計,摘 要單片機是隨著超大規(guī)模集成電路和半導(dǎo)體技術(shù)發(fā)展而誕生的,它具有體積小、功能強、性價比高、使用靈活等特點,因此單片機在智能化控制上如電子儀表、家用電器、節(jié)能裝置、工業(yè)控制等諸多領(lǐng)域都有著廣泛的應(yīng)用前景。本文主要介紹智能溫度控制器的設(shè)計,運用模塊化的設(shè)計思路,以單片機為主要的程序控制處理單元,將溫度采集與處理、溫度顯示...
內(nèi)容介紹
此文檔由會員 jbn12357 發(fā)布摘 要
單片機是隨著超大規(guī)模集成電路和半導(dǎo)體技術(shù)發(fā)展而誕生的,它具有體積小、功能強、性價比高、使用靈活等特點,因此單片機在智能化控制上如電子儀表、家用電器、節(jié)能裝置、工業(yè)控制等諸多領(lǐng)域都有著廣泛的應(yīng)用前景。
本文主要介紹智能溫度控制器的設(shè)計,運用模塊化的設(shè)計思路,以單片機為主要的程序控制處理單元,將溫度采集與處理、溫度顯示、超溫或低溫報警、加熱或制冷等各單元模塊設(shè)計成一智能溫度控制系統(tǒng)。
此次設(shè)計重點對智能溫度控制的硬件與軟件進行了分項、模塊化逐步分析設(shè)計。文章對89C51單片機的各引腳功能、溫度傳感器DS18B20的溫度采集過程、1602字符型液晶顯示器的顯示原理以及蜂鳴器報警與繼電器控制電路等部分進行闡述。同時繪制了系統(tǒng)電路原理圖,通過軟件仿真模擬調(diào)試實現(xiàn)了該系統(tǒng)的硬件電路,更重要的是將程序燒錄在單片機中后,在實際的硬件環(huán)境中也得到了確切驗證。根據(jù)硬件的設(shè)計和測控所要實現(xiàn)的功能,本次設(shè)計對軟件也進行了模塊化設(shè)計,通過對程序進行裁剪、修改、調(diào)試、仿真,最后形成了一套比較完善的程序系統(tǒng),并可以通過軟件修改來達到所要穩(wěn)定的溫度值。
此智能溫度控制器設(shè)計完成后其溫度測量控制范圍為-55°C至+125°C,對于某一特定溫度要求,當實際溫度偏離此特定溫度后蜂鳴器立即報警同時繼電器采取開關(guān)閉合的方式控制加熱或制冷設(shè)備來調(diào)節(jié)環(huán)境溫度,從而達到溫度智能控制的目的。
關(guān)鍵字: 單片機;溫度傳感器;液晶顯示器;蜂鳴器;繼電器
Abstract
MCU, with the VLSI and semiconductor technology development and birth, and it has a small, functional, cost-effective, flexible in use, etc., so MCU intelligent control such as electronic equipment, household appliances, energy-saving devices, industrial control, and many areas have broad application prospects.
This paper describes the design of intelligent temperature controller, using a modular design concept, the main program control to microcontroller processing unit, the temperature acquisition and processing, temperature, over-temperature or low temperature alarm, heating or cooling modules and other design elements into an intelligent temperature control system.
The design focuses on the intelligent temperature control of the hardware and software sub-item, step by step analysis of modular design. Article on the various pin functions 89C51 microcontroller, temperature sensor the temperature of the acquisition process DS18B20, 1602 Principles of character LCD display and buzzer alarm and relay control circuit section to elaborate. At the same time drawing the circuit diagram of the system, achieved through software simulation to debug the hardware circuit of the system is more important is the program in the MCU after the burn, in the actual hardware environment has also been exactly verified. According to the hardware design, and monitoring functions to be achieved, this design also conducted a modular software design, cutting through the procedures, modify, debug, simulation, and finally formed a relatively complete system of procedures and can be adopted by software to be modified to achieve a stable temperature.
This intelligent temperature controller complete control of its temperature measurement range is -55 ° C to +125 ° C, for a specific temperature requirements, when the actual temperature deviation from this specific temperature immediately after the buzzer to take alarm at the same time switch relay closure way of controlling heating or cooling equipment to regulate temperature, so as to achieve temperature smart control.
Keywords: microcontroller; temperature sensor; liquid crystal display; buzzer
目 錄
1 緒論 1
2 主要芯片和器件介紹 2
2.1 微處理器MCS-51介紹 2
2.1.1 MCS-51單片機內(nèi)部結(jié)構(gòu) 2
2.1.2 MCS-51單片機外部結(jié)構(gòu) 4
2.2單片機最小應(yīng)用系統(tǒng) 5
2.3數(shù)字溫度傳感器 DS18B20介紹 6
2.3.1 DS18B20 性能特點 6
2.3.2 DS18B20 內(nèi)部結(jié)構(gòu) 6
2.3.3 DS18B20 控制方法 7
2.3.4 DS18B20 的通信協(xié)議 8
2.4 1602LCD 顯示原理介紹 8
2.4.1液晶介紹 8
2.4.2字符型LCD簡介 9
2.4.3 顯示的原理 9
2.4.4 1602 型 LCD 的主要技術(shù)參數(shù) 10
2.4.5 1602 型 LCD 顯示字符的過程 11
2.4.6 1602 型 LCD 的讀寫操作 11
3 智能溫控主要單元電路 12
3.1 溫度采集單元電路 12
3.2 1602LCD顯示單元電路 12
3.3 加熱/制冷單元電路 12
3.4 超溫報警單元電路 13
4 系統(tǒng)硬件電路設(shè)計 14
4.1 智能溫度控制器工作原理 14
4.2 智能溫度控制器電路圖 14
5 系統(tǒng)軟件設(shè)計 15
5.1程序的整體流程圖 15
5.2 源程序清單 15
6 小結(jié) 29
致謝 30
參考文獻 31