摘要
针对原有超声波测距仪存在的精度不高、成本较高等问题,设计了以STC89C52单片机为核心控制单元,利用HC-SR04超声波传感器模块进行超声波检测,同时引入温度传感器对环境温度进行补偿,并加入平均值滤波算法对测量过程中的随机误差进行修正的测距仪。对比实验表明,融合了温度补偿和平均值滤波算法的超声波测距仪在测量精度方面有很大改善,绝对误差控制小于1 mm,平均相对百分误差小于0.2%,仪器兼具结构简单、性能稳定、成本低等优势。
Focusing on the problems such as low precision and high cost existed in the original ultrasonic range measurement instrument,the STC89C52 MCU is taken as the core control unit,and the HC-SR04 ultrasonic sensor module is used to carry out the ultrasonic detection.Meanwhile,a temperature sensor is adopted to compensate the environmental temperature,and the average filtering algorithm is imported to correct the random error during the measurement process.The results of comparative experiments demonstrate that the ultrasonic range measurement instrument with temperature compensation and average filtering algorithm has an obvious improvement in the measurement accuracy.The absolute error is controlled by less than 1 mm,and the average relative error is controlled by less than 0.2%.The instrument also has the advantages such as simple structure,stable performance and low cost.
作者
张春岭
梅彦平
王静
ZHANG Chun-ling;MEI Yan-ping;WANG Jing(City Institute,Dalian University of Technology,Dalian 116600,China)
出处
《工业技术创新》
2020年第1期33-37,共5页
Industrial Technology Innovation