宇航计测技术 ›› 2019, Vol. 39 ›› Issue (5): 71-75.doi: 10.12060/j.issn.1000-7202.2019.05.13

• 论文 • 上一篇    下一篇

基于CCD自动巡线智能小车设计

司开波1;黄健1;吕林涛1   

  1. 1、西京学院信息工程学院,陕西西安 710123
  • 出版日期:2019-10-25 发布日期:2019-10-25
  • 作者简介:司开波(1982.12-),男,副教授,硕士,主要研究方向:嵌入式和信号处理技术。
  • 基金资助:
    陕西高等教育教学改革研究项目(17BY118),陕西省科学计划课题(2016GY141)资助。

Design of Auto Tracking Smart Car based on CCD

SI Kai-bo1;HUANG Jian1;LV Lin-tao1   

  1. 1、Department of electronics and information engineer,XiJing University,Xi'an 710123,China
  • Online:2019-10-25 Published:2019-10-25

摘要: 为实现小车的自动巡线,采用CCD摄像头识别不同颜色的跑道,在测试时选择了黑线。CCD具有128×1个像素,每次可采集128个线阵的数据,将其二值化后转换为128个8位二进制数,通过A/D接口输出,与STM32微处理器连接。用软件进行采集处理,采用中值算法,找到黑线两边的边缘,确定黑线的中心点。计算出小车的中心点与黑线的中心点之间的偏移量,控制小车的左转、右转还是直行。用编码器对车轮测速,用速度PID算法控制小车的行驶,以实现自动巡线。测试结果表明:该CCD巡线智能车能够实现自动巡线功能,不仅可自动循迹黑线,还可循迹其它颜色的线条,使得小车的巡线速度得以提高,为自动循迹小车提供了一种新方法、新思路。

关键词: 电荷耦合元件, 自动巡线, 智能小车, 速度PID

Abstract: ]In order to realize the automatic line inspection of the car,a CCD camera is used to identify the runway of different colors,and the black line is selected in the test.The CCD has 128×1 pixels and can collect 128 linear array data at a time.it can be converted to 128 8-bit binary numbers,which are output through A/D interface and connected with STM32 microprocessor.The software is used to collect and process the data.The median algorithm is used to find the edges on both sides of the black line and determine the center of the black line.The offset between the center of the car and the center of the black line is calculated to control whether the car turns left,right or straight.The encoder is used to measure the speed of the wheels and the speed PID algorithm is used to control the driving of the car in order to realize the automatic line patrol.The test results show that the CCD line-patrolling intelligent vehicle can realize the function of automatic line-patrolling.It can not only automatically track black lines,but also track lines of other colors,which improves the speed of the cars line-patrolling.It provides a new method and a new idea for the automatic line-following car.

Key words: Charge Coupled Device(CCD), Auto Tracking, Smart car, Speed PID