当前位置:文档之家› 基于光电传感器自动循迹小车设计

基于光电传感器自动循迹小车设计

基于光电传感器自动循迹小车设计The Standardization Office was revised on the afternoon of December 13, 2020摘要制作自动寻迹小车所涉及的专业知识包括控制、模式识别、传感技术、汽车电子、电气、计算机、机械等诸多学科。

为了使小车能够快速稳定的行驶,设计制作了小车控制系统。

在整个小车控制系统中,如何准确地识别路径及实时地对智能车的速度和方向进行控制是整个控制系统的关键。

由于此小车能够自动寻迹,加速,减速.故又被称作为智能车.本智能车控制系统设计以MC9S12XS128微控制器为核心,通过两排光电传感器检测小车的位置和运动方向来获取轨道信息,根据轨道信息判断出相应的轨道类型,并分配不同的速度给硬件电路加以控制,完成了在变负荷条件下对速度的快速稳定调节。

红外对射传感器用于检测智能车的速度,以脉宽调制控制方式(PWM)控制电机和舵机以达到控制智能车的行驶速度和偏转方向。

软件是在CodeWarrior 的环境下用C语言编写的,用PID控制算法调节驱动电机的转速和舵机的方向,完成对模型车运动速度和运动方向的闭环控制。

智能车能够准确迅速地识别特定的轨道,并沿着引导线以较高的速度稳定行驶。

整个智能车系统涉及车模机械结构的改装、传感器电路设计及控制算法等多个方面。

经过多次反复的测试,最终确定了现有的智能车模型和各项控制参数。

关键词:MC9S12XS128;PID;PWM;光电传感器;智能车ABSTRACTMaking automatic tracing car involved the professional knowledge including control, pattern recognition, sensing technology, automobile electronics, electrical, computer, machinery and so on many subjects. According to the technical requirements of the contest, we design the intelligent vehicle control system. In the entire control system of the smart car, how to accurately identify the road and real-time control the speed and direction of the Smart Car is the key to the whole control system.Because this car can automatic tracing, accelerate, slowing down. So it is also known as intelligent car this intelligent vehicle control system design take theMC9S12XS128 micro controller as a core, examines car's position and the heading through two row of photoelectric sensors gains the racecourse information, judges the corresponding racecourse type according to the racecourse information, and assigned the different speed to control for the hardware circuit, has completed in changes under the load condition to the speed fast stable adjustment. The infrared correlation sensor uses in examining the intelligent vehicle's speed, (PWM) controls the electrical machinery and the servo by the pulse-duration modulation control mode achieves the control intelligence vehicle's moving velocity and the deflection direction.The software is under the CodeWarrior environment with the C language compilation, actuates electrical machinery's rotational speed and servo's direction with the PID control algorithm adjustment, completes to the model vehicle velocity of movement and the heading closed-loop control. The intelligent vehicle can distinguish the specific racecourse rapidly accurately, and along inlet line by the high speed control travel.The entire intelligent vehicle system involves the vehicle mold mechanism the re-equipping, the sensor circuit design and the control algorithm and so on many aspects. After the repeated test, has determined the existing intelligent vehicle model and each controlled variable finally many times.Keywords:MC9S12XS128; PID;PWM;photoelectric sensor; smart car目录第一章绪论..................... 错误!未定义书签。

引言.............................. 错误!未定义书签。

本文设计方案概述.................. 错误!未定义书签。

总体设计........................ 错误!未定义书签。

传感器设计方案.................. 错误!未定义书签。

控制算法设计方案................ 错误!未定义书签。

第二章机械结构设计............. 错误!未定义书签。

前轮倾角的调整.................... 错误!未定义书签。

齿轮传动机构调整.................. 错误!未定义书签。

后轮差速机构调整.................. 错误!未定义书签。

红外传感器的固定.................. 错误!未定义书签。

小车重心的调整.................... 错误!未定义书签。

齿轮啮合间隙的调整................ 错误!未定义书签。

第三章硬件电路的设计........... 错误!未定义书签。

系统硬件概述...................... 错误!未定义书签。

电源模块的设计.................... 错误!未定义书签。

LM2940供电电路................ 错误!未定义书签。

LM2596供电电路................ 错误!未定义书签。

电机驱动模块...................... 错误!未定义书签。

模块介绍........................ 错误!未定义书签。

使用说明........................ 错误!未定义书签。

电压电流测试结果................ 错误!未定义书签。

舵机控制模块...................... 错误!未定义书签。

路径识别模块...................... 错误!未定义书签。

单片机模块的设计.................. 错误!未定义书签。

硬件电路部分总结.................. 错误!未定义书签。

第四章软件系统设计............. 错误!未定义书签。

智能车控制算法监测平台............ 错误!未定义书签。

主程序流程图...................... 错误!未定义书签。

系统的模块化结构.................. 错误!未定义书签。

时钟初始化...................... 错误!未定义书签。

串口初始化...................... 错误!未定义书签。

PWM初始化..................... 错误!未定义书签。

中断处理流程...................... 错误!未定义书签。

小车控制算法...................... 错误!未定义书签。

舵机控制........................ 错误!未定义书签。

速度控制........................ 错误!未定义书签。

坡道的处理........................ 错误!未定义书签。

弯道策略分析...................... 错误!未定义书签。

第五章开发与调试............... 错误!未定义书签。

软件开发环境介绍.................. 错误!未定义书签。

智能车整体调试.................... 错误!未定义书签。

舵机调试....................... 错误!未定义书签。

电机调试....................... 错误!未定义书签。

动静态调试..................... 错误!未定义书签。

相关主题