【正文】
....................................................... 4 167。 high measure precision and reliability. Its technical standard is over electricity energy is equal to the number of electronic pulses. The use of ADE7755 simplifies the calculation of quantity of electricity consumption with the singlechip microputer. When the prepaid electricity is exhausted, the AT89S52 controls the open of BST902. The customer purchases it again. In order to save electricity, the system can not affect the normal students in learning, living on the electricity demand for power supply of period of time. But do not affect other public power, such as: toilet, corridor of lighting. This system can pass the RS485 munication and other supporting system for subsequent preparation of design, such as: The system sell electric reads the data of prepaid electricity consumption from IC card firstly, and then pass them the AT89S52 of subsystem controlled electricity by RS485 interface. 本科畢業(yè)設(shè)計(jì)(論文) III The munication between the systems adopts the RS 485 standard interface. So we can make long distance and reliable munication. The system fulfills the functions in advance. The structure of the system is reasonable. The system works stably and securely. It is very worth of generalization and application. KEY WORDS: Load control, AT89S52, ADE7755, RS485本科畢業(yè)設(shè)計(jì)(論文) IV 目 錄 前 言 .............................................................................................................................. 1 第 1 章 緒論 ................................................................................................................... 3 167。實(shí)用表明本系統(tǒng)實(shí)現(xiàn)了預(yù)先設(shè)計(jì)的 基本功能,系統(tǒng)結(jié)構(gòu)合理,運(yùn)行穩(wěn)定,安全可靠,具有較高的社會(huì)推廣價(jià)值。 本系統(tǒng)可以通過(guò) RS485 通信,可以為后續(xù)其他配套系統(tǒng)的設(shè)計(jì)做準(zhǔn)備,如:售電系統(tǒng)通過(guò) RS485 把購(gòu)買電量寫入單片機(jī)。同時(shí)為了節(jié)約用電,可以在不影響同學(xué)的正常學(xué)習(xí)、生活的用電需求進(jìn)行分時(shí)段段供電。電量 的計(jì)算是以電脈沖個(gè)數(shù)作為標(biāo)準(zhǔn),簡(jiǎn)化了單片機(jī)對(duì)電量的計(jì)算。把整個(gè)系統(tǒng)分成若干個(gè)功能模塊分別進(jìn)行設(shè)計(jì),這樣一旦系統(tǒng)某處發(fā)生故障,便于維修。此系統(tǒng)能夠改變目前高校學(xué)生宿舍用電混亂,收取電費(fèi)難的問(wèn)題。本科畢業(yè)設(shè)計(jì)(論文) I 學(xué)生宿舍用電綜合管理系統(tǒng)設(shè)計(jì) 摘 要 本課題研究與設(shè)計(jì)了基于單片機(jī)控制的學(xué)生宿舍用電系統(tǒng)。實(shí)現(xiàn)宿舍內(nèi)每個(gè)房間電量的采集、計(jì)算、顯示;電量數(shù)據(jù)的保存、分時(shí)供電;自動(dòng)識(shí)別惡性負(fù)載控制某個(gè)房間停、送電等功能。 本系統(tǒng)采用了分塊一體化的設(shè)計(jì)方法。電量采集采用了專用電能計(jì)量芯片 ADE7755,它具有低功耗、精度高、抗干擾性強(qiáng)等優(yōu)點(diǎn),其技術(shù)指標(biāo)超過(guò)了 IEC1036 的準(zhǔn)確度要求。當(dāng)電量消耗完畢后,控電子系統(tǒng)的單片機(jī)通過(guò)軟件控制相應(yīng)房間的磁保持繼電器斷開,完成停電,實(shí)現(xiàn)預(yù)付費(fèi)功能。但不影響其他公共場(chǎng)合的用電,如:衛(wèi)生間,樓道的照明。系統(tǒng)之間的通信采用RS485 標(biāo)準(zhǔn)接口,可實(shí)現(xiàn)長(zhǎng)距離、抗干擾能力強(qiáng)的通信。 關(guān)鍵詞 : 負(fù)荷控制, AT89S52, ADE7755, RS485 本科畢業(yè)設(shè)計(jì)(論文) II The design of the electricity integrated Management system in students’ dormitory ABSTRACT The thesis mainly researches and designs the system of electricity based on the singlechip microputer used in students’ dormitory. The main functions of the system are sampling data, calculating, displaying, storing, querying and printing the quantity of electricity consumption, prepaying the fee of electricity consumption, etc. The system can change the confused state of electricity used in students’ dormitory at present and solve the difficulty of charging electricity fee. The system uses the method— bination of each units. Firstly we divide the whole system into many function modules. In this case when there is something wrong with the system, we can repair it easily. The system uses ADE7755, which is of low power。 學(xué)生 宿舍用電控制管理系統(tǒng)的研制背景 ................................................... 3 167。 本課題的工作及創(chuàng)新 ...................................................................................... 5 第 2 章 系統(tǒng)的基本構(gòu)成與性 能指標(biāo) ........................................................................ 7 167。 系統(tǒng)的主要功能及性能指標(biāo) ......................................................................... 7 第 3 章 系統(tǒng)的硬件設(shè)計(jì) .............................................................................................. 9 167。 電能計(jì)量芯片 ADE7755 ........................................................................ 9 167。 采樣板的設(shè)計(jì) ......................................................................................... 12 167。 單片機(jī)的選擇 ......................................................................................... 13 167。 單片機(jī) P2 口 ........................................................................................... 15 167。 顯示板的設(shè)計(jì) ................................................................................................ 16 167。 三片 74HC595A 級(jí)聯(lián)顯示電路 .......................................................... 17 167。 實(shí)時(shí)時(shí)鐘芯片 DS1302 ................................................................................. 19 167。 DS1302 在控電系統(tǒng)中的應(yīng)用 .............................................................. 20 167。 24LC16B 的特性 ..................................................................................... 22 本科畢業(yè)設(shè)計(jì)(論文) V 167。 通信電路設(shè)計(jì) ................................................................................................ 24 第 4 章 系統(tǒng)軟件設(shè)計(jì) ................................................................................................ 25 167。 主程序模塊 ..................................................................................................... 26 167。 主程序流程圖 ......................................................................................... 28 167。 通訊協(xié)議 ................................................................................................. 29 167。 顯示程序設(shè)計(jì) ................................................................................................ 31 167。 顯示緩沖區(qū)更新子程序 ....................................................................... 32 167。 開關(guān)控制 ......................................................................................................... 34 167。 負(fù)荷識(shí)別與控制程序 .................................................................................... 35 167。 工作原理 ................................................................................................. 36 167。 干擾的危害及抗干擾的方法 ....................................................................... 39 167。 抗干擾的方法 ......................................................................................... 40 167。 去耦電路 ..................