【正文】
在軟件的編程過(guò)程中,要一步就實(shí)現(xiàn)整個(gè)系統(tǒng)的功能是有困難的,只有逐步實(shí)現(xiàn)各個(gè)功能,然后進(jìn)行組合,才能方便實(shí)現(xiàn)整個(gè)功能。多數(shù)光電管選用的是波長(zhǎng)接近可見(jiàn)光的紅外線光波型。其工作指令如下程序: sfr WDTRST = 0xA6 _nop_()。定時(shí)器中斷有輸出時(shí),打開(kāi)內(nèi)部計(jì)數(shù)器來(lái)記錄紅外被遮擋的時(shí)間。共用 4個(gè)函數(shù)來(lái)完成。主程序的流程圖如圖 42所示。當(dāng)遙控器的 B 鍵按下,則有正常工作狀態(tài)轉(zhuǎn)入待機(jī)工作狀態(tài)。為了降低對(duì)端口的使用量,這里使用動(dòng)態(tài)顯示的方式。發(fā)光二極管的驅(qū)動(dòng)電流為幾十毫安,本電路發(fā)光二極管的動(dòng)態(tài)電流為: I=5V/500=10mA,大小適合發(fā)光二極管的驅(qū)動(dòng)。 (1)溫度傳感器: 40 攝氏度以上為達(dá)到報(bào)警條件,以下為未達(dá)到報(bào)警條件; (2)紅外傳感器:紅外被遮擋 5 秒以上為達(dá)到報(bào)警條件,以下為未達(dá)到報(bào)警條件。當(dāng)中間過(guò)程出現(xiàn)死機(jī)或者死循環(huán)時(shí),可用按鈕進(jìn)行復(fù)位。振蕩頻率主要由石英晶振的頻率決定,一般在 ~ 16MHz 之間,典型值為 12 MHz 和 MHz,在本設(shè)計(jì)中選用石英晶振的頻率為 12 MHz。每一個(gè)引腳可以推動(dòng) 4 個(gè) LSTL 負(fù)載。訪 問(wèn)外部程序存儲(chǔ)器選通信號(hào),低電平有效。當(dāng)訪問(wèn)外部存儲(chǔ)器時(shí), ALE 信號(hào)負(fù)跳變來(lái)觸發(fā)外部的 8 位鎖存器 (如 74LS373),將端口 P0 的地址總線 (A0~A7)鎖存進(jìn)入鎖存器中。 XTAL1: 接外部晶振的一個(gè)引腳。 ⑦電源關(guān)閉標(biāo)識(shí)。如應(yīng)用系統(tǒng)比較復(fù)雜,運(yùn)算功能較強(qiáng),處理粘度高,運(yùn)算速度快,則采用 16 位單片微機(jī)。數(shù)據(jù)碼在無(wú)線報(bào)警網(wǎng)中主要的作用是區(qū)別不同的無(wú)線探頭,最多可以區(qū)分 16 個(gè),有些主機(jī)出于成本和實(shí)用性的考慮,只用了其中的 8 個(gè),表示 8 路報(bào)警通道。 PT2262 發(fā)射模塊的原理圖如 圖 33所示。對(duì)射型和反射板型光電傳感器是在光線遮住的時(shí)候,輸出接通 。 ( 3)術(shù)語(yǔ) a、距離滯后:指的是測(cè)量板接近或者移去時(shí)開(kāi)關(guān)偏移的距離。它的檢測(cè)距離可達(dá)幾米乃至幾十米。此外,光電傳感器的結(jié)構(gòu)元件中還有發(fā)射板和光導(dǎo)纖維。多數(shù)光電管選用的是波長(zhǎng)接近可見(jiàn)光的紅外線光波型。 D、在 DS18B20 測(cè)溫程序設(shè)計(jì)中,向 DS18B20 發(fā)出溫度轉(zhuǎn)換命令后,程序總要等待DS18B20 的返回信號(hào),一旦某個(gè) DS18B20 接觸不好或斷線,當(dāng)程序讀該 DS18B20 時(shí),將沒(méi) 10 有 返回信號(hào),程序進(jìn)入死循環(huán)。 圖 32 DS18B20 的引腳排列圖 B、在 DS18B20 的有關(guān)資料中均未提及單總線上所掛 DS18B20 數(shù)量問(wèn)題,容易使 人誤認(rèn)為可以掛任意多個(gè) DS18B20,在實(shí)際應(yīng)用中并非如此。本次設(shè)計(jì)選用 9 位的 DS18B20,溫度值本應(yīng)為 9位(其中,符號(hào)位占一位),但因符號(hào)位又被擴(kuò)展成高 8位,故實(shí)際以 16 位補(bǔ)碼的形式讀出。以上特點(diǎn)使 DS18B20 非常適用于遠(yuǎn)距離多點(diǎn)溫度檢測(cè)系統(tǒng)。物體不限于金屬,所有能反射光線的物體均可被檢測(cè)。靜態(tài)顯示就是數(shù)碼管的 8段輸入及其公共端電平 一直有效。有兩種類型,一種是共陽(yáng)型,一種是共陰型。 1 2 3 4 5 6ABCD654321DCBAT i t l eN um be r R e v i s i onS i z eBD a t e : 13 N ov 20xx S he e t o f F i l e : F : \ B us i ne s s \產(chǎn)品 \報(bào)警器 1\ M yD e s i D r a w n B y:A BC DABCD溫 度紅 外報(bào) 警 電 路遙 控接 收 器遙 控 器S T C 89C 52控 制 電 路指 示 電 路顯 示 電 路 圖 21 報(bào)警器原理框圖 每個(gè)模塊簡(jiǎn)單介紹 遙控器 遙控器是一種用來(lái)遠(yuǎn)控機(jī)械的裝置。通過(guò)遙控器來(lái)完成報(bào)警器的打開(kāi)與關(guān)閉,當(dāng)遙控器處于打開(kāi)狀態(tài)時(shí)再來(lái)判斷溫度值和紅外值。為了使報(bào)警器的功能更加 全面,現(xiàn)如今的報(bào)警器增加了區(qū)域管理、語(yǔ)音提醒、生物 2 識(shí)別技術(shù)、報(bào)警自動(dòng)發(fā)彩信圖片、遠(yuǎn)程控制等技術(shù)。 溫度是日常生活中所經(jīng)常遇到的一個(gè)變量,能測(cè)量溫度值的傳感器有很多種,對(duì)溫度的測(cè)量也是很多報(bào)警器必備的功能之一。對(duì)于不同場(chǎng)合的或者是不同信號(hào)的感知可以完成特定的報(bào)警工作。報(bào)警器開(kāi)啟之后,同時(shí)監(jiān)測(cè)紅外信號(hào)和溫度信號(hào),兩個(gè)信號(hào)中有一個(gè)達(dá) 到閾值則開(kāi)始報(bào)警。特別是火災(zāi)報(bào)警設(shè)備中,溫度信號(hào)是必不可少的一個(gè)值。本文通過(guò)對(duì)幾種報(bào)警器的功能以及實(shí)際情況分析,設(shè)計(jì)了一種安全、實(shí)用、方便控制的報(bào)警器。 本文首先闡述了報(bào)警器的研究狀況和發(fā)展現(xiàn)狀,以及不同類型報(bào)警器的優(yōu)點(diǎn)和當(dāng)前的普及程度。對(duì)于具體的實(shí) 物或是環(huán)境,溫度往往是一個(gè)最直觀的數(shù)據(jù),通過(guò)對(duì)溫度值的監(jiān)測(cè)可以對(duì)現(xiàn)場(chǎng)情況做趨勢(shì)的研判,對(duì)后續(xù)的操作提供一定的依據(jù)。 關(guān)鍵字: 報(bào)警器;遙控;紅外;溫度 Remote Control Digital Display System Based on Single Chip Microputer ABSTRACT In recent years, alarm detects more and more signal types and requires more intelligence in order to meet the convenience of human life needs. Alarm can sense infrared signal, ultrasonic signal, gravity signal, vibration signal and remote control signals. This paper designs a safe, practical and convenient burglar alarm on the analysis of several mon alarm functions and the actual situation. This paper describes the research and development of the alarm, the advantages and the disadvantages of several different alarms and theirs popularity. The paper also analyzes the detection principles and the physical mechanisms of the popular alarms. And this paper chooses remote control signal, infrared signal and temperature signal as the detection signals. Infrared technology is a very mature technology and human eyes can not see infrared light. It can be used under different weather conditions with good concealment, and strong antiinterference ability. This kind of antitheft alarm system is widely used in homes, offices and other occasions. This design uses infrared signal as a detection signal. Temperature signal is most monly used in daily life and used in most warning systems. Particularly, temperature signal is an essential signal in the fire alarm device. Temperature signal is one of the most intuitive parameters in the specific environment. It can be monitored to judge the spot situation in order to provide the basis for subsequent operations. Remote control technology is highly attention with the development of the intelligent alarm. Remote control technology can control and monitor remote object. Remote control technology can not only control remote alarm equipment, but also monitor the basic situation of the terminal. It is used in alarm system because of the maturity of such technology. This antitheft alarm system selects the remote control signal, the infrared signal and the temperature signal as monitoring signals. Remote control signal is used to remotely control the alarm on and off. The infrared signal and the temperature signal were monitored at the same time after the opening of the alarm. The alarm was triggered when any of these signal reach its threshold. Keywords: alarm; remote control; infrared; temperature I 目 錄 第 1 章 緒 論 .............................................................. II 課題背景及研究意義 ................................................. 1 遙控?cái)?shù)顯控制系統(tǒng)的發(fā)展概況 ......................................... 1 本課題研究的主要內(nèi)容 ............................................... 2 第 2 章 遙控?cái)?shù)顯控制系統(tǒng)的總結(jié) ............................................... 3 原理介紹 ........................................................... 3 每個(gè)模塊簡(jiǎn)單介紹 .................................................... 3 遙控器 ......................................................... 3 遙控接收器 ..................................................... 4 顯示電路 ....................................................... 4 溫度傳感器 ..................................................... 4 第 3 章 遙控?cái)?shù)顯控制系統(tǒng)硬件設(shè)計(jì) ............................................. 6 總硬件原理圖 ......................................................... 6 傳感器的選型和特點(diǎn) ................................................. 6 溫度傳感器的特點(diǎn) ............................................... 7 紅外對(duì)管傳感器的特點(diǎn) ..