【正文】
在已經(jīng)很普及,而且GSM短信廉價(jià),實(shí)現(xiàn)簡(jiǎn)單,實(shí)現(xiàn)超遠(yuǎn)距離報(bào)警。但綜合分析:方案一,軟件的編寫方面比較容易理解、實(shí)現(xiàn)。 圖一 圖二 比較方案一與方案二,兩者有很多相似之處,兩個(gè)設(shè)計(jì)都運(yùn)用到了單片機(jī),用到了同一類型的傳感器。即可求得距離。因本系統(tǒng)測(cè)距精度要求很高,所以通過(guò)對(duì)溫度的檢測(cè)對(duì)超聲波的傳播速度加以校正。超聲波測(cè)距是通過(guò)不斷檢測(cè)超聲波發(fā)射后遇到障礙物所反射的回波,從而測(cè)出發(fā)射和接收回波的時(shí)間差T,然后求出距離S=CT/2,式中的C為超聲波波速。溫度(℃)3020100 102030100聲速(米/秒)313319325323338344349386 表一方案一 根據(jù)設(shè)計(jì)要求綜合各方面的因素,可采用AT89S52單片機(jī)作為主控器,用模擬SPI驅(qū)動(dòng)諾基亞5110液晶顯示屏,實(shí)時(shí)顯示數(shù)據(jù),超聲波驅(qū)動(dòng)信號(hào)用單片機(jī)的定時(shí)器完成,同時(shí),我們通過(guò)串口發(fā)送AT指令控制GSM模塊實(shí)現(xiàn)了短信報(bào)警。聲速確定后,只要測(cè)的超聲波往返的時(shí)間,既可求得距離。 由于超聲波也是一種聲波,其聲速C與溫度有關(guān),表一列出了幾種不同溫度下的聲速。給出了系統(tǒng)的硬件原理圖和軟件原理圖。其原理是:?jiǎn)纹瑱C(jī)發(fā)出的超聲波,通過(guò)換能器發(fā)射出去,遇到被測(cè)物體后翻身回來(lái),計(jì)算此超聲波從發(fā)射出道接受的時(shí)間差從而得出被測(cè)物體到測(cè)距儀的距離,并通過(guò)GSM模塊實(shí)現(xiàn)短信報(bào)警。時(shí)間:周一晚上 組號(hào):8 創(chuàng)新性實(shí)驗(yàn)報(bào)告題 目超聲波測(cè)距報(bào)警系統(tǒng)設(shè)計(jì)學(xué) 院電子信息學(xué)院專 業(yè)電子信息工程班 級(jí)08041812學(xué) 號(hào)08041832 08041948 08041906學(xué)生姓名 吳思 徐旭東 張翠翠指導(dǎo)教師劉公致完成日期2010年11月 摘要 本文詳細(xì)介紹了一種基于單片機(jī)的超聲測(cè)距系統(tǒng)。該系統(tǒng)以空氣中超聲波的傳播速度為確定條件,利用反射超聲波測(cè)量待測(cè)距離。針對(duì)測(cè)距系統(tǒng)發(fā)射、接受、檢測(cè)、顯示部分的總體設(shè)計(jì)方案做了論證。 The Design of System for Ultrasonic Distance Measurement Using MCU AbstractThe thesis introduces a kind of singlepulsereflection ultrasonic distance meter system in detail based on single chip system could measure certain distance on the premise that the speed of reflected wave in the air is on the study of single chip processor,this paper summarizes the development and fundamental principle of ultrasonic it presents the theory and characters of ultrasonic ,it proposes the whole structure of the system by introducing the function of ultrasonic distance this paper introduces the principle of distancemeasuringdevice which is designed with the single chip PProcessor of principle is based on the ultrasonic measure which is calculated by the time used by ultrasonic traveling from the target,we also .And then the transmission,receiver,detection,display scheme of this distance meter system are brought paper presents the design of the Circuit and debug of the ultrasonic distance sensor.Key words:singlechip processor,ultrasonic,distance measurement,GSM 總體方案設(shè)計(jì) 超聲波測(cè)距是通過(guò)不斷檢測(cè)超聲波發(fā)射后遇到障礙物所反射的回波,從而測(cè)出發(fā)射與接收回波的時(shí)間差t,然后求出距離S=Ct/2,式中的C為超聲波波速。在使用時(shí),如果溫度變化不大,則可以認(rèn)為聲速基本不變的,如果測(cè)距精度要求很高,則應(yīng)通過(guò)溫度補(bǔ)償?shù)姆椒右孕U_@就是超聲波測(cè)距儀的機(jī)理。超聲波測(cè)距器的系統(tǒng)框圖如下:方案二 本設(shè)計(jì)的整體框圖如下圖一所示,主要由超聲波發(fā)射,超聲波接受與信號(hào)轉(zhuǎn)換,按鍵顯示電路與溫度傳感器電路組成。在常溫下,空氣中的聲速約為340m/,其傳播速度C與溫度有關(guān),在使用時(shí),如果溫度變化不大,則可認(rèn)為聲速是基本不變的。超聲波傳播速度確定后,只要測(cè)的超聲波往返的時(shí)間,如圖下圖二波形所示。這就是超聲波測(cè)距系統(tǒng)的基本原理。運(yùn)用了LCD顯示。而方案二的軟件部分與方案一比較,就略顯