【正文】
nal adoption of hardware and software to achieve the various functional modules. The relevant parts have the hardware schematics and process flow has given the system constitution, the circuitry and the programming. The instrument system has features: ease of control, stability of operation, highness of precision and distinctness of programme process ,etc. After the realization of the works can be used for needs of the various parameters measured distance applications. Keywords:AT89C51。實(shí)現(xiàn)后的作品可用于需要測(cè)量距離參數(shù)的各種應(yīng)用場合。相關(guān)部分附有硬件電路圖、程序流程圖,給出了系統(tǒng)構(gòu)成、電路原理及程序設(shè)計(jì)。各探頭的信號(hào)經(jīng)單片機(jī)綜合分析處理,實(shí)現(xiàn) 超聲波測(cè)距儀 的各種功能。 并且在數(shù)據(jù)處理中采用了溫度補(bǔ)償?shù)恼{(diào)整,用四位 LED 數(shù)碼管切換顯示距離和溫度。為此,深入研究超聲波的產(chǎn)生與傳播規(guī)律、開發(fā)高性能超聲波換能器及其收發(fā)電路,對(duì)于超聲波檢測(cè)技術(shù)的發(fā)展具有十分重要的現(xiàn)實(shí)意義。 I 摘 要 在空氣介質(zhì)中,超聲測(cè)距傳感器因其性能好,價(jià)格低廉、使用方便,在現(xiàn)場機(jī)器人定位系統(tǒng)、車輛自動(dòng)導(dǎo)航、車輛安全行駛輔助系統(tǒng)、城市交通管理和高速公路管理監(jiān)測(cè)系統(tǒng),以及河道、油井和倉庫及料位的探測(cè)中都有應(yīng)用。由于超聲波傳播不易受干擾,能量消耗緩慢,在介質(zhì)中傳播的距離較遠(yuǎn),因而超聲波經(jīng)常用于距離的測(cè)量,如測(cè)距儀和物位測(cè)量儀等都可以通過超聲波來實(shí)現(xiàn)。 本設(shè)計(jì)介紹了 基于 單片機(jī)控制的超聲測(cè)距 儀的原理 : 由 AT89C51 控 制定時(shí)器產(chǎn)生超聲波脈沖并計(jì)時(shí),計(jì)算超聲波自發(fā)射至接收的往返時(shí)間,從而得到實(shí)測(cè)距離。 整個(gè) 硬件 電路由超聲波發(fā)射電路、超聲波接收電路、電源電路、顯示電路等模塊組成。在此基礎(chǔ)上設(shè)計(jì)了系統(tǒng)的總體方案,最后通過硬件和軟件實(shí)現(xiàn)了各個(gè)功能模塊。此系統(tǒng)具有易控制、工作可靠、測(cè)距準(zhǔn)確度高、可 讀性強(qiáng)和流程清晰等優(yōu)點(diǎn)。 關(guān)鍵詞: AT89C51; 超聲波 ; 測(cè)距 ; 電路 II Abstract The features of the good performance,low cost, easy use are inearnated in the ultrasonic distance measurement ultrasonic distance measurement sensor is usually used at thescene robot positioning system, automatic vehicle navigation, the safety of vehicles traveling support system, the uran traffic management and the highway management monitoring system,as well as the detect in rivers, oil wells, storages and ultrasonic wave transmssion is not easy todisturb, its energy consumption is slowly and it can be transmitted distantly in the medium, so it isfrequently used in ultrasonic distance example, the range finder and the materiallevel finder can be aehieved by ultrasonic , the indepth study of the generationand transmission law of ultrasonic and the development of highperformance ultrasonic sensor andtransmit and receive circuits is of great practical significance in the development of ultrasonicdetection technology. The design introduces the principle of the ultrasonic distance measurement instrument based on SCMCcontrolled: AT89C51 controls timers to produce the ultrasonic wave pulse and time,count the time of ultrasonic wave spontaneous emission to receive roundtrip,thus obtains the measured the temperature pensation adjustment is used in the data processing, with four LED nixie tubes display distance or temperature by switching. The entire hardware circuit is posed by ultrasonic transmitter circuit, ultrasonic receiver circuit, the power circuit, display circuit, and other modules. The probe signals are integrated analysised by SCMC to achieve the various functions of ultrasonic distance measurement instrument. Based on this has designed system39。 Ultrasonic wave。 circuit III 目 錄 摘 要 ...................................................I Abstract ..................................................II 1 緒論 .....................................................1 課題研究的背景 ........................................1 課題的提出及研究意義 ..................................2 課題的提出 .......................................2 課題的研究意義 ...................................2 2 超聲波的介紹及超聲波測(cè)距的原理 ..............................3 超聲波的介紹 .........................................3 什么是超聲波 .....................................3 ................................3 .....................................4 超聲波測(cè)距的原理及誤差分析 .............................5 超聲波測(cè)距的原理 .................................5 超聲波測(cè)距誤差分析 ...............................5 單片機(jī)實(shí)現(xiàn)測(cè)距的原理 ..................................6 3 系統(tǒng)硬件設(shè)計(jì) ..............................................7 系統(tǒng)結(jié)構(gòu)設(shè)計(jì) .........................................7 AT89C51 單片機(jī)簡介 ....................................8 AT89C51 單片機(jī)的功能 ..............................8 AT89C51 單片機(jī)主要特性 ............................9 IV AT89C51 管腳說明 ..................................9 DS18B20 溫度傳感器簡介 ................................11 T R40超聲波傳感器簡介 .............................12 超聲波傳感器的基本介紹 ...........................12 超聲波傳感器的主要應(yīng)用 ...........................12 超聲波傳感器的工作原理 ...........................13 LM7805 端穩(wěn)壓集成電路 .................................14 LM7805 介紹 .....................................14 LM7805 的特點(diǎn) ...................................14 LM7805 的實(shí)際應(yīng)用 ................................14 LM567 鎖相環(huán) .........................................15 LM567 的概述 ....................................15 LM567 的功能敘述 .................................15 LM567 主要參數(shù) ..................................15 超聲波發(fā)射器電路 .....................................16 超聲波檢測(cè)接受電路 ...................................17 顯示電路 ............................................18 LM7805 電平轉(zhuǎn)換電路 ..................................19 AT89C51 復(fù)位電路 ....................................20 4 系統(tǒng)軟件設(shè)計(jì) .............................................21 主程序流程 ..........................................21 子程序設(shè)計(jì) ..........................................23 V .............23 ......................................25 ..................................26 5 總結(jié) ....................................................27 致 謝 ..................................................28 參考文獻(xiàn) ..................................................29 附錄 A 國外相關(guān)文章 .........................................30 附錄 B 中文翻譯 .............................................33 附錄 C 超聲波測(cè)距電路原理圖 ..................................35 附錄 D 程序清單 .............................................36 江西理工大學(xué)應(yīng)用科學(xué)學(xué)院畢業(yè)設(shè)計(jì) 1 1 緒論 課題研究的背景 利用超聲波測(cè)量已知標(biāo)準(zhǔn)位置與目標(biāo)物體表面之 間距離的方法叫做超聲波測(cè)距法。 從技術(shù)上看,超聲波測(cè)距系統(tǒng)在上個(gè)世紀(jì) 70 年代已經(jīng)實(shí)用化,從 70 年代