摘要
为了解决测距设备因环境不同而导致测量误差不稳定的问题,该文设计了一种基于STM32的超声波与激光联合测距的方法,其硬件设备主要包括STM32芯片、超声波测距模块、激光测距模块、感光模块、测温模块;软件设计主要包含激光测距和超声波测距的原理、系统工作流程、校正算法介绍等。该文利用激光与超声波影响因素的不同,通过加权平均进行补偿计算,并采用最小二乘法减小误差值。通过实验证明,该方案相较于传统的超声波测距和激光测距工具,平均误差减少了大约2%,利用此方法的测距工具具有更好的稳定性,能减小因设备工作问题和外部环境影响造成的误差,具有简单实用、经济成本低、便于操作等优点,能有效应用于倒车预警、家居测量、工程测绘等领域。
In order to solve the problem of unstable measurement errors caused by different environments of ranging equipment,we design a method of combined ultrasonic and laser ranging based on STM32.The hardware equipment mainly includes STM32 chip,ultrasonic ranging module,laser ranging module,photosensitive module and temperature measurement module.The software design mainly includes the principle of laser ranging and ultrasonic ranging,system workflow,introduction of correction algorithm,etc.According to the difference between laser and ultrasonic influence factors,the weighted average is used for compensation calculation,and the least square method is used to reduce the error value.Experiments have proved that compared with the traditional ultrasonic ranging and laser ranging tools,the average error of the proposed solution is reduced by about 2%.The ranging tool of this method has better stability and can reduce the error caused by equipment work and the external environment,with the advantages of simplicity,practicality,low economic cost and easy operation,which can be effectively used in the fields of reversing warning,house measurement,surveying and mapping engineering.
作者
江智威
刘培培
杨毅
殷佳莉
JIANG Zhi-wei;LIU Pei-pei;YANG Yi;YIN Jia-li(School of Information Science and Technology(School of Cyber Security,Oxford Brookes College),Chengdu University of Technology,Chengdu 610059,China)
出处
《计算机技术与发展》
2021年第7期171-175,共5页
Computer Technology and Development
基金
国家自然科学基金青年基金(11905020)。
关键词
STM32
超声波测距
激光测距
传感器
最小二乘法
STM32
ultrasonic ranging technology
laser ranging technology
sensor
least square method