找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2258|回复: 0
打印 上一主题 下一主题
收起左侧

单片机超声波测距(论文)外文翻译资料下载

[复制链接]
跳转到指定楼层
楼主
ID:344299 发表于 2018-6-3 22:54 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
师范大学本科毕业设计(论文)外文翻译
译文:
超声波测距仪
【摘要】提出了一种可以抵消温度影响和湿度变化的新型超声波测距仪,包括测量单元和参考资料。在每一个单位,重复的一系列脉冲产生,每有一个重复率,直接关系到各自之间的距离,发射机和接收机。该脉冲序列提供给各自的计数器,计数器的产出的比率,是用来确定被测量的距离。

一、背景发明
本发明涉及到仪器的测量距离,最主要的是,这种仪器,其中两点之间传输超声波。精密机床必须校准。在过去,这已经利用机械设备来完成,如卡钳,微米尺等。不过,使用这种装置并不利于本身的自动化技术发展。据了解,两点之间的距离可以通过测量两点之间的行波传播时间的决定。这样的一个波浪型是一种超声波,或声波。当超声波在两点之间通过时,两点之间的距离可以由波的速度乘以测量得到的在分离的两点中波中转的时间。因此,本发明提供仪器利用超声波来精确测量两点之间的距离对象。
当任意两点之间的介质是空气时,声音的速度取决于温度和空气的相对湿度。因此,它是进一步的研究对象,本次的发明,提供的是独立于温度和湿度的变化的新型仪器。
二、综述发明
这项距离测量仪器发明是根据上述的一些条件和额外的一些基础原则完成的,其中包括一个参考单位和测量单位。参考和测量单位是相同的,每个包括一个超声波发射机和一个接收机。间隔发射器和接收器的参考值是一个固定的参考距离,而间距之间的发射机和接收机的测量单位是有最小距离来衡量的。在每一个单位,发射器和接收器耦合的一个反馈回路,它会导致发射器产生超声脉冲,这是由接收器和接收到一个电脉冲然后被反馈到发射机转换,从而使重复系列脉冲的结果。重复率脉冲是成反比关系之间的距离发射器和接收器。在每一个单位,脉冲提供一个反馈。由于参考的距离是众所周知的声速,比例反产出是利用数学以确定所期望的距离来衡量。由于这两方面都是相同的影响,温度和湿度的变化,采取的比例相同,由此产生的测量变得准确。
三、详细说明
(一)超声波测距原理  
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引脚上开始产生40kHz的方波,同时开启定时器T0计时,为了避免直射波的绕射,需要延迟1ms后再开INT0中断允许;INT0中断允许打开后,若此时出现低电平则代表收到回波信号,将提出中断请求进入INT0中断服务子程序,在INT0中断服务子程序中将停止定时器T0计时,读取定时器T0时间值到相应的存储区,同时设置接收成功标志;主程序一旦检测到接收成功标志,将调用测温子程序,采集超声波测距时的环境温度,并换算出准确的声速,存储到RAM存储单元中;单片机再调用距离计算子程序进行计算,计算出传感器到目标物体之间的距离;此后主程序调用显示子程序进行显示;当一次发射、接收、显示的过程完成后,系统将延迟100ms重新让T1置初值,再次启动T1以溢出,进入下一次测距。如果由于障碍物过远,超出量程,以致在T0溢出时尚未接收到回波,则显示“ERROR”重新回到主流程进入新一轮测试。
五、结论
对所要求测量范围30cm~200cm内的平面物体做了多次测量发现,其最大误差为0.5cm,且重复性好。可见基于单片机设计的超声波测距系统具有硬件结构简单、工作可靠、测量误差小等特点。因此,它不仅可用于移动机器人,还可用在其它检测系统中。
思考:至于为什么接收不用晶体管做放大电路呢,因为放大倍数搞不好,CX20106集成放大电路,还带自动电平增益控制,放大倍数为76dB,中心频率是38k到40k,刚好是超声波传感器的谐振频率 。


原文:
Ultrasonic Distance  Meter
Publication Date:08/15/1995  Primary Examiner: Lobo, Ian J.

Abstract: An ultrasonic distance metercancels out the effects of temperature and humidity variations by including ameasuring unit and a reference unit. In each of the units, a repetitive seriesof pulses is generated, each having a repetition rate directly related to therespective distance between an electroacoustic transmitter and anelectroacoustic receiver. The pulse trains are provided to respective counters,and the ratio of the counter outputs is utilized to determine the distancebeing measured.
Keywords: Ultrasonic; Range finder; Singlechip.
A.BACKGROUND OF THE INVENTION

This invention relates to apparatus for themeasurement of distance and, more particularly, to such apparatus whichtransmits ultrasonic waves between two points. Precision machine tools must becalibrated. In the past, this has been accomplished utilizing mechanicaldevices such as calipers, micrometers, and the like. However, the use of suchdevices does not readily lend itself to automation techniques. It is known thatthe distance between two points can be determined by measuring the propagationtime of a wave travelling between those two points. One such type of wave is anultrasonic, or acoustic, wave. When an ultrasonic wave travels between two points,the distance between the two points can be measured by multiplying the transittime 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 apparatusutilizing ultrasonic waves to accurately measure the distance between twopoints.

When the medium between the two points whose spacingis being measured is air, the sound velocity is dependent upon the temperatureand humidity of the air. It is therefore a further object of the,presentinvention to provide apparatus of the type described which is independent oftemperature and humidity variations.

B.SUMMARY OF THE INVENTION

The foregoing and additional objects are attained inaccordance with the principles of this invention by providing distancemeasuring apparatus which includes a reference unit and a measuring unit. Thereference and measuring units are the same and each includes an electroacoustictransmitter and an electroacoustic receiver. The spacing between the transmitterand the receiver of the reference unit is a fixed reference distance, whereasthe spacing between the transmitter and receiver of the measuring unit is thedistance to be measured. In each of the units, the transmitter and receiver arecoupled by a feedback loop which causes the transmitter to generate an acousticpulse which is received by the receiver and converted into an electrical pulsewhich is then fed back to the transmitter, so that a repetitive series ofpulses results. The repetition rate of the pulses is inversely related to thedistance between the transmitter and the receiver. In each of the units, thepulses are provided to a counter. Since the reference distance is known, theratio of the counter outputs is utilized to determine the desired distance tobe measured. Since both counts are identically influenced by temperature andhumidity variations, by taking the ratio of the counts, the resultantmeasurement becomes insensitive to such variations.

C.DETAILED DESCRIPTION
A.principle of ultrasonic distance measurement
1.the principle of piezoelectric ultrasonic generator

Piezoelectric ultrasonic generator is the use ofpiezoelectric crystal resonators to work. Ultrasonic generator, the internalstructure as shown in Figure 1, it has two piezoelectric chip and a resonanceplate. When it's two plus pulse signal, the frequency equal to the intrinsicpiezoelectric oscillation frequency chip, the chip will happen piezoelectricresonance, and promote the development of plate vibration resonance, ultrasoundis generated. Conversely, if the two are not inter-electrode voltage, when theboard received ultrasonic resonance, it will be for vibration suppression ofpiezoelectric 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'sarrival is based on thresholding the received signal with a fixed reference.The threshold is chosen well above the noise level, whereas the moment ofarrival of an echo is defined as the first moment the echo signal surpassesthat threshold. The intensity of an echo reflecting from an object stronglydepends on the object's nature, size and distance from the sensor. Further, thetime interval from the echo's starting point to the moment when it surpassesthe threshold changes with the intensity of the echo. As a consequence, aconsiderable error may occur Even two echoes with different intensitiesarriving exactly at the same time will surpass the threshold at differentmoments. 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 launchultrasound, in the moment to launch the beginning of time at the same time, thespread of ultrasound in the air, obstacles on his way to return immediately,the ultrasonic reflected wave received by the receiver immediately stop theclock. Ultrasound in the air as the propagation velocity of 340m / s, accordingto the timer records the time t, we can calculate the distance between thelaunch distance barrier (s), that is: s = 340t / 2

B. Ultrasonic Ranging System for the Second CircuitDesign

System is characterized by single-chip microcomputerto control the use of ultrasonic transmitter and ultrasonic receiver since thelaunch from time to time, single-chip selection of 8751, economic-to-use, andthe chip has 4K of ROM, to facilitate programming. Circuit schematic diagramshown in Figure 2. Draw only the front range of the circuit wiring diagram,left and right in front of Ranging Ranging circuits and the same circuit, it isomitted.

1.40 kHz ultrasonic pulse generated with the launch

Ranging system using the ultrasonic sensor ofpiezoelectric ceramic sensors UCM40, its operating voltage of the pulse signalis 40kHz, which by the single-chip implementation of the following proceduresto generate.

puzel: mov 14h, # 12h; ultrasonic firingcontinued 200ms
here: cpl p1.0; output 40kHz square wave
              nop;
              nop;
              nop;
              djnz 14h, here;
              ret

Ranging in front of single-chip termination circuitP1.0 input port, single chip implementation of the above procedure, the P1.0port in a 40kHz pulse output signal, after amplification transistor T, thedrive to launch the first ultrasonic UCM40T, issued 40kHz ultrasonic pulse, andthe continued launch of 200ms. Ranging the right and the left side of thecircuit, respectively, then input port P1.1 and P1.2, the working principle andcircuit in front of the same location.

2.reception and processing of ultrasonic

Used to receive the first launch of the first pairUCM40R, the ultrasonic pulse modulation signal into an alternating voltage, theop-amp amplification IC1A and after polarization IC1B to IC2. IC2 is lockedloop with audio decoder chip LM567, internal voltage-controlled oscillatorcenter frequency of f0 = 1/1.1R8C3, capacitor C4 determine their targetbandwidth. R8-conditioning in the launch of the carrier frequency on the LM567input signal is greater than 25mV, the output from the high jump 8 feet into alow-level, as interrupt request signals to the single-chip processing.

Ranging in front of single-chip termination circuitoutput port INT0 interrupt the highest priority, right or left location of theoutput circuit with output gate IC3A access INT1 port single-chip, whilesingle-chip P1.3 and P1. 4 received input IC3A, interrupted by the process toidentify the source of inquiry to deal with, interrupt priority level for thefirst left right after. Part of the source code is as follows:

receive1: push psw
                  push acc
                  clr ex1; related externalinterrupt 1
                  jnb p1.1, right; P1.1 pin to0, ranging from right to interrupt service routine circuit
                  jnb p1.2, left; P1.2 pin to0, to the left ranging circuit interrupt service routine
return: SETB EX1; open external interrupt 1
                  pop  acc
                  pop  psw
                  reti
right: ...?; right location entrancecircuit interrupt service routine
                  Ajmp  Return
left: ...; left Ranging entrance circuitinterrupt service routine
                    Ajmp  Return
3. the calculation of ultrasonic propagation time

When you start firing at the same time start thesingle-chip circuitry within the timer T0, the use of timer counting functionrecords the time and the launch of ultrasonic reflected wave received time.When you receive the ultrasonic reflected wave, the receiver circuit outputs anegative jump in the end of INT0 or INT1 interrupt request generates a signal,single-chip microcomputer in response to external interrupt request, theimplementation of the external interrupt service subroutine, read the timedifference, calculating the distance . Some of its source code is as follows:

RECEIVE0:   PUSH PSW
                       PUSH ACC
                       CLR EX0; relatedexternal interrupt 0
                       MOV R7, TH0; read thetime value
                       MOV R6, TL0  
                       CLR C
                       MOV A, R6
                       SUBB A, # 0BBH; calculate the time difference
                       MOV 31H, A; storageresults
                       MOV A, R7
                       SUBB A, # 3CH
                       MOV 30H, A  
                       SETB EX0; open externalinterrupt 0
                       POP ACC  
                       POP PSW
                       RETI

For a flattarget, a distance measurement consists of two phases: a coarse measurementand. 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 theecho 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 3volts. Setting the period of the next pulses according to the : period ofechoes. Setting the time window according to the data of step 2.

Step 5:Sending two pulse trains to produce an interfered wave. Testing thezero-crossing times and amplitudes of the echoes. If phase inversion occurs inthe echo, determine to otherwise calculate to by interpolation using theamplitudes near the trough. Derive t sub m1 and t sub m2 .

Step 6:Calculation of the distance y using equation .

D. Fourth, the ultrasonicranging system software design

Software is divided into two parts, the main programand interrupt service routine, shown in Figure 3 (a) (b) (c) below. Completionof the work of the main program is initialized, each sequence of ultrasonictransmitting and receiving control.

Interrupt service routines from time to time tocomplete three of the rotation direction of ultrasonic launch, the mainexternal 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 startscounting from 0 to enter the main program to wait for the T1 overflow into theT1 interrupt service routine when the time is reached; T1 interrupt serviceroutine will start a new ultrasonic transmitting, the square wave will begenerated in the P1.0 pin at the same time open the timer T0 timing, in orderto avoid the diffraction of the direct wave, the delay 1ms and then, after theINT0 interrupt Enable; the INT0 interrupt to allow open, if thisoccurs when thelow is representative of the received echo signal, the interrupt request toINT0 interrupt service routine, the INT0 interrupt service routine will stopthe timer T0 timing, read the time value of T0 timer to the appropriate storagearea.set to receive a sign of success; main program detects reception hallmarksof success, the temperature subroutine is called, collecting the ambienttemperature when the ultrasonic ranging, and converted the accurate speed ofsound stored in RAM storage unit; SCM calls the distance calculationsubroutineto calculate, calculate the distance between the sensor to the target object;since the main program calls the display subroutine to display; aftercompletion of the first launch, receive, display, the system will delay 100msre-T1 set initial value againstart T1 to overflow into the next ranging. If theobstacle 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 objectsinside the plane to do a number of measurements found that the maximum error is0.5cm, and good reproducibility. Single-chip design can be seen on theultrasonic ranging system has a hardware structure is simple, reliable, smallfeatures such as measurement error. Therefore, it can be used not only formobile robot can be used in other detection systems.

Thoughts: As for why the receiver do not have thetransistor amplifier circuit, because the magnification well, CX20106integrated amplifier, but also with automatic gain control level, magnificationto 76dB, the center frequency is 38k to 40k, is exactly resonant ultrasonicsensors frequency.



完整的Word格式文档51黑下载地址:
超声波测距仪.doc (69.5 KB, 下载次数: 45)


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表