APP下载

基于FPGA的高精度超声波测距仪设计

2017-02-16杨秀增杨仁桓

现代电子技术 2017年1期

杨秀增+杨仁桓

摘 要: 为了提高超声波的测量精度,利用FPGA技术设计一款高精度超声波测距仪。利用Quartus Ⅱ软件在一片高密度的可编程逻辑门列阵(FPGA)上,设计基于SoPC的硬件系统平台,并利用Nios Ⅱ EDS开发软件开发测量仪的软件系统。利用FPGA内部的硬件资源设计高速度的超声波控制器,采用温度传感器DS18B20测量环境温度,并利用温度修正超声波传播速度。测试表明,利用该方案设计的超声波测距仪具有较高的距离测量精度,有一定的实用推广价值。

关键词: 超声波; 非接觸式测距; 编程逻辑门列阵; Nios Ⅱ; DS18B20

中图分类号: TN919?34; TH85 文献标识码: A 文章编号: 1004?373X(2017)01?0137?03

Abstract: In order to improve the measurement accuracy, a high?precision ultrasonic range finder was designed based on field programmable gate array (FPGA) technology. The hardware system platform based on SoPC was designed on a high?density FPGA by using Quartus Ⅱ software. The Nios Ⅱ EDS development software is used to develop the software system of the range finder. The hardware resource inside FPGA is adopted to design the high?speed ultrasonic controller. The temperature sensor DS18B20 is employed to measure the environment temperature. The temperature is used to correct the ultrasonic propagation velocity. The test results show that the ultrasonic range finder has high range measuring precision, and a certain practical promotion value.

Keywords: ultrasonic; non?contact range finding; FPGA; Nios Ⅱ; DS18B20

0 引 言

超声波测距仪是利用超声波测量距离的一种非接触式距离测量工具[1?2]。因超声波具有定向性好、使用方便、成本低廉、抗干扰能力强等优点,所以超声波测距仪在工业测量、车辆避障[1?4]、安全预警、液位测量[3?4]、机械内部损伤检[3]、车辆自动导航[4]以及机器人等领域得到广泛的应用[1?2]。然而,目前大多数超声波测距仪一般采用MCS?51单片机[5]作为控制器,其测量精度受到定时器的时钟频率的限制[3?5],难以令人满意[1?5]。

针对以上情况,本文利用大规模的FPGA[6?8]采用软硬件协同设计方法,自定义用户IP核技术和温度补偿技术,设计一套基于SoPC[9]的嵌入式高精度超声波距离测量系统。本测试系统具有可靠性高、集成度高、响应速度快、精度高和成本低廉等特点。

1 硬件系统设计

在硬件系统上,本测距仪采用一片高密度的可编程逻辑门列阵(FPGA)作为硬件设计平台,其系……

登录APP查看全文