1、中英文翻译 课题:基于单片机超声波测距系统设计专业电气工程及其自动化学生姓名孙旺班级M电气112学号指引教师吴冬春专业系主任顾春雷撰写日期3月13日电气工程学院外文原文Ultrasonic ranging system designPublication title:Sensor Review. Bradford:1993. Vol. 13ABSTRACT:Ultrasonic ranging technology has wide using worth in many fields,such as the industrial locale,vehicle navigation and s
2、onar engineeringNow it has been used in level measurement,self-guided autonomous vehicles,fieldwork robots automotive navigation,air and underwater target detection,identification,location and so onSo there is an important practicing meaning to learn the ranging theory and ways deeply. To improve th
3、e precision of the ultrasonic ranging system in hand,satisfy the request of the engineering personnel for the ranging precision,the bound and the usage,a portable ultrasonic ranging system based on the single chip processor was developedKeywords:Ultrasound r,Ranging System,Single Chip Processor1.Int
4、roductiveWith the development of science and technology,the improvement of peoples standard of living,speeding up the development and construction of the city. urban drainage system have greatly developed their situation is constantly improving. However,due to historical reasons many unpredictable f
5、actors in the synthesis of her time,the city drainage system. In particular drainage system often lags behind urban construction. Therefore,there are often good building excavation has been building facilities to upgrade the drainage system phenomenon. It brought to the city sewage,and it is clear t
6、o the city sewage and drainage culvert in the sewage treatment system. comfort is very important to peoples lives. Mobile robots designed to clear the drainage culvert and the automatic control system Free sewage culvert clear guarantee robot,the robot is designed to clear the culvert sewage to the
7、core. Control System is the core component of the development of ultrasonic range finder. Therefore,it is very important to design a good ultrasonic range finder.2. A principle of ultrasonic distance measurement 2.1 The principle of piezoelectric ultrasonic generator Piezoelectric ultrasonic generat
8、or is the use of piezoelectric crystal resonators to work. Ultrasonic generator,the internal structure as shown,it has two piezoelectric chip and a resonance plate. When its two plus pulse signal,the frequency equal to the intrinsic piezoelectric oscillation frequency chip,the chip will happen piezo
9、electric 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 ele
10、ctrical signals,then it becomes the ultrasonic receiver. The traditional way to determine the moment of the echos 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
11、 first moment the echo signal surpasses that threshold. The intensity of an echo reflecting from an object strongly depends on the objects nature,size and distance from the sensor. Further,the time interval from the echos starting point to the moment when it surpasses the threshold changes with the
12、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 belongi
13、ng to a nearer object.2.2The 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
14、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 3.Ultrasonic Ranging System for the Second Circ
15、uit Design 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. Circuit schematic diagram shown
16、in Figure 2. Figure 1 circuit principle diagram3.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 procedure
17、s 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 Ranging in front of single-chip termination circuit P1.0 input port,single chip implementation of the above procedure,the P1.0 port in a 40kHz pulse output si
18、gnal,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
19、location. 3.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,interna
20、l 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 t
21、o 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 pr
22、ocess 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
23、 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.3
24、 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
25、 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 it
26、s source code is as follows:RECEIVE0:PUSH PSW PUSH ACC CLR EX0;related external interrupt 0 MOV R7,TH0;read the time value MOV R6,TL0 CLR C 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 PS
27、W 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:Det
28、ection 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 tw
29、o 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 distanc
30、e y using equation .4. 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
31、 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. 5. Conclusions Required measuring range of 30cm 200cm objects inside the p
32、lane 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
33、 can be used in other detection systems. Thoughts:As for why the receiver do not have the transistor amplifier circuit,because the magnification well,integrated amplifier,but also with automatic gain control level,magnification to 76dB,the center frequency is 38k to 40k,is exactly resonant ultrasoni
34、c sensors frequencyREFERENCES1. Fox,J.D.,Khuri-Yakub,B.T. and Kino,G.S.,High Frequency Acoustic Wave Measurement in Air,in Proceedings of IEEE 1983 Ultrasonic Symposium,October 31-2 November,1983,Atlanta,GA,pp. 581-4.2. Martin Abreu,J.M.,Ceres,R. and Freire,T.,Ultrasonic Ranging:Envelope Analysis Gi
35、ves Improved Accuracy,Sensor Review,Vol. 12 No. 1,1992,pp. 17-21.3. Parrilla,M.,Anaya,J.J. and Fritsch,C.,Digital Signal Processing Techniques for High Accuracy Ultrasonic Range Measurements,IEEE Transactions:Instrumentation and Measurement,Vol. 40 No. 4,August 1991,pp. 759-63.4. Canali,C.,Cicco,G.D
36、.,Mortem,B.,Prudenziati,M.,and Taron,A.,A Temperature Compensated Ultrasonic Sensor Operating in Air for Distance and Proximity Measurement,IEEE Transaction on Industry Electronics,Vol. IE-29 No. 4,1982,pp. 336-41.5. Martin,J.M.,Ceres,R.,Calderon,L and Freire,T.,Ultrasonic Ranging Gets Thermal Corre
37、ction,Sensor Review,Vol. 9 No. 3,1989,pp. 153-5.外文译文超声波测距仪系统设计摘要:超声测距技术在工业现场、车辆导航、水声工程等领域都具备广泛应用价值,当前已应用于物位测量、机器人自动导航以及空气中与水下目的探测、辨认、定位等场合。因而,进一步研究超声测距理论和办法具备重要实践意义。为了进一步提高测距精准度,满足工程人员对测量精度、测距量程和测距仪使用规定,本文研制了一套基于单片机便携式超声测距系统。核心词:超声波,测距仪,单片机 1、前言随着科技发展,人们生活水平提高,都市发展建设加快,都市给排水系统也有较大发展,其状况不断改进。但是,由于历史因
38、素合成时间住许多不可预见因素,都市给排水系统,特别是排水系统往往落后于都市建设。因而,经常浮现开挖已经建设好建筑设施来改造排水系统现象。都市污水给人们带来了困扰,因而箱涵排污疏通对大都市给排水系统污水解决,人们生活舒服显得非常重要。而设计研制箱涵排水疏通移动机器人自动控制系统,保证机器人在箱涵中自由排污疏通,是箱涵排污疏通机器人设计研制核心某些。控制系统核心某些就是超声波测距仪研制。因而,设计好超声波测距仪就显得非常重要了。2、超声波测距原理 2.1压电式超声波发生器原理压电式超声波发生器事实上是运用压电晶体谐振来工作。超声波发生器内部构造,它有两个压电晶片和一种共振板。当它两极外加脉冲信号,
39、其频率等于压电晶片固有振荡频率时,压电晶片将会发生共振,并带动共振板振动,便产生超声波。反之,如果两电极间未外加电压,当共振板接受到超声波 时,将压迫压电晶片作振动,将机械能转换为电信号,这时它就成为超声波接受器了。测量脉冲到达时间老式办法是以拥有固定参数接受信号开端为基本。这个界限恰恰选于噪音水平之上,然而脉冲到达时间被定义为脉冲信号刚好超过界限第一时刻。一种物体脉冲强度很大限度上取决于这个物体自然属性尺寸尚有它与传感器距离。进一步说,从脉冲起始点到刚好超过界限之间时间段随着脉冲强度而变化。成果,一种错误便浮现了两个拥有不同强度脉冲在不同步间超过界限却在同一时间到达。强度较强脉冲会比强度较弱
40、脉冲超过界限时间早点,因而咱们会以为强度较强脉冲属于较近物体。2.2超声波测距原理超声波发射器向某一方向发射超声波,在发射时刻同步开始计时,超声波在空气中传播,途中遇到障碍物就及时返回来,超声波接受器收到反射波就及时停止计时。超声波在空气中传播速度为340m/s,依照计时器记录时间t,就可以计算出发射点距障碍物距离(s),即:s=340t/2图1 电路原理图3、超声波测距系统电路设计系统特点是运用单片机控制超声波发射和对超声波自发射至接受来回时间计时,单片机选用C51,经济易用,且片内有4KROM,便于编程。电路原理图如图1所示。3.1 40kHz 脉冲产生与超声波发射测距系统中超声波传感器采
41、用UCM40压电陶瓷传感器,它工作电压是40kHz脉冲信号,这由单片机执行下面程序来产生。puzel: mov 14h,#12h;超声波发射持续200mshere: cpl p1.0 ; 输出40kHz方波 nop ; nop ; nop ; djnz 14h,here; ret前方测距电路输入端接单片机P1.0端口,单片机执行上面程序后,在P1.0 端口输出一种40kHz脉冲信号,通过三极管T放大,驱动超声波发射头UCM40T,发出40kHz脉冲超声波,且持续发射200ms。右侧和左侧测 距电路输入端分别接P1.1和P1.2端口,工作原理与前方测距电路相似。3.2超声波接受与解决接受头采用与
42、发射头配对UCM40R,将超声波调制脉冲变为交变电压信号,经运算放大器IC1A和IC1B两极放大后加至IC2。IC2是带有锁 定环音频译码集成块LM567,内部压控振荡器中心频率f0=1/1.1R8C3,电容C4决定其锁定带宽。调节R8在发射载频上,则LM567 输入信号不不大于25mV,输出端8脚由高电平跃变为低电平,作为中断祈求信号,送至单片机解决.前方测距电路输出端接单片机INT0端口,中断优先级最高,左、右测距电路输出通过与门IC3A输出接单片机INT1端口,同步单片机P1.3和P1.4接到IC3A输入端,中断源辨认由程序查询来解决,中断优先级为先右后左。某些源程序如下:receive
43、1: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 retiright: . ; 右测距电路中断服务程序入口 ajmp returnleft: . ; 左测距电路中断服务程序入口 ajmp return3.3计算超声波传播时间在启动发射电路同步启动单片机内部定期器T0,运用定期器计数功能记录超声波发射时间和收到反射波时间。当收到超声波反射波时,接受
44、电路 输出端产生一种负跳变,在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对于一种平坦目的,距离测量涉及两个阶段:粗糙测量
45、和精细测量。第一步:脉冲传送产生一种简朴超声波。第二步:依照公式变化回波放大器获得量直到回拨被检测到。第三步:检测两种回波振幅与过零时间。第四步:设立回波放大器所得来规格输出,假定是3伏。通过脉冲周期设立下一种脉冲。依照第二部数据设定期间窗。第五步:发射两串脉冲产生干扰波。测量过零时间与回波振幅。如果逆向发生在回波中,决定要不通过在低气压插入振幅。第六步:通过公式计算距离y。4、超声波测距系统软件设计软件分为两某些,主程序和中断服务程序。主程序完毕初始化工作、各路超声波发射和接受顺序控制。定期中断服务子程序完毕三方向超声波轮流发射,外部中断服务子程序重要完毕时间值读取、距离计算、成果输出等工作。5、结论对所规定测量范畴30cm200cm内平面物体做了多次测量发现,其最大误差为0.5cm,且重复性好。可见基于单片机设计超声波测距系统具备硬件构造简朴、工作可靠、测量误差小等特点。因而,它不但可用于移动机器人,还可用在其他检测系统中。思考:至于为什么接受不用晶体管做放大电路呢,由于放大倍数搞不好,集成放大电路,还带自动电平增益控制,放大倍数为76dB,中心频率是38k到40k,刚好是超声波传感器谐振