【正文】
用。 用超聲來測距是不需要測試者接觸被檢測物,不受天氣等其他不利因素的影響,特別適合一線工人不用直接待在潮濕陰暗、粉塵多、高溫暴曬、散發(fā)腐蝕氣體等惡劣環(huán)境中就可以開展測距工作,加上它本身能夠做到無污染、使用簡單方便及后期不用進行什么維護。為了考驗自己能否可以將學(xué)習(xí)過的理論知識和實踐結(jié)合到一起,我選擇了設(shè)計51單片機電路利用超聲波測距作為了本科畢業(yè)設(shè)計論文。 ranging。 at the same time, with the development of science and technology of anticollision alarm technology will be used in the future intelligent vehicle to flex its muscles in their own car, important applications such as shortening the safe driving distance between vehicles, unmanned autonomous safe overtaking, high speed and so on.Key words: ultrasonic。關(guān)鍵詞:超聲波;單片機;測距;報警裝置Design of ultrasonic range finder based on 51 SCMAbstract The frequency of ultrasound exceeds the human auditory range above 20khz, which have the advantages of highly directive, energy consumption is slow ,long distance transmission and follow the propagation tendency of general mechanical wave in the elasticmedium, so that the application of ultrasonic range finder bee more and more widely. For example, ultrasonic frequency are applied to anticollision alarm and reversing radar. This paper mainly introduces the development of the circuit around the 51 singlechip, and designs the relevant range finder with the principle of ultrasonic. This design first clear principle and method of ultrasonic ranging, and then use the SCM related hardware and software circuit design, the hardware part is posed of a power supply circuit, MCU interface circuit and ultrasonic transmitting circuit, receiving circuit and digital display circuit, alarm buzzer circuit, reset circuit and oscillator circuit。本設(shè)計先明確超聲波的原理和測距的方法,再運用單片機設(shè)計相關(guān)硬件和軟件電路,其中硬件部分由電源電路、單片機接口電路和超聲波發(fā)射電路、超聲波接收電路與數(shù)碼管顯示電路、報警蜂鳴器電路、復(fù)位電路和晶振電路組成;軟件部分主要是保障系統(tǒng)的運行,最重要的組成部分為系統(tǒng)主程序、報警和顯示器子程序、超聲波發(fā)射和接受的中斷程序等。目 錄插圖清單 I表格清單 II摘 要 IIIAbstract IV第1章 緒論 1 1 1 1 第2章 測距系統(tǒng)的超聲波原理與方法 2 2 2 3 第3章 超聲波測距系統(tǒng)硬件電路的設(shè)計 4 4 5 5 6 7 8 第4章 系統(tǒng)軟件程序的設(shè)計 9 9 10 10 10 第5章 結(jié)論 12 參考文獻 13 致謝 14 附錄 15 附錄一 系統(tǒng)焊接圖 15 附錄二 系統(tǒng)實物圖 16 附錄三 系統(tǒng)主程序 17 插圖清單圖2 1 超聲波測試框圖 3 圖3 1 超聲波發(fā)射電路 4 圖3 2 發(fā)射與接收電路 5 圖3 3 顯示電路 6 圖3 4 蜂鳴器驅(qū)動電路圖 7 圖3 5 復(fù)位電路 8 圖3 6 晶振電路 8 圖4 1 主程序流程圖 9 圖4 2 報警子程序流程圖 10 圖4 3 顯示器子程序流程圖 10 圖4 4 按鍵子程序流程圖 11 表格清單表2 1 幾種不同溫度下的波速 2 表4 1 測試結(jié)果 12 基于51單片機超聲波測距儀的設(shè)計摘 要 由于我們不通過相關(guān)設(shè)備,僅僅憑著一雙耳朵是無法捕捉到這種神奇的聲音,因此這種頻率在20KHZ以上的傳奇,在歷史長河中等待了很久才被我們發(fā)現(xiàn)并定義為超聲波;從那一刻人們不斷的揭開了它神秘的面紗,所以我現(xiàn)在了解它有很強的方向性,經(jīng)過多次反射和折射的消耗后依然能量滿滿,傳播距離自然也比