江苏科技信息 ›› 2015, Vol. 32 ›› Issue (36): 53-54.doi: 10.3969/j.issn.1004-7530.2015.36.019

• 论文 • 上一篇    下一篇

基于GP2Y0A02红外传感器的距离测量设计

刘超, 黄忠文   

  1. 黑龙江八一农垦大学信息技术学院,黑龙江大庆,163319;黑龙江农垦科学院,黑龙江哈尔滨,150000
  • 出版日期:2015-12-25 发布日期:2015-12-25
  • 基金资助:
    国家863资助项目%项目编号2012AA12A209。

Design of Distance Measurement Based on Infrared Sensor GP2Y0A02

Liu Chao, Huang Zhongwen   

  • Online:2015-12-25 Published:2015-12-25

摘要: 为了实现物体近距离、高精度的快速测量,文章设计了一种基于GP2Y0A02红外测距模块的单片机近距离测量系统。采用红外发射接收模块作为距离传感器,STC89C52单片机作为处理器,将距离量通过串口发送到PC机。通过最小二乘曲线拟合法,对距离数据进行不同阶次的非线性拟合,并对其进行优化比较,最后得到一个6次多项式的距离测量模型,克服传感器的非线性,提高测量精度。测试结果表明,该系统结构简单可靠、体积小、测量精度高、方便使用。

关键词: 红外测距, 非线性校正, 曲线拟合

Abstract: Aim to achieve the rapid measurement at short distance and high precision ,a single chip microcomputer measuring system equipped with GP2Y0A02 infrared module was designed. Infrared receiving module was selected as the proximity sensor,STC89C52 single chip microcomputer as the processor,and the distance date is transferred to PC through serial port. The test data were firstly treated with nonlinear fitting of 3 different orders by the method of least squares curve fitting method. The 6th order polynomial distance measuring model were obtained after comparison and optimization,which overcame deficiency of the sensor nonlinear,enhanced the measurement precision. The test results indicate that this system have the beneficial advantages such as briefness and reliability, small size,high precision and convenience.