基于单片机的超声波测距仪的设计_毕业设计(编辑修改稿)内容摘要:
由于时间不是很充裕,对系统的设计还存在一些不足,下一步还有以下工作要继续进行: 超声波发射波形的改进 因为该设计加在发射器上的电压波形采用方波,方波含有丰富的高次谐波,不利于精确鉴相。 这将增加发射波与回波的谐波失真。 所以在接下来的工作中,可能会考虑用正弦波代替方波来优化该设计。 样机的制作 由于时间关系,样机暂时无法做出,但我们已经和同学一起联系商家,购买了一定的材料。 进一步研究系统的抗干扰性能 硬件抗干扰 技术是系统设计时首选的抗干扰措施。 常见的硬件抗干扰措施有元件的合理布局、接地的抗干扰处理、隔离技术等。 在制作样机的过程中,将会采用多种抗干扰技术对系统进行优化,减小测量误差。 18 致谢 本次毕业设计得以顺利完成,首先要感谢刘纯利老师的指导和大力支持。 在这期间,我和刘老师保持着经常性的面对面或通过邮件形式的交流。 刘纯利老师渊博的专业知识、严谨的治学态度、精益求精的工作作风、平易近人的人格魅力对我影响深远。 在毕业设计中,刘纯利老师对设计的思路和结构进行了指导,同时也对相当一部分专业知识方面的帮助。 同时,也要感谢大学 几年授我们以渔的老师们,是你们的谆谆教诲让我们获得了扎实的知识,在这里表示衷心的感谢。 参考文献 [1] 谢维成,杨加国 .单片机原理与应用及 C51 程序设计 .北京:清华大学出版社, 20xx [2] 蔡菲娜 .单片微型计算机原理和应用 .杭州:杭州大学出版社, 1995 [3] 李建忠 .单片机原理及应用 .西安:西安电子科技大学出版社, 20xx [4] 张齐等 .单片机应用系统设计技术 基于 C 语言编程 .北京:电子工业出版社, 20xx [5] 吴延海 .微型计算机接口技术 .重庆:重庆大学出版社, 1997 [6] 李丽霞 .单片机在超声波测距中的应用 [J].电子技术 ,20xx [7] 姜道连 ,宁延一 ,袁世良 .用 AT89C2051 设计超声波测距仪 [J].国外电子元器件 ,20xx [8] 张鹏 ,张有志 .一种新型超生测距系统 [J].山东 :山东大学学报 ,20xx,33(1) [9] 李学海 .PIC 单片机实用教程-基础篇(第 1 版) [M].北京航天航空大学出版社 .北京:20xx 年 2 月 [10] 贾伯年 . 传感器技术 . 南京 : 东南大学出版社 ,20xx [11] 陈大新 ,胡学同 ,周杏鹏 .利用 FPGA 改进超声波测距模块设计 [J].传感器技术 ,20xx,24(2): 57~ 59 [12] 阎石 . 数字电子技术基础 . 北京 : 高等教育出版社 , 1998 [13] 楼然苗 . 51 系列单片机设计实例 . 北京 : 北京航空航天大学出版社 ,1999 [14] 谭浩强 .C 程序设计(第三版) .北京:清华大学出版社, 20xx [15] 朱伟芳 .一种便携式长度测量系统的硬件设计 [J].江苏电器 ,20xx,5:1415 [16] Tom R. Watt .Cooling our tomorrows economically , ASHRAE Journal. [17] Army Kayla. Improving efficiency in existing chillers with optimization technology , ASHRAE Journal. [18] mutter , Eerily , , , , Refine the use of the evaporation in an experimental downdraft cool tower , Energys .1995 [19] rtori S , ZHANG G X. Geometric Error Measurement and Compensation of of the CIRP. 1995:599609 19 Ultrasonic Distance Testing System’s Design Based on Singlechip Microputer Abstract Because of modern production requirements, it was discovered that the need to achieve the production of noncontact distance measurement, and ultrasonic distance measurement is a good performance of the ranging approach is mainly used in reversing radar sites as well as some industrial field, this paper designed a to AT89S52 MCU as the core of the lowcost, highprecision, LCD display of ultrasonic range finder, and use some monly used devices such as: 74HC04, consists of microcontroller, ultrasonic transmitter and ultrasonic receiver amplifier circuit and display circuit. Chip AT89S52 control calculation by the ultrasonic transmission from transmit to receive time and hence the distance to be under test. The system has easy to detect, the software fully functional, reliable, high accuracy paper discusses the successful development of microputer technology, the basic principles of ultrasonic range finder, measurement method of calculating implementations. Use of software calibration, improved accuracy and machine reliability. The actual use of that greatly improves safety, reliability and accuracy. Keywords MCU distance meter ultrasonic sensor microcontroller LCD display 20 附录 附录一 系统原理图 附录二 系统 PCB 板图 21 附录三 源程序 include include include define uchar unsigned char define uint unsigned int uchar code dispBUF[33]={Temperature: Distance: mm }。 uchar numcode[10]={39。 039。 ,39。 139。 ,39。 239。 ,39。 339。 ,39。 439。 ,39。 539。 ,39。 639。 ,39。 739。 ,39。 839。 ,39。 939。 }。 uint num[29]={0}。 uchar jsh,jsl。 //计数器的高低位 uchar count=0。 //10 秒计次数 uint distance。 //距离 uint temp。 //温度变量 uchar bdata flag。 //DS18B20 存在标准 sbit RS=P2^0。 //LCD RS sbit RW=P2^1。 //LCD RW sbit E =P2^2。 //LCD E sbit DQ=P2^7。 //DS18B20 数字端口 sbit Busy = P0^7。 //LCD 忙 void Delay(uint time)。 void delay1ms(uint ms)。 void delay()。 void delay15(uchar us)。 void BUMA(void)。 void B20_WDAT(uchar dat)。 uchar B20_RDAT(void)。 void Init_18B20(void)。 //初始化 18B20 void Write_Comm(uchar)。 //写入 LCD 命令 void Write_Data(uchar)。 //写入 LCD 数据 void Init_LCD(void)。 sbit sta_flag =flag^0。 //10MS 到标准位, flag 即通用标志位,当 sta_flag=1 时,表示到了 10ms sbit fuhao =flag^1。 //温度的符号位 sbit START =P1^0。 //启动测距 22 sbit CNT =P2^5。 //发射超声波 sbit CSBIN =P2^6。 //返回信号 sbit BUZZER =P3^7。 /******************定时器 1溢出 ***************************/ void timer1(void)interrupt 2 using 1 {TR1=0。 } //关闭定时器 /计数器 1 /*********定时器 0溢出中断函数,每 60MS 溢出 ****************/ void timer0(void)interrupt 1 using 0 //定时器 0 { TH0=0x15。 TL0=0xA0。 //定时器 0设定初值 TH1=0。 TL1=0。 //计数器 1清零 sta_flag=1。 count++。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 CNT=1。 //先延时,后开始发送 40KHz 的超声波 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 _nop_()。 //40KHZ 的倒数就是 25us,12 个 _nop_()。 就是 24us CNT=0。 //保持一段时间高电平 _nop_()。 _nop_()。 23 _nop_()。 _nop_()。 TR1=1。 //延时,避免直达信号干扰,启动定时器 /计数器 1 delay15(50)。 //延时避开直达信号 } /***************系统初始化 *************************/ void SYS_INIT()。基于单片机的超声波测距仪的设计_毕业设计(编辑修改稿)
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。
用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。