




已阅读5页,还剩12页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
精品文档 1欢迎下载 中中英英文文翻翻译译 课题 基于单片机的超声波测距系统的设计 专业专业电气工程及其自动化电气工程及其自动化 学生姓名学生姓名孙旺孙旺 班级班级M M 电气电气 112112 学号学号 11514022281151402228 指导教师指导教师吴冬春吴冬春 专业系主任专业系主任顾春雷顾春雷 撰写日期撰写日期20152015 年年 3 3 月月 1313 日日 电气工程学院电气工程学院 精品文档 2欢迎下载 精品文档 3欢迎下载 外文原文 UltrasonicUltrasonic rangingranging systemsystem designdesign Publication title Sensor Review Bradford 1993 Vol 13 ABSTRACT Ultrasonic ranging technology has wide using worth in many fields such as the industrial locale vehicle navigation and sonar engineering Now it has been used in level measurement self guided autonomous vehicles fieldwork robots automotive navigation air and underwater target detection identification location and so on So there is an important practicing meaning to learn the ranging theory and ways deeply To improve the 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 developed Keywords Ultrasound r Ranging System Single Chip Processor 1 Introductive With the development of science and technology the improvement of people s 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 factors 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 to the city sewage and drainage culvert in the sewage treatment system comfort is very important to people s 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 core Control System is the 精品文档 4欢迎下载 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 generator 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 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 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 精品文档 5欢迎下载 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 3 Ultrasonic Ranging System for the Second Circuit 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 in Figure 2 精品文档 6欢迎下载 Figure 1 circuit principle diagram 3 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 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 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 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 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 精品文档 7欢迎下载 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 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 精品文档 8欢迎下载 difference calculating the distance Some of its 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 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 精品文档 9欢迎下载 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 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 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 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 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 ultrasonic sensors frequency 精品文档 10欢迎下载 REFERENCES 1 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 Gives 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 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 Correction Sensor Review Vol 9 No 3 1989 pp 153 5 精品文档 11欢迎下载 外文译文外文译文 超声波测距仪系统设计超声波测距仪系统设计 摘要 超声测距技术在工业现场 车辆导航 水声工程等领域都具有广泛的应用 价值 目前已应用于物位测量 机器人自动导航以及空气中与水下的目标探测 识别 定位等场合 因此 深入研究超声的测距理论和方法具有重要的实践意义 为了进一 步提高测距的精确度 满足工程人员对测量精度 测距量程和测距仪使用的要求 本 文研制了一套基于单片机的便携式超声测距系统 关键词 超声波 测距仪 单片机 1 前言 随着科技的发展 人们生活水平的提高 城市发展建设加快 城市给排水系统也 有较大发展 其状况不断改善 但是 由于历史原因合成时间住的许多不可预见因素 城市给排水系统 特别是排水系统往往落后于城市建设 因此 经常出现开挖已经建 设好的建筑设施来改造排水系统的现象 城市污水给人们带来了困扰 因此箱涵的排 污疏通对大城市给排水系统污水处理 人们生活舒适显得非常重要 而设计研制箱涵 排水疏通移动机器人的自动控制系统 保证机器人在箱涵中自由排污疏通 是箱涵排 污疏通机器人的设计研制的核心部分 控制系统核心部分就是超声波测距仪的研制 因此 设计好的超声波测距仪就显得非常重要了 2 超声波测距原理 2 1 压电式超声波发生器原理 压电式超声波发生器实际上是利用压电晶体的谐振来工作的 超声波发生器内部 结构 它有两个压电晶片和一个共振板 当它的两极外加脉冲信号 其频率等于压电 晶片的固有振荡频率时 压电晶片将会发生共振 并带动共振板振动 便产生超声波 反之 如果两电极间未外加电压 当共振板接收到超声波 时 将压迫压电晶片作振动 将机械能转换为电信号 这时它就成为超声波接收器了 测量脉冲到达时间的传统方法是以拥有固定参数的接收信号开端为基础的 这个 界限恰恰选于噪音水平之上 然而脉冲到达时间被定义为脉冲信号刚好超过界限的第 精品文档 12欢迎下载 一时刻 一个物体的脉冲强度很大程度上取决于这个物体的自然属性尺寸还有它与传 感器的距离 进一步说 从脉冲起始点到刚好超过界限之间的时间段随着脉冲的强度 而改变 结果 一种错误便出现了 两个拥有不同强度的脉冲在不同时间超过界限 却在同一时间到达 强度较强的脉冲会比强度较弱的脉冲超过界限的时间早点 因此 我们会认为强度较强的脉冲属于较近的物体 2 2 超声波测距原理 超声波发射器向某一方向发射超声波 在发射时刻的同时开始计时 超声波在空 气中传播 途中碰到障碍物就立即返回来 超声波接收器收到反射波就立即停止计时 超声波在空气中的传播速度为 340m s 根据计时器记录的时间 t 就可以计算出发射 点距障碍物的距离 s 即 s 340t 2 精品文档 13欢迎下载 图 1 电路原理图 3 超声波测距系统的电路设计 系统的特点是利用单片机控制超声波的发射和对超声波自发射至接收往返时间的 计时 单片机选用 C51 经济易用 且片内有 4K 的 ROM 便于编程 电路原理图如图 1 所示 3 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 端口 工作原理与前方测距电路相同 3 2 超声波的接收与处理 接收头采用与发射头配对的 UCM40R 将超声波调制脉冲变为交变电压信号 经运 算放大器 IC1A 和 IC1B 两极放大后加至 IC2 IC2 是带有锁 定环的音频译码集成块 LM567 内部的压控振荡器的中心频率 f0 1 1 1R8C3 电容 C4 决定其锁定带宽 调节 R8 在发射的载频上 则 LM567 输入信号大于 25mV 输出端 8 脚由高电平跃变为低电平 作为中断请求信号 送至单片机处理 前方测距电路的输出端接单片机 INT0 端口 中断优先级最高 左 右测距电路的 输出通过与门 IC3A 的输出接单片机 INT1 端口 同时单片机 P1 3 和 P1 4 接到 IC3A 的 输入端 中断源的识别由程序查询来处理 中断优先级为先右后左 部分源程序如下 精品文档 14欢迎下载 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 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 精品文档 15欢迎下载 MOV 30H A SETB EX0 开外部中断 0 POP ACC POP PSW RETI 对于一个平坦的目标 距离测量包括两个阶段 粗糙的测量和精细测量 第一步 脉冲的
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 航空航天复合材料 课件知识点1 金属基复合材料的制备工艺
- 员工的素质培训
- 神经内科痴呆患者护理查房
- 护理质量管理分析讨论会
- 元旦晚会帷幕课件
- 医疗机构消毒技术规范培训
- 肿瘤患者入院宣教
- 夏季高温作业防暑安全培训
- 2025年中国南瓜蜡烛行业市场全景分析及前景机遇研判报告
- 肿瘤患者临终关怀个案研究
- 小学语文跨学科主题学习策略研究
- 2022-2023学年浙江省温州市永嘉县人教PEP版四年级下册期末测试英语试卷
- 东盟经贸文化与习俗知到智慧树章节测试课后答案2024年秋海南外国语职业学院
- 国家开放大学专科《社会调查研究与方法》期末纸质考试总题库2025春期考试版
- 2024年设备监理师考试题库及答案(历年真题)
- 财务指标分析培训课件
- 病案分析报告范文
- 工业自动化设备维护保养操作手册
- vte预防健康教育课件
- 高三英语一轮复习备考实践经验分享 课件
- 核技术在环保领域的应用
评论
0/150
提交评论