设计 任务书 文档 开题 答辩 说明书 格式 模板 外文 翻译 范文 资料 作品 文献 课程 实习 指导 调研 下载 网络教育 计算机 网站 网页 小程序 商城 购物 订餐 电影 安卓 Android Html Html5 SSM SSH Python 爬虫 大数据 管理系统 图书 校园网 考试 选题 网络安全 推荐系统 机械 模具 夹具 自动化 数控 车床 汽车 故障 诊断 电机 建模 机械手 去壳机 千斤顶 变速器 减速器 图纸 电气 变电站 电子 Stm32 单片机 物联网 监控 密码锁 Plc 组态 控制 智能 Matlab 土木 建筑 结构 框架 教学楼 住宅楼 造价 施工 办公楼 给水 排水 桥梁 刚构桥 水利 重力坝 水库 采矿 环境 化工 固废 工厂 视觉传达 室内设计 产品设计 电子商务 物流 盈利 案例 分析 评估 报告 营销 报销 会计
 首 页 机械毕业设计 电子电气毕业设计 计算机毕业设计 土木工程毕业设计 视觉传达毕业设计 理工论文 文科论文 毕设资料 帮助中心 设计流程 
垫片
您现在所在的位置:首页 >>毕设资料 >> 文章内容
                 
垫片
   我们提供全套毕业设计和毕业论文服务,联系微信号:biyezuopin QQ:2922748026   
基于单片机的汽车倒车测距仪的设计开题报告
文章来源:www.biyezuopin.vip   发布者:毕业作品网站  
安徽工程大学机电学院毕业设计(论文)开题报告
题  目
基于单片机的汽车倒车测距仪的设计
学生姓名
周文彬
学号
313107030342
专业
通信工程
一、毕业设计内容及研究意义内容:
     21世纪我国经济发展迅速,汽车产业也取得了长足的进展,由于交通运输车辆的增多,由此产生的交通问题也开始被人们关注。由于倒车后视镜有死角,驾车者目测距离有误差,视线模糊,天气等原因,倒车事故发生的频率远大于汽车前进时的事故率。倒车事故不仅会对自己的车和他人财物造成损伤如果伤及儿童后果更是不堪设想。
    倒车测距仪是汽车泊车安全辅助装置,能以声音或者可视信息告知驾驶员周围障碍物的情况,解除了驾驶员泊车和启动车辆时前后左右探视所引起的困扰,并帮助驾驶员扫除了视野死角和视线模糊的缺陷,提高驾驶的安全性。
    现在市面上的倒车测距仪大多采用超声波测距原理,在控制器的控制下,由传感器发射超声波信号,遇到障碍物时,产生回波信号,传感器接收到回波信号后经控制器进行出具处理,判断出障碍物的位置,由显示器显示距离、图像等并发出其他警示信号,得到及时警示,从而使驾驶者倒车时做到心里有数,使倒车变得安全和轻松。
本文介绍了一种基于单片机的超声波测距倒车辅助系统,该系统可以精确测得车尾与障碍物的距离,指导司机安全倒车。
毕业设计(论文)研究现状和发展趋势(文献综述) 
    本文将在以单片机为控制核心的基础上,设计出汽车倒车测距仪的电路,并通过数码管显示及蜂鸣器报警来提示障碍物与车后的距离。分别完成单片机控制电路设计、数码管显示电路设计、蜂鸣器报警电路设计、按键控制电路设计及超声波测距模块的安装与调试等。软件设计中,通过C语言编写程序,完成单片机对外围芯片的驱动与控制,从而完成整个汽车倒车测距仪的功能实现。 
     论文构成主要由以下部分组成: 
     第 1 章为绪论。包括研究背景、意义以及相关技术在国内外的研究现状。 
     第2章为系统总体设计思想及方案论证。首先介绍汽车倒车测距仪的设计要求,详细介绍测距系统传感器的选择、显示报警系统的方案设计,然后提出本系统总的方案设计。为其后的硬件设计奠定了基础。 
     第3章为系统硬件设计。首先分析超声波传感器的工作原理,然后具体讨论测距模块中超声波发射电路和接收电路等的设计,最后介绍了系统显示电路及报警电路的设计。 
     第4章为系统软件设计。在软件设计中采用模块化设计思想,分别对系统的主程序模块、测距模块、报警模块和显示模块的程序进行了软件设计。 
     第5章为硬件组装及调试。对汽车倒车测距仪的硬件进行了组装与调试,并进行了实地测量,对产生误差的可能原因进行了分析,给出减小误差的方法。 
      第6章为结论。对全文进行了总结。
      超声波倒车防装系统是倒车雷达的一种,倒车雷达在车挂倒挡时开始工作,由探头、主机和显示器三部分构成。 
      倒车雷达系统经历了三个阶段,六代的技术改良,从早期的倒车防撞仪,只能测试车后有限范围的障碍物,并发出警报,发展到根据距离远近程度分段报警,前两个阶段的倒车雷达一般采用专用集成电路,功能较简单。随着人们对汽车驾驶辅助系统求的提高,以及单片机价格不断下降和汽车电子系统网络化发展的要求,新型的倒车雷达都是以单片机为核心的智能测距传感系统。要求倒车雷达连续测距并显示障碍物距离,并采用不同间歇呜叫频率的声音报警提示距离,让驾驶员全神贯注地注视场景。 
     汽车电子系统网络化发展还要求作为驾驶辅助系统子系统的倒车雷达具有通信功能,能够把数据发送到汽车总线上。如最为先进的倒车雷达系统为“智能可视倒车雷达系统”,它在车尾部装上针孔摄像头,倒车时可以在DVD显示屏上显示车后的广角真实图像。 
     德国大众公司将超声波测距技术应用在倒车雷达上。日本、美国和欧洲等国的大汽车公司都投入了相当的人力、物力,采用先进的毫米波雷达、CCD摄像机、GPS和高档微机等制成安全预警系统,使用在其所开发的高级汽车上。戴姆勒——克莱斯勒公司成功开发出供商用车(尤指卡车)使用的电子刹车系统,它与其他刹车系统的区别在于,其在卡车车头设有雷达感应器,感应器在车前观察四周环境,并将所有收集的信息交由一控制器加上处理,形成一虚拟景象,再借助演算法的辅助来判断所发生状况是否需要利用刹车。未来两三年内这种新型刹车系统即可量产上市,但价格昂贵,其过高的成本限制了它应用的普遍性。通用公司的Precept概念车装了Donnelly公司生产的以摄像机为基础的后视镜系统。该系统用一个内后视镜和两个外后视镜采集汽车周围的景象,三个景象合成一个全景图像在中控台的视屏上显示出来,还用文字说明来传达信息。摄像机也可在倒车时使用,当车后近处有消火栓等障碍物时,就及时让驾驶员知晓。东风汽车有限公司乘用车公司推出的全新一代“蓝鸟智尊”配备了倒车影像显示和NAVI卫星导航系统,直接将高级别汽车的智能化从“概念”引入了“应用”。在驾驶者挂入倒挡时,中控台上的液晶显示屏会自动切换画面,将车尾摄像头拍下的环境状况展示在驾驶者眼前,最大程度地方便泊车,这项功能在夜间尤其具有价值。
三、毕业设计研究方案及工作计划
1.方案选择
目前常见的测距传感器,主要有红外传感器、激光传感器、超声波传感器。按照常规技术的应用有以下三种方案可供选择:
方案(1)红外传感器测距
其原理是传感器的红外发光管发出红外光,光敏接收管接收前方物体的反射光,接收管接收的光强随反射物体的距离变化,据此判断前方是否有障碍物并根据接收信号的强弱判断物体的距离。
方案(2)激光传感器测距
它是利用激光的单色性和相干性好、方向性强等特点,以实现高精度的计量和检测,如测量长度、距离、速度、角度等。激光测距在技术途径上可分为脉冲式激光测距仪和连续波相位式激光测距。脉冲式激光测距原理与雷达测距相似,测距仪向目标发射激光信号,碰到目标就要被反射回来,由于光的传播速度是已知的,所以只要记录下光信号的往返时间,用光速乘以往返时间的二分之一,就是所要测量的距离。
方案(3超声波测距
超声波就是空气中传播的超过人类听觉频率极限的声波。其原理犹如蝙蝠,从嘴里发出超声波,当超声波遇到小昆虫时,它的耳朵能够接收反射回波,从而判断昆虫的位置并予以捕杀。超声波传感器的工作方式是通过发送器发射出来的超声波被物体反射后传到接收器接受来判断是否检测到物体的。
根据以上的性能比较,我们能看出激光传感器是比较理想的选择,但是其价格较高,不易为大众所接受。考虑到车辆行驶过程中,测距应当有较强的抗干扰能力和较短的响应时间,最终选择方案(3)。系统的总体结构框图如图1所示。
 
 
2.方案实现:
由于超声波指向性强,能量消耗缓慢,在介质中传播的距离较远,因而超声波经常用于距离的测量。超声波测距仪广泛应用于一些工业现场的位置监控、移动机器人的自动避障行走、汽车倒车、建筑施工工地,也可用于液位、井深、管道长度等的实时测量。测量范围视设计电路和整体结构的不同一般在0.1010m之间,测量精度约1cm左右(特殊设计可超出此范围)。
本系统采用超声波测距原理,由发射器、接收器和信号处理装置三部分组成。通过超声波发射装置发出超声波,根据接收器接到超声波时的时间差就可以知道距离。超声波发射器向某一方向发射超声波,在发射时刻的同时开始计时,超声波在空气中传播,途中碰到障碍物就立即返回来,超声波接收器收到反射波就立即停止计时。(超声波在空气中的传播速度为340m/s,根据计时器记录的时间t,就可以计算出发射点距障碍物的距离(s),即:s=340t/2)。
    作为一种非接触式的检测方式,和红外、激光、无线电测距相比,由于超声波具有穿透性较强、空气传播衰减小、反射能力强的特点,所以超声波测距具有在近距离范围内不受光线和雨雪雾的影响、结构简单、制作方便、成本低等优点。高速的单片机微秒级的机器周期,可实现较精确的时间测量。
3.毕业设计的重点难点和拟采用的解决手段:
     在汽车行业中,汽车倒车测距仪已经被广泛应用,从而大大的改善了汽车倒车安全的问题,显著的提高了倒车安全以及行车安全。本课题主要遇到的重点难点是:
(1) 在研究过程中,资料的收集以及筛选和处理,需要充足的文献资料。
(2) 对于外文文献的参考,需要一定的外语水平。
(3) 在研究过程中,没有足够的时间去进行实际观察。
解决方法:
(1) 多在网上寻找相关文献,若无法满足需求,则去图书馆查阅相关文献。
(2) 利用网上的在线翻译,以及使用词典等工具帮助理解。
(3) 充分利用时间,抓紧时间,有条不稳,多思考,多钻研。
     
 
 
 
 
4.论文详细工作进度及安排
时间
任务安排
备注
12月5日
师生见面
 
12月10日
完成毕业论文题目录入系统,定题
一周
12月15日
完成毕业论文任务书,并录入系统
一周
1月10日
完成开题报告,学生录入系统
三周
3月12日
完成期中教学检查
六周
3月20日
完成论文初稿,并录入系统
一周
4月20日
完成论文定稿
四周
4月27日
教师完成指导评语的拟写
一周
5月13日
系部论文答辩
三周
5月27日
完成论文归档
二周
 
四、主要参考文献
[1] 沈红卫.单片机应用系统设计实例与分析[M].北京航空航天大学出版社,2001
[2] 张毅刚.单片机原理及应用[M].北京:高等教育出版社,2001
[3] 杨恢先,黄辉先.单片机原理及应用[M].上海:复旦大学出版社,2002
[4] 徐淑华,程退安,姚万生.单片机微型机原理及应用[M].哈尔滨:哈尔滨工业大学出版社,1994
[5] 戴佳,戴卫恒.51单片机C语言应用设计实例精讲[M].北京:电子工业出版社,2007
[6] 何立明.单片机应用系统抗干扰技术[M].北京:北京航空航天大学出版社,2000
[7] 涂时亮等编.单片微机软件设计技术[M].重庆:科学技术文献出版社重庆分社,2003
[8] 邦田.电子电路实用抗干扰技术[M].北京:人民邮电出版社,1994 .34
[9] 童诗白,华成英.模拟电子技术基础[M].北京:高等教育出版社,2001
[10] 夏路易,石宗义.电路原理图与电路板设计教程PROTELL99SE[M].北京:北京希望电子出版社,2002
[11] 高鹏,安涛,寇怀成.电路设计与制版—PROTEL99入门与提高[M]].北京:人民邮电出版社,2000
[12] 赵晶.电路设计与制版—PROTEL99高级应用[M].北京:人民邮电出版社,2000
[13] 贾兴泉.连续波雷达数据处理[M].北京:国防工业出版社,2005
[14] 黄培康,殷红成,许小剑.雷达目标特性[M].北京:电子工业出版社,2005
[15] 沈小丰等.电子技术实践基础[M].清华大学出版社,2005
[16] Thom HoganThe Programer’s SourcebookMicrosoft1988
[17] Yang.Y.Yi. J.Optimum design for linearityand efficiency of microwave Doherty amplifier using a new loadmatching technique’,Microw.J.2001
[18] VizimullerP.:RF design guide-systemscircuitsand equations(ArtechHouseBostonMA1995)
[19] Keil Software.The Final World On the 8051.GermanyKeil Elektronik Gmbh and Keil software1997
 
Ultrasonic distance meter
    Document Type and Number:United States Patent 5442592   
Abstract:An ultrasonic  distance meter cancels out the effects of temperature and humidity variations by including a measuring unit and a reference unit. In each of the units, a repetitive series of pulses is generated, each having a repetition rate directly related to the respective distance between an electroacoustic transmitter and an electroacoustic receiver. The pulse trains are provided to respective counters, and the ratio of the counter outputs is utilized to determine the distance being measured.                              
Publication Date:08/15/1995
Primary Examiner:Lobo, Ian J.
A.BACKGROUND OF THE INVENTION    
This invention relates to apparatus for the measurement of distance and, more particularly, to such apparatus which transmits ultrasonic waves between two points.    Precision machine tools must be calibrated. In the past, this has been accomplished utilizing mechanical devices such as calipers, micrometers, and the like. However, the use of such devices does not readily lend itself to automation techniques. It is known that the distance between two points can be determined by measuring the propagation time of a wave travelling between those two points. One such type of wave is an ultrasonic, or acoustic, wave. When an ultrasonic wave travels between two points, the distance between the two points can be measured by multiplying the transit time of the wave by the wave velocity in the medium separating the two points. It is therefore an object of the present invention to provide apparatus utilizing ultrasonic waves to accurately measure the distance between two points.    
 When the medium between the two points whose spacing is being measured is air, the sound velocity is dependent upon the temperature and humidity of the air. It is therefore a further object of the,present invention to provide apparatus of the type described which is independent of temperature and humidity variations. B.SUMMARY OF THE INVENTION
 The foregoing and additional objects are attained in accordance with the principles of this invention by providing distance measuring apparatus which includes a reference unit and a measuring unit. The reference and measuring units are the same and each includes an electroacoustic transmitter and an electroacoustic receiver. The spacing between the transmitter and the receiver of the reference unit is a fixed reference distance, whereas the spacing between the transmitter and receiver of the measuring unit is the distance to be measured. In each of the units, the transmitter and receiver are coupled by a feedback loop which causes the transmitter to generate an acoustic pulse which is received by the receiver and converted into an electrical pulse which is then fed back to the transmitter, so that a repetitive series of pulses results. The repetition rate of the pulses is inversely related to the distance between the transmitter and the receiver. In each of the units, the pulses are provided to a counter. Since the reference distance is known, the ratio of the counter outputs is utilized to determine the desired distance to be measured. Since both counts are identically influenced by temperature and humidity variations, by taking the ratio of the counts, the resultant measurement becomes insensitive to such variations.
C.DETAILED DESCRIPTION    
1, the principle of piezoelectric ultrasonic generator     
Piezoelectric ultrasonic generator is the use of piezoelectric crystal resonators to work. Ultrasonic generator, it has two piezoelectric chip and a resonance plate. When it's two plus pulse signal, the frequency equal to the intrinsic piezoelectric oscillation frequency chip, the chip will happen piezoelectric resonance, and promote the development of plate vibration resonance, ultrasound is generated. Conversely, if the two are not inter-electrode voltage, when the board received ultrasonic resonance, it will be for vibration suppression of piezoelectric chip, the mechanical energy is converted to electrical signals, then it becomes the ultrasonic receiver.  
    The traditional way to determine the moment of the echo's arrival is based on thresholding the received signal with a fixed reference. The threshold is chosen well above the noise level, whereas the moment of arrival of an echo is defined as the first
moment the echo signal surpasses that threshold. The intensity of an echo reflecting from an object strongly depends on the object's nature, size and distance from the sensor. Further, the time interval from the echo's starting point to the moment when it surpasses the threshold changes with the intensity of the echo. As a consequence, a considerable error may occur Even two echoes with different intensities arriving exactly at the same time will surpass the threshold at different moments. The stronger one will surpass the threshold earlier than the weaker, so it will be considered as belonging to a nearer object.
2, the principle of ultrasonic distance measurement    
Ultrasonic transmitter in a direction to launch ultrasound, in the moment to launch the beginning of time at the same time, the spread of ultrasound in the air, obstacles on his way to return immediately, the ultrasonic reflected wave received by the receiver immediately stop the clock. Ultrasound in the air as the propagation velocity of 340m / s, according to the timer records the time t, we can calculate the distance between the launch distance barrier (s), that is: s = 340t / 2     
  System is characterized by single-chip microcomputer to control the use of ultrasonic transmitter and ultrasonic receiver since the launch from time to time, single-chip selection of 8751, economic-to-use, and the chip has 4K of ROM, to facilitate programming. Draw only the front range of the circuit wiring diagram, left and right in front of Ranging Ranging circuits and the same circuit, it is omitted.
1,40 kHz ultrasonic pulse generated with the launch     
Ranging system using the ultrasonic sensor of piezoelectric ceramic sensors UCM40, its operating voltage of the pulse signal is 40kHz, which by the single-chip implementation of the following procedures to generate.
  puzel : mov 14h, # 12h; ultrasonic firing continued 200ms  
  here: cpl p1.0; output 40kHz square wave                
  nop;             
  nop;              
  nop;  
  djnz 14h, here;   
  ret
single-chip termination circuit P1.0 input port, single chip implementation of the above procedure, the P1.0 port in a 40kHz pulse output signal, after amplification transistor T, the drive to launch the first ultrasonic UCM40T, issued 40kHz ultrasonic pulse, and the continued launch of 200ms. Ranging the right and the left side of the circuit, respectively, then input port P1.1 and P1.2, the working principle and circuit in front of the same location.
2, reception and processing of ultrasonic   
Used to receive the first launch of the first pair UCM40R, the ultrasonic pulse modulation signal into an alternating voltage, the op-amp amplification IC1A and after polarization IC1B to IC2. IC2 is locked loop with audio decoder chip LM567, internal voltage-controlled oscillator center frequency of f0 = 1/1.1R8C3, capacitor C4 determine their target bandwidth. R8-conditioning in the launch of the carrier frequency on the LM567 input signal is greater than 25mV, the output from the high jump 8 feet into a low-level, as interrupt request signals to the single-chip processing.
Ranging in front of single-chip termination circuit output port INT0 interrupt the highest priority, right or left location of the output circuit with output gate IC3A access INT1 port single-chip, while single-chip P1.3 and P1. 4 received input IC3A, interrupted by the process to identify the source of inquiry to deal with, interrupt priority level for the first left right after. Part of the source code is as follows:  receive1: push psw        
               push acc                    
               clr ex1; related external interrupt 1                  
               jnb p1.1, right; P1.1 pin to 0, ranging from right to interrupt service routine circuit                    
               jnb p1.2, left; P1.2 pin to 0, to the left ranging circuit interrupt service routine   
return:             SETB EX1; open external interrupt 1                   
                   pop  acc  
                   pop  psw                  
                   reti   right: ...?; right location entrance circuit interrupt service routine
                   Ajmp  Return  
                   left: ...; left Ranging entrance circuit interrupt service routine
                   Ajmp  Return  
3, the calculation of ultrasonic propagation time     
When you start firing at the same time start the single-chip circuitry within the timer T0, the use of timer counting function records the time and the launch of ultrasonic reflected wave received time. When you receive the ultrasonic reflected wave, the receiver circuit outputs a negative jump in the end of INT0 or INT1 interrupt request generates a signal, single-chip microcomputer in response to external interrupt request, the implementation of the external interrupt service subroutine, read the time difference, calculating the distance . Some of its source code is as follows:   
RECEIVE0:  PUSH PSW                         
            PUSH ACC                         
            CLR EX0; related external interrupt 0   
            MOVR7, TH0; read the time value
            MOV R6,
            TL0 CLRC                   
            MOV A, R6                        
            SUBB A, # 0BBH; calculate the time difference   
            MOV 31H, A; storage results  
            MOV A, R7                       
            SUBB A, # 3CH                        
            MOV 30H, A                          
            SETB EX0; open external interrupt 0                      
            POP ACC                       
            POP PSW                       
            RETI  
For a flat target, a distance measurement consists of two phases: a coarse measurement and. a fine measurement:  
Step 1: Transmission of one pulse train to produce a simple ultrasonic wave.
 Step 2: Changing the gain of both echo amplifiers according to equation , until the echo  is detected.
 Step 3: Detection of the amplitudes and zero-crossing times of both echoes.
 Step 4: Setting the gains of both echo amplifiers to normalize the output at, say 3 volts.  Setting the period of the next pulses according to the : period of echoes. Setting the time window according to the data of step 2.
Step 5: Sending two pulse trains to produce an interfered wave. Testing the zero-crossing  times and amplitudes of the echoes. If phase inversion occurs in the echo, determine to otherwise calculate to by interpolation using the amplitudes near the trough. Derive t sub m1 and t sub m2 .
Step 6: Calculation of the distance y using equation .
 D.Fourth, the ultrasonic ranging system software design   
    Software is divided into two parts, the main program and interrupt service routine. Completion of the work of the main program is initialized, each sequence of ultrasonic transmitting and receiving control.
Interrupt service routines from time to time to complete three of the rotation direction of ultrasonic launch, the main external interrupt service subroutine to read the value of completion time, distance calculation, the results of the output and so on..
 System initialization after the start timer T1 starts counting from 0 to enter the main program to wait for the T1 overflow into the T1 interrupt service routine when the time is reached; T1 interrupt service routine will start a new ultrasonic transmitting, the square wave will be generated in the P1.0 pin at the same time open the timer T0 timing, in order to avoid the diffraction of the direct wave, the delay 1ms and then, after the INT0 interrupt Enable; the INT0 interrupt to allow open, if thisoccurs when the low is representative of the received echo signal, the interrupt request to INT0 interrupt service routine, the INT0 interrupt service routine will stop the timer T0 timing, read the time value of T0 timer to the appropriate storage area.set to receive a sign of success; main program detects reception hallmarks of success, the temperature subroutine is called, collecting the ambient temperature when the ultrasonic ranging, and converted the accurate speed of sound stored in RAM storage unit; SCM calls the distance calculationsubroutine to calculate, calculate the distance between the sensor to the target object; since the main program calls the display subroutine to display; after completion of the first launch, receive, display, the system will delay 100ms re-T1 set initial value againstart T1 to overflow into the next ranging. If the obstacle is too far beyond the range that T0 overflow has not yet received echo "ERROR" is displayed back to the main flow into a new round of tests.  
E. CONCLUSIONS    
    Required measuring range of 30cm ~ 200cm objects inside the plane to do a number of measurements found that the maximum error is 0.5cm, and good reproducibility. Single-chip design can be seen on the ultrasonic ranging system has a hardware structure is simple, reliable, small features such as measurement error. Therefore, it can be used not only for mobile robot can be used in other detection systems.
译文:                      
超声波测距仪
 
文件类型和编号:美国专利5442592
摘要:提出了一种可以抵消温度影响和湿度变化的新型超声波测距仪,其中包括测量单元和参考资料。在每一个部分,重复的产生一系列的脉冲,每一个重复率,直接关系到各自之间的距离,发射机和接收机。该脉冲序列提供给各自的计数器,计数器的产出的比率,是用来确定被测量的距离。
出版日期:1995年8月15日
主审查员:罗保.伊恩j.
一、背景发明
本发明涉及到仪器的测量距离,最主要的是,这种仪器,其中两点之间传输超声波。精密机床必须校准。在过去,这已经利用机械设备来完成,如卡钳,微米尺等。不过,使用这种装置并不利于本身的自动化技术发展。据了解,两点之间的距离可以通过测量两点之间的行波传播时间的决定。这样的一个波浪型是一种超声波,或声波。当超声波在两点之间通过时,两点之间的距离可以由波的速度乘以测量得到的在分离的两点中波中转的时间。因此,本发明提供仪器利用超声波来精确测量两点之间的距离对象。
当任意两点之间的介质是空气时,声音的速度取决于温度和空气的相对湿度。因此,它是进一步的研究对象,本次的发明,提供的是独立于温度和湿度的变化的新型仪器。
二、综述发明
这项距离测量仪器发明是根据上述的一些条件和额外的一些基础原则完成的,其中包括一个参考单位和测量单位。参考和测量单位是相同的,每个包括一个超声波发射机和一个接收机。间隔发射器和接收器的参考值是一个固定的参考距离,而间距之间的发射机和接收机的测量单位是有最小距离来衡量的。在每一个单位,发射器和接收器耦合的一个反馈回路,它会导致发射器产生超声脉冲,这是由接收器和接收到一个电脉冲然后被反馈到发射机转换,从而使重复系列脉冲的结果。重复率脉冲是成反比关系之间的距离发射器和接收器。在每一个单位,脉冲提供一个反馈。由于参考的距离是众所周知的声速,比例反产出是利用数学以确定所期望的距离来衡量。由于这两方面都是相同的影响,温度和湿度的变化,采取的比例相同,由此产生的测量变得准确。
三、详细说明
(一)超声波测距原理  
1、压电式超声波发生器原理
压电式超声波发生器实际上是利用压电晶体的谐振来工作的。超声波发生器内部结构如下所示,它有两个压电晶片和一个共振板。当它的两极外加脉冲信号,其频率等于压电晶片的固有振荡频率时,压电晶片将会发生共振,并带动共振板振动,便产生超声波。反之,如果两电极间未外加电压,当共振板接收到超声波时,将压迫压电晶片作振动,将机械能转换为电信号,这时它就成为超声波接收器了。
测量脉冲到达时间的传统方法是以拥有固定参数的接收信号开端为基础的。这个界限恰恰选于噪音水平之上,然而脉冲到达时间被定义为脉冲信号刚好超过界限的第一时刻。一个物体的脉冲强度很大程度上取决于这个物体的自然属性尺寸还有它与传感器的距离。进一步说,从脉冲起始点到刚好超过界限之间的时间段随着脉冲的强度而改变。结果,一种错误便出现了——两个拥有不同强度的脉冲在不同时间超过界限却在同一时间到达。强度较强的脉冲会比强度较弱的脉冲超过界限的时间早点,因此我们会认为强度较强的脉冲属于较近的物体。
2、超声波测距原理
超声波发射器向某一方向发射超声波,在发射时刻的同时开始计时,超声波在空气中传播,途中碰到障碍物就立即返回来,超声波接收器收到反射波就立即停止计时。超声波在空气中的传播速度为340m/s,根据计时器记录的时间t,就可以计算出发射点距障碍物的距离(s),即:s=340t/2
二 超声波测距系统的电路设计
系统的特点是利用单片机控制超声波的发射和对超声波自发射至接收往返时间的计时,单片机选用8751,经济易用,且片内有4K的ROM,便于编程。电路原理图如图所示。其中只画出前方测距电路的接线图,左侧和右侧测距电路与前方测距电路相同,故省略之。
1、40kHz脉冲的产生与超声波发射
测距系统中的超声波传感器采用UCM40的压电陶瓷传感器,它的工作电压是40kHz的脉冲信号,这由单片机执行下面程序来产生。
puzel: mov 14h, #12h;       超声波发射持续200ms
here:  cpl p1.0 ;           输出40kHz方波
             nop ;
             nop ;
             nop ;
             djnz 14h,here;
             ret
前方测距电路的输入端接单片机P1.0端口,单片机执行上面的程序后,在P1.0端口输出一个40kHz的脉冲信号,经过三极管T放大,驱动超声波发射头UCM40T,发出40kHz的脉冲超声波,且持续发射200ms。右侧和左侧测 距电路的输入端分别接P1.1和P1.2端口,工作原理与前方测距电路相同。
2、超声波的接收与处理
接收头采用与发射头配对的UCM40R,将超声波调制脉冲变为交变电压信号,经运算放大器IC1A和IC1B两极放大后加至IC2。IC2是带有锁 定环的音频译码集成块LM567,内部的压控振荡器的中心频率f0=1/1.1R8C3,电容C4决定其锁定带宽。调节R8在发射的载频上,则LM567输入信号大于25mV,输出端8脚由高电平跃变为低电平,作为中断请求信号,送至单片机处理。
前方测距电路的输出端接单片机INT0端口,中断优先级最高,左、右测距电路的输出通过与门IC3A的输出接单片机INT1端口,同时单片机P1.3和P1.4接到IC3A的输入端,中断源的识别由程序查询来处理,中断优先级为先右后左。部分源程序如下:
receive1:push psw
              push acc
              clr ex1 ;             关外部中断1
              jnb p1.1, right ; P1.1引脚为0,转至右测距电路中断服务程序
              jnb p1.2, left ;    P1.2引脚为0,转至左测距电路中断服务程序
return:    SETB EX1;        开外部中断1
              pop acc
              pop psw
              reti
right:     ... ;                    右测距电路中断服务程序入口
              ajmp return
left:        ... ;                      左测距电路中断服务程序入口
              ajmp return
3、计算超声波传播时间
在启动发射电路的同时启动单片机内部的定时器T0,利用定时器的计数功能记录超声波发射的时间和收到反射波的时间。当收到超声波反射波时,接收电路 输出端产生一个负跳变,在INT0或INT1端产生一个中断请求信号,单片机响应外部中断请求,执行外部中断服务子程序,读取时间差,计算距离。其部分源程序如下:
RECEIVE0: PUSH PSW
                      PUSH ACC
                      CLR EX0 ;            关外部中断0
                      MOV R7, TH0 ;        读取时间值
                      MOV R6, TL0
                      CLR C
                      MOV A, R6
                      SUBB A, #0BBH;       计算时间差
                      MOV 31H, A ;         存储结果
                      MOV A, R7
                      SUBB A, #3CH
                      MOV 30H, A
                      SETB EX0 ;           开外部中断0
                      POP ACC
                      POP PSW
                      RETI
对于一个平坦的目标,距离测量包括两个阶段:粗糙的测量和精细测量。
第一步:脉冲的传送产生一种简单的超声波。
第二步:根据公式改变回波放大器的获得量直到回拨被检测到。
第三步:检测两种回波的振幅与过零时间。
第四步:设置回波放大器的所得来规格输出,假定是3伏。通过脉冲的周期设置下一个脉冲。根据第二部的数据设定时间窗。
第五步:发射两串脉冲产生干扰波。测量过零时间与回波的振幅。如果逆向发生在回波中,决定要不通过在低气压插入振幅。
第六步:通过公式计算距离y。
 
四、超声波测距系统的软件设计
软件分为两部分,主程序和中断服务程序,如图3(a)(b)(c) 所示。主程序完成初始化工作、各路超声波发射和接收顺序的控制。
定时中断服务子程序完成三方向超声波的轮流发射,外部中断服务子程序主要完成时间值的读取、距离计算、结果的输出等工作。
系统初始化后就启动定时器T1从0开始计数,此时主程序进入等待,当到达定时时间时T1溢出进入T1中断服务子程序;在T1中断服务子程序中将启动一次新的超声波发射,此时将在P1.0引脚上开始产生的方波,同时开启定时器T0计时,为了避免直射波的绕射,需要延迟1ms后再开INT0中断允许;INT0中断允许打开后,若此时出现低电平则代表收到回波信号,将提出中断请求进入INT0中断服务子程序,在INT0中断服务子程序中将停止定时器T0计时,读取定时器T0时间值到相应的存储区,同时设置接收成功标志;主程序一旦检测到接收成功标志,将调用测温子程序,采集超声波测距时的环境温度,并换算出准确的声速,存储到RAM存储单元中;单片机再调用距离计算子程序进行计算,计算出传感器到目标物体之间的距离;此后主程序调用显示子程序进行显示;当一次发射、接收、显示的过程完成后,系统将延迟100ms重新让T1置初值,再次启动T1以溢出,进入下一次测距。如果由于障碍物过远,超出量程,以致在T0溢出时尚未接收到回波,则显示“ERROR”重新回到主流程进入新一轮测试。
五、结论
对所要求测量范围30cm~200cm内的平面物体做了多次测量发现,其最大误差为0.5cm,且重复性好。可见基于单片机设计的超声波测距系统具有硬件结构简单、工作可靠、测量误差小等特点。因此,它不仅可用于移动机器人,还可用在其它检测系统中。
思考:至于为什么接收不用晶体管做放大电路呢,因为放大倍数搞不好,CX20106集成放大电路,还带自动电平增益控制,放大倍数为76dB,中心频率是38k到40k,刚好是超声波传感器的谐振频率 。
 
  全套毕业设计论文现成成品资料请咨询微信号:biyezuopin QQ:2922748026     返回首页 如转载请注明来源于www.biyezuopin.vip  

                 

打印本页 | 关闭窗口
本类最新文章
某MW级风力发电场电气初步设计 基于PLC控制的小车运料控制系统 圆柱形卷绕倍捻机传动机构机械设计
基于微信小程序+JavaSSM+ 基于微信小程序+JavaSSM+ 基于微信小程序+JavaSSM+
| 关于我们 | 友情链接 | 毕业设计招聘 |

Email:biyeshejiba@163.com 微信号:biyezuopin QQ:2922748026  
本站毕业设计毕业论文资料均属原创者所有,仅供学习交流之用,请勿转载并做其他非法用途.如有侵犯您的版权有损您的利益,请联系我们会立即改正或删除有关内容!