【正文】
e 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)整和布線 ........................................................................... 29 PCB 板的層 ................................................................................................... 31 IV PCB 板的布局 ............................................................................................... 32 PCB 板布線 ................................................................................................... 32 6 電路調(diào)試 .................................................................................................................. 33 元件的焊接要點 ........................................................................................... 33 外圍按鍵電路焊接與測試 ........................................................................... 34 7 系統(tǒng)測試結(jié)果及誤差分析 ...................................................................................... 34 謝 辭 .......................................................................................................................... 37 附 錄 .......................................................................................................................... 39 1 1 引 言 超聲波是指頻率在 20kHz 以上的聲波,它屬于機(jī)械波的范疇。 在此基礎(chǔ)上設(shè)計了系統(tǒng)的總體方案,最后通過硬件和軟件實現(xiàn)了各個功能模塊。 因此,設(shè)計好的 超聲波測距儀 就顯得非常重要了。因此,經(jīng)常出現(xiàn)開挖已經(jīng)建設(shè)好的建筑設(shè)施來改造排水系統(tǒng)的現(xiàn)象。但是,由于 歷史原因合成時間住的許多不可預(yù)見因素,城市給排水系統(tǒng),特別是排水系統(tǒng)往往落后于城市建設(shè)??刂葡到y(tǒng)核心部分就是超聲波測距儀的研制。 各探頭的信號經(jīng)單片機(jī)綜合分析處理,實現(xiàn) 超聲波測距儀 的各種 功能。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