【正文】
上海電力學(xué)院 本科 畢業(yè)設(shè)計 ( 論 文) 題 目: 超聲波測距器的設(shè)計 院 系: 計算機(jī)與信息工程學(xué)院 專業(yè)年級: 電子科學(xué)與技術(shù)專業(yè) 07 級 學(xué)生姓名: 學(xué)號: 20202703 指導(dǎo)教師: 2020 年 5 月 29 日 I 超聲波測距器的設(shè)計 摘要 隨著科技的發(fā)展,人們生活水平的提高,城市發(fā)展建設(shè)加快,城市給排水系統(tǒng)也有較大發(fā)展,其狀況不斷改善。但是,由于 歷史原因合成時間住的許多不可預(yù)見因素,城市給排水系統(tǒng),特別是排水系統(tǒng)往往落后于城市建設(shè)。因此,經(jīng)常出現(xiàn)開挖已經(jīng)建設(shè)好的建筑設(shè)施來改造排水系統(tǒng)的現(xiàn)象。城市污水給人們帶來了困擾,因此箱涵的排污疏通對大城市給排水系統(tǒng)污水處理,人們生活舒適顯得非常重要。而設(shè)計研制箱涵排水疏通移動機(jī)器人的自動控制系統(tǒng),保證機(jī)器人在箱涵中自由排污疏通,是箱涵排污疏通機(jī)器人的設(shè)計研制的核心部分。控制系統(tǒng)核心部分就是超聲波測距儀的研制。 因此,設(shè)計好的 超聲波測距儀 就顯得非常重要了。 本設(shè)計采用 以 AT89C52 單片機(jī)為核心的低成本、高 精度、微型化數(shù)字顯示超聲波測距儀的硬件電路和軟件設(shè)計方法。 整個電路采用模塊化設(shè)計,由主程序、預(yù)置子程序、發(fā)射子程序、接收子程序、顯示子程序等模塊組成。 各探頭的信號經(jīng)單片機(jī)綜合分析處理,實(shí)現(xiàn) 超聲波測距儀 的各種 功能。 在此基礎(chǔ)上設(shè)計了系統(tǒng)的總體方案,最后通過硬件和軟件實(shí)現(xiàn)了各個功能模塊。相關(guān)部分附有硬件電路圖、程序流程圖。 關(guān)鍵詞: AT89c52 超聲波 測距 II The design of ultrasonic wave range finder Abstract With the development of science and technology, the improvement of people39。s standard of living, speeding up the development and construction of the city. urban drainage system have greatly developed their situation is constantly improving. However, due to historical reasons many unpredictable factors in the synthesis of her time, the city drainage system. In particular drainage system often lags behind urban construction. Therefore, there are often good building excavation has been building facilities to upgrade the drainage system phenomenon. It brought to the city sewage, and it is clear to the city sewage and drainage culvert in the sewage treatment system. fort is very important to people39。s lives. Mobile robots designed to clear the drainage culvert and the automatic control system Free sewage culvert clear guarantee robot, the robot is designed to clear the culvert sewage to the core. Control System is the core ponent of the development of ultrasonic range finder. Therefore, it is very important to design a good ultrasonic range finder. At the core of the design using AT89C52 lowcost, high accuracy, Micro figures show that the ultrasonic range finder hardware and software design methods. Modular design of the whole circuit from the main program, pre subroutine fired subroutine receive subroutine. display subroutine modules form. SCM prehensive analysis of the probe signal processing, and the ultrasonic range finder function. On the basis of the overall system design, hardware and software by the end of each module. Key words: AT89S52 Ultrasonic measurement III 目 錄 1 引 言 ........................................................................................................................ 1 有關(guān)于超聲波的簡單介紹 .............................................................................. 1 超聲波研究的發(fā)展 ................................................................................ 1 超聲波的應(yīng)用領(lǐng)域 ................................................................................. 2 幾種測距方法介紹 ................................................................................ 3 課題設(shè)計的任務(wù)和要求 ................................................................................... 4 2 方案選擇的論證和選擇 ............................................................................................ 4 設(shè)計方案一:采用單片機(jī)來控制的超聲波測距儀 ...................................... 4 設(shè)計方案二: 采用 CPLD 來控制的超聲波測距儀 ..................................... 5 方案設(shè)計三:采用鎖相環(huán)頻率合成技術(shù) ..................................................... 6 測距儀的設(shè)計思路 .......................................................................................... 6 超聲波測距原理 ..................................................................................... 6 超聲波測距儀原理框圖 ......................................................................... 7 3 系統(tǒng)的硬件設(shè)計 .................................................................................................... 7 系統(tǒng)的硬件總體設(shè)計 ..................................................................................... 7 發(fā)射傳感器觸發(fā) ..................................................................................... 8 發(fā)射傳感器驅(qū)動 ..................................................................................... 8 超聲波的衰減 ......................................................................................... 8 接收信號處理 ......................................................................................... 9 數(shù)碼管驅(qū)動顯示 .................................................................................... 9 所用主要元器 件簡介 ..................................................................................... 9 AT89s52 單片機(jī) ..................................................................................... 9 數(shù)碼管驅(qū)動 ........................................................................................... 11 74HC573 ............................................................................................... 14 HCSR04 超聲波測距模塊 .................................................................. 15 4 系統(tǒng)的軟件設(shè)計 .................................................................................................... 16 主程序 流程圖 ............................................................................................... 17 測距子程序流程圖 ....................................................................................... 18 主要程序 ....................................................................................................... 18 5 PCB 板的制作 .......................................................................................................... 25 PCB 簡介 ....................................................................................................... 25 印制電路板設(shè)計的一般步驟 ....................................................................... 27 制作元器件和建立元器件庫 ....................................................................... 27 元器件的位置調(diào)整和布線 ...................................................