基于at89s51单片机智能超声波测距系统原理设计论文内容摘要:

子质量,[12]. [J].电子产品世界,[13]. 葛恒清,[J].通化师范学院学报,2004 .10[14]. 周晗晓,[J].电子工艺技术,2004 .6[15]. 王丰,[J].电子产品世界,[16]. 王占操,梁厚琴,[J].电子技术,[17]. [M].武汉:武汉华中科技大学出版社,2002 .5[18]. 程继兴,[J].电子测量技术,2003,[19]. 苏伟,[J].传感器技术,[20]. Tom R. Watt .Cooling our tomorrows economically ,ASHRAE Journal.[21]. Army Kayla. Improving efficiency in existing chillers with optimization technology ,ASHRAE Journal.[22]. mutter , Eerily , , ,Refine the use of the evaporation in an experimental downdraft cool tower ,Energys .1995[23]. Artori S,ZHANG G X. Geometric Error Measurement and Compensation of Machines.Annals of the CIRP. 1995:599609[24]. Bolton W. Instrumentationamp。 process measurement. Longman Scientificamp。 Technical. 1991 Design Of Control System Of Belt Grain Dryer Student majoring in Mechanical and Automation ZhangPeipei Tutor: ChenJuan ZhouChong Abstract:This paper has presented a microcontrollerbased singlepulse reflection ultrasonic distance measuring system. The ultrasonic have strong pointing, slow enery consumed ,a far spread and so on, he ultrasonic distance measuring technology is free of light effect, and has advantages of simple structure, low costs, simple reliable information processing etc。 it also has certain adaptive capacity for measured things which are in abominable environment, such as dark, poisonous, smoggy. The whole circuit use blocking design, the paper firstly exoatiate on transducer’s truth and characteristic, regarding the range measuring system ultrasonic wave frequency, the signal pulse, the ponent models and so on the main parameter has carried on the discussion。 it is made of main formality ,seed formality, beam seed formality ,incept seed formality, vision seed formality and so on , singlepulse deal with signal with colligation analyse ,carry on ultrasonic measure. and in the foundation of introducing ultrasonic distance measuring system functions, the total system constitution was proposed and hardware design proposal of the system launching, receiving, examination and displaying modules are demonstrated. According to the system requests, the system the algorithm is designed by modular the programming mentality, the ultrasonic launching and the distanceamplitude displaying function is pleted. Finally through software and hardware synthesis debugging, the basic measuring function of the system in short range is realized. Keyword: ultrasonic, ultrasonic sensor, AT89S51 singlechip puter, LCD display unit, range finde图1 智能超声波测距装置 图2 单片机最小系统图3 超声波接收与发射系统图4 超声波显示装置主程序:/**************************************包含头文件****************************************/includeincludedefine NOP _nop_()。 _nop_()。 _nop_()define uchar unsigned chardefine uint unsigned intdefine ulong unsigned long/***************************************位定义****************************************/sbit csb=P3^6。 sbit green=P2^3。 sbit yellow=P2^4。 sbit red=P2^5。 bit flag_1=0。 uchar vo_vo=0xe7。 uint speed=340。 include//includeincludeincludeincludeincludedefine nop _nop_()float distance。 uint count=0。 uchar high_time,low_time,flag=0,tc=2。 uchar flag_2=0。 uchar tc_say=0。 ulong dis,dis_4[3]。 /***************************************函数名:float Distance_count()功能:距离计算函数****************************************/float Distance_count(){ float temp。 temp=high_time*256+low_time。 temp=(temp*10/9216)/2。 temp*=speed。 return temp。 }/***************************************函数名:ulong do_s(ulong dis_1)功能:距离补偿****************************************/ulong do_s(ulong dis_1){ uchar n。 if((dis_170)amp。 (dis_1100)) { n=dis_1/10。 switch(n) { case 7:dis_1=40。 break。 case 8:dis_1=22。 break。 case 9:dis_1=26。 break。 } return(dis_1)。 } else { n=dis_1/100。 switch(n) { case 1:dis_1=46。 break。 case 2:dis_1=48。 break。 case 3:dis_1=50。 break。 case 4:dis_1=53。 break。 case 5:dis_1=7。 break。 case 6:dis_1=60。 break。 case 7:dis_1=65。 break。 case 8:dis_1=72。 break。 case 9:dis_1=80。 break。 case 10:dis_1=84。 break。 case 11:dis_1+=30。 break。 case 12:dis_1=87。 break。 case 13:dis_1+=27。 break。 case 14:dis_1+=34。 break。 //? case 15:dis_1+=38。 break。 case 16:dis_1+=45。 break。 case 17:dis_1+=49。 break。 case 18:dis_1+=53。 break。 case 19:dis_1+=50。 break。 case 20:dis_1+=55。 break。 case 21:dis_1+=56。 break。 case 22:dis_1+=60。 break。 case 23:dis_1+=72。 break。 case 24:dis_1+=78。 break。 case 25:dis_1+=84。 break。 case 26:dis_1+=92。 break。 case 27:dis_1+=95。 break。 case 28:dis_1+=98。 break。 case 29:dis_1+=101。 break。 case 30:dis_1+=114。 break。 case 31:dis_1+=110。 break。 case 32:dis_1+=103。 break。 case 33:dis_1+=114。 break。 case 34:dis_1+=120。 break。 case 35:dis_1+=119。 break。 case 36:dis_1+=119。 break。 case 37:dis_1+=120。 break。 case 38:dis_1+=122。 break。 case 39:dis_1+=124。 break。 case 40:dis_1+=125。 break。 case 41:dis_1+=150。 break。 case 42:dis_1+=155。 break。 case 43:dis_1+=155。 break。 case 44:dis_1+=155。 break。 case 45:dis_1+=break。 case 46:dis_1+=175。 break。 case 47:dis_1+=185。 break。 case 48:dis_1+=195。 break。 case 49:dis_1+=175。 break。 case 50:dis_1+=175。 break。 } return(dis_1)。 } }/***************************************函数名:void tran(),void tran1(),void tran2()功能:超声波的发射****************************************/void tran(){ uchar i。 TH0=0。 TL0=0。 TR0=1。 for(i=4。 i0。 i) { csb=!csb。 nop。 nop。 nop。 nop。 nop。 nop。 nop。 nop。 nop。 } csb=1。 delay_ms(2)。 EX1=1。 delay_ms(30)。 if(flag==1) { distance=Distance_count()。 dis=(ulong)distance。 flag=0。 } else dis=0。 }void tran1(){ uchar i。 TH0=0。 TL0=0。 TR0=1。 for(i=8。 i0。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。