【正文】
order to achieve a resolution of and 13cm of the measuring range. The following formula: d = s / 2 = (c * t) / 2. d for the measured object and measuring the distance between generator, s is the sound of the roundtrip distance, c is the speed of sound, t is the sound back and forth the time spent. On this basis, the overall design of the system program, and finally achieved through various hardware and software modules. With the relevant parts of the hardware circuit, the program flow chart. Keywords: AT89C52,Ultrasonic,Launch,Receive 鄭州鐵路職業(yè)技術(shù)學院 2022屆自考本科生畢業(yè)論文(設(shè)計) 第 3 頁 共 27 頁 引 言 超聲波測身高就是利用反射特性,通過發(fā)生器不斷發(fā)射出 40KHz超聲波遇到障礙物后反射會反射波,在通過接收器接收發(fā)射波信號,并將其轉(zhuǎn)換為電信號。 共陰極七段 LED數(shù)碼管 .......................................... 14 第五章 系統(tǒng)軟件設(shè)計 ................................................. 15 167。 設(shè)計思路 ....................................................... 4 167。 采用二極管穩(wěn)壓電路設(shè)計: .................................... 9 167。使用在空氣中效率較高的中心頻率為 40KHz 的超聲波探頭來完成發(fā)射與接收功能,用四位數(shù)字顯示以達到 1cm的分辨率和 13m的測量范圍。 下面介紹本次設(shè)計的具體實現(xiàn)方法。 167。 167。 單片機通過 引腳經(jīng)反相器來控制超聲波的發(fā)送,然后單片機不停的檢測INT0引腳,當 INT0 引 腳的電平由高電平變?yōu)榈碗娖綍r就認為超聲波已經(jīng)返回。 167。 : 在圖 中,穩(wěn)壓二極管的穩(wěn)壓值為 ,即當 D1 陰極加電壓超過 時,二極管陰極電壓就會保持 不變。 三端固定式集成穩(wěn)壓器有正穩(wěn)壓器 78XXX系列和負穩(wěn)壓器 79XXX 系列。 壓電超聲波轉(zhuǎn)換器的功能:利用壓電晶體諧振工作。 當工作時,每次只點亮一位數(shù)字進行顯示,延遲 一小段時間后再點亮下一位數(shù)字進行顯示,因為人們視覺暫留的現(xiàn)象,而感覺 4位數(shù)字同時被點亮。 167。 超聲波接收中斷程序 void main() //主函數(shù) { EA=1。 sj3=400。 bg=1。 斷點調(diào)試: 在程序中插入斷點,即為斷點調(diào)試。=0X7f。it。//m位 } void display3led(void) //數(shù)碼管顯示 { unsigned char i。 PORTD=0XFF。 SREG|=0X80。s largest virgin forest, and known for its spring and ecological environment, Arxan is marveled at by many tourists as the purest land on earth. You cannot miss out the Autumn of Arxan. It is definitely the best with brightlycolored scenery full of emotions. Autumn in the northern part of the country es earlier than the South. A September rain followed by the footprints of Autumn brings more colors to the once emerald green mountain and blooming grassland. Shutterbugs flock to see for themselves the marvel of splendid colors around the mountains and waters, many of whom have travel a long distance and even camp here only to capture a moment of the nature wonder. The silver birch turns golden, while the larch is still proudly green. You will find yourself drowned in the intoxicating red of the wild fruits as well as the glamour of flowers in full blown. And your heart will be lingering on the woods as it39。 display8led()。 //使能 T0定時溢出 } void main(void) { unsigned char i。 else if (newcount100) PORTD=0XDF。 temp=m%10。i1142。 unsigned char oldcount。 系統(tǒng)調(diào)試完后應(yīng)對測量誤差和重復一致性進行多次實驗分析,不斷優(yōu)化系統(tǒng)使其達到實際使用的測量要求。 } else timeToBuffer()。 opto=0xff。 void k3cl()。 超聲波發(fā) 射 子程序和接收中斷程序 設(shè)計 超聲波發(fā) 射 子程序的作用是通過 端口發(fā)送 2 個左右的超聲波信號頻率約40KHz的方波,脈沖寬度為 12us左右,同時把計數(shù)器 T0打開進行計時。適當更改電容 C4的大小,可以改變接收電路的靈敏度和抗干擾力。顯示電路采用簡單實用的 4位共陽 LED數(shù) 碼管,段碼用 74LS245驅(qū)動,位碼用 PNP三極管驅(qū)動。溫度范圍為 0176。 電源變壓器將電網(wǎng)提供的交流電壓變換到電子線路所需的交流電壓范圍,同時還可起到直流電源與電網(wǎng)的隔離作用,可升壓也可降壓。 該電路主要用電磁式輸出與輸入振蕩電路,所輸入的信號經(jīng)過放大,直接發(fā)送到單片機 AT89C52單片機進行處理,通過編程可以進行自動控制。 由單片機系統(tǒng)及顯示電路、超聲波發(fā)射電路和超聲波檢測接收電路三部分組成。 同時可以 修改超聲波發(fā)生子程序每次發(fā)送的脈沖寬度和兩次測量的間隔時間,以適應(yīng)不同距離的測量需要。 超聲波的接收與處理 接收頭采用與發(fā)射頭配對的 UCM40R,將超聲波調(diào)制脈沖變?yōu)榻蛔冸妷盒盘?,?jīng)運算放大器 IC1A 和 IC1B 兩極放大后加至 IC2。 單片機一般由中央處理器 CUP、存儲器和輸入輸出 I/O 組成。 程序調(diào)試與分析 ................................................. 19 參考文獻 .... .......................................................... 20 附 錄 ................................................................. 21 附錄 A 主要原理圖 ................................................... 21 附錄 B 產(chǎn)品及市場成品圖 ............................................. 21 附錄 C C語言程序 .................................................... 22 鄭州鐵路職業(yè)技術(shù)學院 2022屆自考本科生畢業(yè)論文(設(shè)計) 第 1 頁 共 27 頁 超聲波身高測量儀 摘 要 :論文首先介紹了超聲波測 身高 的基本原理,隨后對幾種可性的方案進行了方案論證,確定最后的設(shè)計方案,并對整個的設(shè)計方案作了詳細的介紹。 傳感器設(shè)計的方案選擇 ........................................... 8 167。 設(shè)計思路總結(jié) ................................................ 5 第二章 設(shè)計原理及設(shè)計框圖 ............................................ 6 167。 超聲波發(fā)射子程序 .......................................... 16 167。 超聲波檢測往往比較迅速、方便 、計算簡單、易于做到實時控制由于超聲波指向性強 ,能量消耗緩慢, 在介質(zhì)中傳播的距離較遠,因而超聲波經(jīng)常用于距離的測量,況且它適合與高溫,高粉塵,高濕度和高強電磁干擾等惡劣環(huán)境下工作。為了以超聲波作為檢測手段,必須產(chǎn)生超聲 波和接收超聲波。 根據(jù)測量范圍要求不同,可適當調(diào)整與接收換能器并接的濾波電容的大小,以獲得合適的接收靈敏度和抗干擾能力。 鄭州鐵路職業(yè)技術(shù)學院 2022屆自考本科生畢業(yè)論文(設(shè)計) 第 6 頁 共 27 頁 第二章 設(shè)計原理及設(shè)計框圖 167。 167。 167。而三端集成穩(wěn)壓器又是集成穩(wěn)壓器最常用的一種。 單片機系統(tǒng)及顯示電路 單片機采用 AT89C52或其兼容系列。 這是一款紅外線檢波接收的專用芯片,常用于電視機紅外遙控接收器。由于采用 12MHz 的晶振,機器周期為 1us,當主程序檢測到接收成功的標志位后,將計數(shù)器 T0 中的數(shù)(即超聲波來回所用的時間)按下式計算即可測得被測物體與測距儀之間的距離 ,設(shè)計時取 20℃ 時的聲速為 344m/s 則有: d=(C*T0)/2=172T0/10000cm(其中 T0為計數(shù)器 T0的計數(shù)值) 。 //顯示轉(zhuǎn)換函數(shù) void keyscan()。 csbint=1。 buffer[1]=0x40。 三. 硬件電路制作完成并調(diào)試好后,便可將程序編譯好下載到單片機試運行。//七段譯碼字型表 (m) pragma data:data //設(shè)定數(shù)據(jù)區(qū)回到數(shù)據(jù)存儲器 unsigned char ledbuff[]={0X08,0X28,0X28}。i++) delay_1us()。 temp=m%10。 else if (newcount30) PORTD=0XFB。 TCCR1A=0X00。i20。 Festival. In this day, girls will throw a sewing needle into a bowl full of water on the night of Qixi as a test of embroidery skills. If the needle floats on top of the water instead of sinking, it proves the girl is a skilled embroiders. Single women also pray for finding a good husband in the future. And the newly married women pray to bee pregnant quickly. Tradition transformed The love story of Niulang and Zhinu, and the Qixi Festival have been handed down for generations. Yet these ancient traditions and customs are slowly dying out. Many modern Chinese, particularly youngsters, seem to know more about St Valentine39。 delay_us(20)。 DDRB=0XFE。i++) { PORTD=ledbuff。 TIMSKamp。 TCNT1=0。經(jīng)過思考與多次調(diào)試,錯鄭州鐵路職業(yè)技術(shù)