【正文】
后臺(tái)處理軟件程序?qū)崿F(xiàn)功能:接收下位機(jī)發(fā)送過來的數(shù)據(jù),將數(shù)據(jù)以圖形和數(shù)據(jù)雙重形式顯示給用戶,并具有數(shù)據(jù)存盤功能。反向二極管起到濾波作用,有效的防止了電壓尖峰脈沖對(duì)系統(tǒng)的影響。PC817內(nèi)部發(fā)光二極管截止。如圖64所示。根據(jù)后臺(tái)處理軟件發(fā)送過來的命令控制字。其性能參數(shù)如下圖所示: PC817 與 AT89S52 單片機(jī)接口電路及 PC817 與繼電器接口電路如圖36所示, 口置低電平時(shí),光電耦合器(PC817)內(nèi)二極管導(dǎo)通,光敏三極管將光電流信號(hào)轉(zhuǎn)換成電壓信號(hào),繼電器導(dǎo)通,電器啟動(dòng)。如圖35所示。 TTL/CMOS數(shù)據(jù)從T1IN、T2IN輸入轉(zhuǎn)換成RS232數(shù)據(jù)從T1OUT、T2OUT送到電腦DP9插頭;DP9插頭的RS232數(shù)據(jù)從R1IN、R2IN輸入轉(zhuǎn)換成TTL/CMOS 數(shù)據(jù)后從R1OUT、R2OUT輸出。AX232芯片是美信公司專門為電腦的RS232標(biāo)準(zhǔn)串口設(shè)計(jì)的接口電路,使用+5v單電源供電?!? 最大發(fā)射功率+10dBm,高抗干擾GFSK調(diào)制。在進(jìn)行寫操作時(shí)比較簡(jiǎn)單,MCU先把CSN拉低,然后在MOSI 線上輸出寫命令字節(jié)和數(shù)據(jù)字節(jié)即可。SPI 總線的每次操作都必須在使能引腳CSN的下降沿開始。 ?。?)工作溫度范圍為40~+85 攝氏度 (7)低功耗,約 15mW。輸入輸出與TTL兼容。電路缺點(diǎn)是使用了兩個(gè)很大的電解電容做耦合,電路需要一段較長(zhǎng)的開機(jī)過渡時(shí)間(需要把電容充電到到偏置點(diǎn)才可以正常工作)。為了使元件發(fā)揮其好的功能和特定的性能,加熱電壓、回路電壓和負(fù)載電阻須限制在下頁圖表所示的標(biāo)準(zhǔn)工作條件內(nèi)。 MQ306A 測(cè)試電路如圖31所示測(cè)試電路。第三章 智能家居安防系統(tǒng)硬件電路設(shè)計(jì) 本章詳細(xì)的介紹了智能家居安防系統(tǒng)硬件電路設(shè)計(jì)部分,并且簡(jiǎn)略的介紹了相關(guān)器件的使用方法。第三、下位機(jī)數(shù)據(jù)采集模塊通過無線收發(fā)裝置將采集到的信號(hào)發(fā)送給接收模塊。后臺(tái)處理軟件功能流程圖如圖24所示:當(dāng)程序接收到串口數(shù)據(jù)時(shí),以圖形和數(shù)據(jù)雙重形式顯示給用戶,并同時(shí)進(jìn)行數(shù)據(jù)存盤備份。跟隨放大電路數(shù)模轉(zhuǎn)換處理與發(fā)送數(shù)據(jù)傳感器信號(hào)圖 22 數(shù)據(jù)采集模塊家電控制模塊原理圖:工作原理:如圖23所示, 口置低電平時(shí),光電耦驅(qū)動(dòng)模塊將電流信號(hào)轉(zhuǎn)換成電壓信號(hào),繼電器導(dǎo)通,電器啟動(dòng)。(3)以中斷方式讀取后臺(tái)處理軟件發(fā)送過來的命令控制字,并根據(jù)讀取到的命令控制字開啟或關(guān)閉相關(guān)家電(排風(fēng)扇等)。(2)將放大后的電壓信號(hào)轉(zhuǎn)換成相應(yīng)的數(shù)字量信號(hào)。(4)存盤功能,將接受到的數(shù)據(jù)以文件形式存入PC機(jī),以便用戶查找和做相應(yīng)的分析。同時(shí)以中斷方式讀取后臺(tái)處理軟件發(fā)送過來的命令字,響應(yīng)命令控制字符并打開相應(yīng)的家用電器(如排風(fēng)扇等)。模數(shù)轉(zhuǎn)換芯片將經(jīng)過濾波與放大的傳感器信號(hào)進(jìn)行模數(shù)轉(zhuǎn)換。并且介紹了本課題研究?jī)?nèi)容研究目的、研究意義、主要研究?jī)?nèi)容及創(chuàng)新點(diǎn),還對(duì)與本課題相關(guān)國(guó)內(nèi)外研究現(xiàn)狀做了相關(guān)的介紹第二章 智能家居安防系統(tǒng)整體方案設(shè)計(jì)本章主要介紹了智能家居安防系統(tǒng)的整體功能結(jié)構(gòu),以及相應(yīng)的系統(tǒng)設(shè)計(jì)方案等。據(jù) 1998 年資料顯示,每年與石油液化氣有關(guān)的事故僅發(fā)生 75 起。國(guó)外研究現(xiàn)狀:日本使用液化氣始于 1952 年。公寓樓宇集中控制是燃?xì)饧揖影卜涝诿裼梅矫孀畹湫偷膽?yīng)用,只要配備有大樓管理員的民用住宅樓均可采用這種方式。即:基于無線傳感器網(wǎng)絡(luò)的智能家居安防系統(tǒng)初步構(gòu)建的軟硬件設(shè)計(jì)與實(shí)現(xiàn)。優(yōu)化了室內(nèi)利用空間,功耗低。第三、增加的自動(dòng)家電控制功能,可以根據(jù)初定預(yù)警上限制開啟排風(fēng)扇。本課題的意義在于實(shí)現(xiàn)了真正意義上基于無線傳感器網(wǎng)絡(luò)的智能家居安防。家居安防包括防盜、防燃?xì)庑孤⒎阑鸬裙δ?,并具備遠(yuǎn)程監(jiān)控,住戶可以通過網(wǎng)絡(luò)或電話隨時(shí)了解家內(nèi)情況。隨著社會(huì)的發(fā)展和科學(xué)技術(shù)的進(jìn)步,數(shù)字網(wǎng)絡(luò)生活時(shí)代已經(jīng)到來,適應(yīng)人們追求現(xiàn)代生活方式要求的智能家居(Smart Home)逐漸成為一個(gè)研究的新熱點(diǎn)。關(guān)鍵字:可燃?xì)怏w傳感器;RS232;數(shù)據(jù)采集;89S52AbstractSmart Home Security System use the Computer technology, microelectronic technology, munications technology and integrating all the features of the intelligent terminal by the family and its system software to achieve home security. The functions of home security system include Antitheft antigas leak and fire. It has remote monitoring function, tenants can through the Inter or by telephone at any time to understand the situation within the family.This article makes the broad introduction about An Fang based on the intelligence to the indoor coal gas content examination technology and the flammable gas sensor, in the system the monolithic integrated circuit system has mainly pleted signal gathering, the data munication, the microputer database pletes the data receive, data processing, demonstration and opening and closure domestic electric appliances functions and so on. This paper discussed in detail the preliminary design plan about that take monolithic integrated circuit AT89S52 as the control core, MQ306A integrates the flammable gas sensor, use the RS232 connection correspondence, and the ADC0809 a/d conversion to carry on the data transmission to implement intelligent home security the lower position machine software design uses the assembly language pilation data acquisition procedure and carries on the protocol processing and the data exchange procedure to the RS232 connection chip. The superior machine data reduction program applies the VC language pilation, and gives control processes and software source codeThe graduation project has achieved the predetermined goal,.It has realized to indoor flammable gas content gathering and the real time displaying, and can open the ventilating fan automatically according to the early warning value. In view of the question which appears in the system debugging process ,we have proposed solutions and methods.Key words:pulse signal。下位機(jī)軟件設(shè)計(jì)中采用匯編語言編寫數(shù)據(jù)采集程序和對(duì) RS232 接口芯片進(jìn)行協(xié)議處理及數(shù)據(jù)交換的程序。摘 要智能家居安防系統(tǒng)是利用計(jì)算機(jī)技術(shù)、微電子技術(shù)、通信技術(shù),通過家庭智能終端及其系統(tǒng)軟件將家庭智能化的所有功能集成起來實(shí)現(xiàn)居家安全防范。詳細(xì)討論了以單片機(jī) AT89S52 為控制核心、MQ306A 集成可燃?xì)怏w傳感器、采用 RS232 接口通信、ADC0809 模數(shù)轉(zhuǎn)換進(jìn)行數(shù)據(jù)傳輸?shù)闹悄芗揖影卜老到y(tǒng)初步構(gòu)建的設(shè)計(jì)方案。針對(duì)在系統(tǒng)調(diào)試過程中出現(xiàn)的問題提出了解決方案及方法。 89S52目 錄摘要Abstract第一章 緒論 .........................................................................................................................................................1 概述 .................................................................................................................................................................1 論文目的和意義及創(chuàng)新點(diǎn) .......................................................................................................................1 智能家居安防系統(tǒng)初步構(gòu)建的意義及本課題主要的研究?jī)?nèi)容 ...............................................2 基于無線傳感器網(wǎng)絡(luò)的智能家居安防系統(tǒng)初步構(gòu)建的意義 .................................................2 本課題主要的研究?jī)?nèi)容 ........................................................................................................................2 國(guó)內(nèi)外研究現(xiàn)狀 ..........................................................................................................................................3 小結(jié) ..................................................................................................................................................................4第二章 智能家居安防系統(tǒng)整體方案設(shè)計(jì) ...............................................................................................5 智能家居安防系統(tǒng)的系統(tǒng)結(jié)構(gòu) .............................................................................................................5 系統(tǒng)設(shè)計(jì)方案 ...............................................................................................................................................6 系統(tǒng)性能指標(biāo) ...........................................................................................................................................6 系統(tǒng)設(shè)計(jì)原理 ...........................................................................................................................................6 后臺(tái)處理軟件部分所實(shí)現(xiàn)的功能 .........................................................................................................7 下位機(jī)部分所實(shí)現(xiàn)的功能 ...................................................................