【正文】
水塔智能水位控制系統(tǒng)設(shè)計 THE DESIGN OF CONTROL SYSTEM OF INTELLIGENT WATER TOWER 專業(yè):測控技術(shù)與儀器 姓名: 王炯 指導(dǎo)教師: 申請學(xué)位級別:學(xué)士 論文提交日期: 2020 年 6 月 學(xué)位授予單位:天津科技大學(xué) 摘 要 我們的生命離不開水,供水問題是我們生活中必須面對的問題。我們生活中基本都用水塔供水,水塔水位控制系統(tǒng)就是為 安全 供水提供解決方案。水塔供水的主要問題是塔內(nèi)的水需要始終保持在適當(dāng)?shù)奈恢茫荒艹霈F(xiàn)“空水”、“溢水”狀況發(fā)生。傳統(tǒng)的控水系統(tǒng)存在著許多問題,例如控制精度低、能耗大等缺陷。水塔智能水位控制系統(tǒng)的成本低,安裝方便,靈敏度高,是節(jié)能環(huán)保 、 節(jié)約水資源,方便生活的水塔水位控制 的 理想裝置。 本設(shè)計介紹的是一種用 AT89C51 單片機做主控元件的半導(dǎo)體壓力傳感器 水塔水位測量系統(tǒng)。半導(dǎo)體壓力傳感器 是一種將被測件上的應(yīng)變變化轉(zhuǎn)換成為一種電信號的敏感器件。通常是將應(yīng)變片通過特殊的粘和劑緊密的粘合在產(chǎn)生力學(xué)應(yīng)變 的 基體上,當(dāng)基體受力發(fā)生應(yīng)力變化時,電阻應(yīng)變片也一起產(chǎn)生形變,使應(yīng)變片的阻值發(fā)生改變,從而使加在電阻上的電壓發(fā)生變化。這種應(yīng)變片在受力時產(chǎn)生的阻值變化通常較小,一般這種應(yīng)變片都組成應(yīng)變電橋,并通過后續(xù)的儀表放大器進行放大 、 濾波 , 然后輸入到串行的 A/D 轉(zhuǎn)換器中進行模 ?數(shù)轉(zhuǎn)換,模 ?數(shù)轉(zhuǎn)換以后得到的數(shù)字信號直接送入單片機,經(jīng)過單片機分析處理后根據(jù)相應(yīng)的結(jié)果通過繼電器對水泵電機進行控制,從而進行對水位的控制 , 與 此同時將測量結(jié)果顯示出來。 關(guān)鍵詞: 水位控制;單片機;壓力傳感器 ABSTRACT We can not live without water, and water suppliment is an problem we have to face in our life. In our life, water often supplied by water tower, and the water level control system of water tower provides solutions to water suppliment problem. The main issue of water suppliment of water tower is that water in the tower needs to be controlled under an appropriate level, the situation of water shortage and water overflow are not allowed to happen. Many limitations exist in traditional water control system, such as the low controlling accuracy and high energy consumption. Due to its low cost, convenient installation and high sensitivity, thr intellectual water level control system of water tower has bee an ideal device to protect environment, save water and bring convenience to life. This design introduces a water level measuring system of semiconductor pressure sensor, which uses a kind of single chip microputer(SCM) called AT89C51 as its main controlling elements. Semiconductor pressure sensor is a sensing device that can transform the change of stress and strain on the object into a kind of electrical signal, generally, the semiconductor pressure sensor cements the strain gauge on the matrix that produces mechanical strain by using a special binder, when the strain changes occur, the deformation of strain gauge of resistance occurs at the same time, then the resistance value will change, so that the voltage on thr resistance will change, the strain gauge is under strain, the change of the resistance value usually very small, in most cases, this kind of strain gauge can make up strain bridge, and can be amplified and filtered by subsequent instruments, then, it will be input in a serial A/D converter to do a transformation from model to statistics. The digital signal gained from the transformation will be transmits into SCM directly, after the anslysis and process of SCM, the electric relay will control the water pump motor according the results, so that the aim of controlling water level can be achieved, and the measurement results will be manifested. Keywords: water level control。 singlechip microputer。 semiconductor pressure sensor 目 錄 第一章 緒論 ............................................. 1 第一節(jié) 課題背景與研究意義 ................................ 1 第二節(jié) 國內(nèi)外研究現(xiàn)狀及發(fā)展 .............................. 1 第三節(jié) 本課題主要研究內(nèi)容 ................................ 3 第二章 系統(tǒng)總體方案設(shè)計 .................................. 4 第一節(jié) .................................................. 4 第二節(jié) 測量模塊 ......................................... 5 一、水位測量原理分類 ..................................... 5 二、壓力傳感器 .......................................... 7 第二節(jié) 模數(shù)轉(zhuǎn)換 ......................................... 7 一、 AD 轉(zhuǎn)換器的分類 ...................................... 8 二、串并行 AD 轉(zhuǎn)換器的選取 ................................ 8 三、 AD 轉(zhuǎn)換器芯片型號的選取 .............................. 8 第三節(jié) 控制模塊 ........................................ 8 一、繼電器的介紹 ........................................ 8 第四節(jié) 顯示模塊 ........................................ 9 一、 LED 顯示器 ........................................... 9 二、 LCD 顯示器 ........................................... 9 第三章 系統(tǒng)硬件設(shè)計 ..................................... 10 第一節(jié) 單片機 AT89C51 .................................. 10 一、主要特性 ........................................... 11 二、特性概述 ........................................... 11 三、管腳說明 ........................................... 11 四、內(nèi)部結(jié)構(gòu) ........................................... 14 第二節(jié) 壓力傳感器 ...................................... 14 一、性能特點 ........................................... 15 二、產(chǎn)品主要參數(shù) ....................................... 15 三、工作原理 ........................................... 16 第三節(jié) A/D 轉(zhuǎn)換器 ...................................... 16 一、 TLC0834 主要特點 .................................... 16 二、工作特點 ........................................... 16 三、引腳功能 ........................................... 17 四、 AD 轉(zhuǎn)換器與單片機硬件接口電路 ....................... 18 第四節(jié) LCD 顯示器 ...................................... 18 第五節(jié) 繼電器輸出 ...................................... 19 第六節(jié) 時鐘電路 ....................................... 20 第七節(jié) 穩(wěn)壓電源 ........................................ 21 一、穩(wěn)壓電源工作原理 .................................... 21 二、 LM7805 ............................................. 21 第八節(jié) 報警電路 ........................................ 23 第九節(jié) 看門狗及復(fù)位 .................................... 23 一、 X25045 ............................................. 24 二、復(fù)位電路 ........................................... 24 三、單片機與看門狗、復(fù)位電路圖 .......................... 25 第四章 軟件設(shè)計和仿真 .................................. 26 第一節(jié) 軟件設(shè)計基本步驟 ................................. 26 第二節(jié) 水塔水位控制主程序 ............................... 26 第三節(jié) 顯示與 A/D 轉(zhuǎn)換的數(shù)據(jù)處理 ........................ 27 第四節(jié) 中斷報警程序 .................................... 29 第五節(jié) 看門狗程序 ...................................... 30 第六節(jié) 系統(tǒng)仿真電路圖 .................................. 31