【正文】
河北經(jīng)貿(mào)大學(xué)畢業(yè)設(shè)計(jì)(論文) I 畢業(yè)設(shè)計(jì)(論文)題 目 基于單片機(jī)的水位控制系統(tǒng)的設(shè)計(jì)系 別 專 業(yè) 班 級 學(xué)生姓名 學(xué) 號 指導(dǎo)教師 河北經(jīng)貿(mào)大學(xué)畢業(yè)設(shè)計(jì)(論文) II 2022 年 4 月基于單片機(jī)的水位控制系統(tǒng)的設(shè)計(jì)摘 要液位測量廣泛應(yīng)用于工業(yè)、經(jīng)濟(jì)、生活等領(lǐng)域。本設(shè)計(jì)以水箱供水為模型,用于對水箱液位信號進(jìn)行測量監(jiān)控記錄?;趩纹瑱C(jī)的液位測量裝置具有測量準(zhǔn)確、重復(fù)性好、功耗低、使用壽命長的特點(diǎn),是廣泛采用的技術(shù)。在深入學(xué)習(xí)科學(xué)發(fā)展觀的同時,電子設(shè)備的設(shè)計(jì)也需融入可持續(xù)發(fā)展的設(shè)計(jì)理念。故此,在基于單片機(jī)的液位測量裝置基礎(chǔ)上,擴(kuò)展實(shí)時監(jiān)控、數(shù)據(jù)采集、計(jì)算機(jī)串行通信等功能,從而能夠通過科學(xué)的方法將液位測量與統(tǒng)計(jì)科學(xué)結(jié)合,合理調(diào)度水資源,降低能源消耗。本文從系統(tǒng)方案選擇與論證,硬件電路設(shè)計(jì),系統(tǒng)軟件與上位機(jī)軟件設(shè)計(jì)等幾個方面介紹了基于單片機(jī)的液位測量監(jiān)控系統(tǒng)的設(shè)計(jì)過程,最終實(shí)現(xiàn)了液位的實(shí)時測量與監(jiān)控。最后,本文總結(jié)了設(shè)計(jì)過程中出現(xiàn)的問題及解決方法,簡要敘述了所獲數(shù)據(jù)的處理方法,引出了進(jìn)一步設(shè)計(jì)開發(fā)的思路。河北經(jīng)貿(mào)大學(xué)畢業(yè)設(shè)計(jì)(論文) III 關(guān)鍵詞:單片機(jī);液位測量;實(shí)時監(jiān)控;串口通信河北經(jīng)貿(mào)大學(xué)畢業(yè)設(shè)計(jì)(論文) IV The Design of Liquid Level Control System Based on MCUAbstractThe liquid level measurement is widely used in industry, economy, life and other fields. This design take the water tank water supply as a model, uses in carries on the survey to the water tank fluid position signal to monitor the record. The liquid level measurement device base on MCU is widely used because of many characteristics such as high measurement accuracy, good repeatability, low power consumption and long useful time. When we study Scientific Outlook on Development thoroughly, the design of electronic aid should include the thought of sustainable development. So, beyond the liquid level measurement device based on MCU, expand the functions of realtime monitoring, data acquisition, serial munication. Through the new functions, the scientific method of the liquid level measurement could be bined with Statistical Science, be used to manage the water resources reasonable, reduce energy consumption.This thesis introduces the design process of the liquid level control system by several parts as system schema, the design of hardware circuit, the software of host puter and system software, ultimately achieved the level of realtime measurement and monitoring. Finally, the paper summarizes the problems and solutions of the design process, describes briefly the method of data processing, and leads to ideas of the further design and development.Keywords:MCU;Liquid Level Measurement;Realtime monitoring;Serial Communication河北經(jīng)貿(mào)大學(xué)畢業(yè)設(shè)計(jì)(論文) V 目 錄引言 ......................................................................1第 1 章 緒論 ..............................................................2 課題背景與研究意義 ..................................................2 國內(nèi)外研究現(xiàn)狀及發(fā)展 ................................................2 本課題主要研究內(nèi)容 ..................................................3第 2 章 系統(tǒng)總體方案 ......................................................4 系統(tǒng)設(shè)計(jì)要求 ........................................................4 系統(tǒng)框圖 ............................................................4 硬件設(shè)計(jì)方案 ........................................................4 主控模塊設(shè)計(jì)方案 ................................................5 鍵盤模塊設(shè)計(jì)方案 ................................................5 顯示模塊設(shè)計(jì)方案 ................................................6 數(shù)據(jù)存儲模塊設(shè)計(jì)方案 ............................................6 時間模塊設(shè)計(jì)方案 ................................................7 A/D 轉(zhuǎn)換模塊設(shè)計(jì)方案 ............................................8 通信模塊設(shè)計(jì)方案 ................................................9 電機(jī)控制模塊設(shè)計(jì)方案 ...........................................10第 3 章 硬件電路設(shè)計(jì) .....................................................11 AT89S52 硬件設(shè)計(jì) ...................................................11 按鍵設(shè)計(jì) ...........................................................13 顯示單元硬件設(shè)計(jì) ...................................................14 存儲單元硬件設(shè)計(jì) ...................................................15 時間單元硬件設(shè)計(jì) ...................................................17 A/D 轉(zhuǎn)換單元硬件設(shè)計(jì) ...............................................18 通信單元硬件設(shè)計(jì) ...................................................19 其他外圍電路的設(shè)計(jì) .................................................20第 4 章 系統(tǒng)軟件設(shè)計(jì) .....................................................22 系統(tǒng)軟件 ...........................................................22 系統(tǒng)軟件編譯開發(fā)環(huán)境 ...........................................22 系統(tǒng)主程序流程圖 ...............................................22 系統(tǒng)初始化 .....................................................22 顯示與 A/D 轉(zhuǎn)換的數(shù)據(jù)處理 .......................................24 按鍵部分軟件設(shè)計(jì) ...............................................25 顯示模塊的軟件設(shè)計(jì) .............................................26河北經(jīng)貿(mào)大學(xué)畢業(yè)設(shè)計(jì)(論文) VI A/D 轉(zhuǎn)換模塊軟件設(shè)計(jì) ...........................................26 電機(jī)控制模塊軟件設(shè)計(jì) ...........................................26 通信協(xié)議及通信模塊軟件設(shè)計(jì) .....................................27 時間模塊軟件設(shè)計(jì) ..............................................29 上位機(jī)軟件設(shè)計(jì) .....................................................30 上位機(jī)軟件開發(fā)編譯環(huán)境 .........................................30 上位機(jī)軟件的界面設(shè)計(jì) ...........................................31 上位機(jī)串口通信功能的實(shí)現(xiàn) .......................................32 上位機(jī)軟件中的數(shù)據(jù)處理 .........................................34結(jié)論與展望 ...............................................................35致謝 .....................................................................37參考文獻(xiàn) .................................................................38附錄 A 系統(tǒng)電路原理圖 ....................................................39附錄 B 系統(tǒng)軟件源代碼 ....................................................42河北經(jīng)貿(mào)大學(xué)畢業(yè)設(shè)計(jì)(論文) VII 插圖清單圖 21 系統(tǒng)總體框圖……………………………………………………………………… 1圖 31 AT89S52 引腳及網(wǎng)絡(luò)標(biāo)號………………………………………………………… 11圖 32 復(fù)位電路及時鐘電路………………………………………………………………13圖 33 系統(tǒng)按鍵電路………………………………………………………………………14圖 34 74LS273 及 74LS47 引腳圖 ……………………………………………………… 14圖 35 顯示部分電路圖……………………………………………………………………15圖 36 62256 引腳圖……………………………………………………………………… 16圖 37 存儲的單元電路……………………………………………………………………16圖 38 DS1302 引腳圖………………………………………………………………………17圖 39 時間單元電路………………………………………………………………………17圖 310 ADC0804 引腳圖……………………………………………………………………18圖 31