资源描述:
《基于光电传感器自动循迹小车设计.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、基于光电传感器自动循迹小车设计摘要制作自动寻迹小车所涉及的专业知识包括控制、模式识别、传感技术、汽车电子、电气、计算机、机械等诸多学科。为了使小车能够快速稳定的行驶,设计制作了小车控制系统。在整个小车控制系统中,如何准确地识别路径及实时地对智能车的速度和方向进行控制是整个控制系统的关键。由于此小车能够自动寻迹,加速,减速.故又被称作为智能车.本智能车控制系统设计以MC9S12XS128微控制器为核心,通过两排光电传感器检测小车的位置和运动方向来获取轨道信息,根据轨道信息判断出相应的轨道类型,并分配不同的速度给硬件电路加以控制,完
2、成了在变负荷条件下对速度的快速稳定调节。红外对射传感器用于检测智能车的速度,以脉宽调制控制方式(PWM)控制电机和舵机以达到控制智能车的行驶速度和偏转方向。软件是在CodeWarrior5.0的环境下用C语言编写的,用PID控制算法调节驱动电机的转速和舵机的方向,完成对模型车运动速度和运动方向的闭环控制。智能车能够准确迅速地识别特定的轨道,并沿着引导线以较高的速度稳定行驶。整个智能车系统涉及车模机械结构的改装、传感器电路设计及控制算法等多个方面。经过多次反复的测试,最终确定了现有的智能车模型和各项控制参数。关键词:MC9S12X
3、S128;PID;PWM;光电传感器;智能车ABSTRACTMakingautomatictracingcarinvolvedtheprofessionalknowledgeincludingcontrol,patternrecognition,sensingtechnology,automobileelectronics,electrical,computer,machineryandsoonmanysubjects.Accordingtothetechnicalrequirementsofthecontest,wedesig
4、ntheintelligentvehiclecontrolsystem.Intheentirecontrolsystemofthesmartcar,howtoaccuratelyidentifytheroadandreal-timecontrolthespeedanddirectionoftheSmartCaristhekeytothewholecontrolsystem.Becausethiscarcanautomatictracing,accelerate,slowingdown.Soitisalsoknownasintel
5、ligentcarthisintelligentvehiclecontrolsystemdesigntaketheMC9S12XS128microcontrollerasacore,examinescar'spositionandtheheadingthroughtworowofphotoelectricsensorsgainstheracecourseinformation,judgesthecorrespondingracecoursetypeaccordingtotheracecourseinformation,andas
6、signedthedifferentspeedtocontrolforthehardwarecircuit,hascompletedinchangesundertheloadconditiontothespeedfaststableadjustment.Theinfraredcorrelationsensorusesinexaminingtheintelligentvehicle'sspeed,(PWM)controlstheelectricalmachineryandtheservobythepulse-durationmod
7、ulationcontrolmodeachievesthecontrolintelligencevehicle'smovingvelocityandthedeflectiondirection.ThesoftwareisundertheCodeWarrior5.0environmentwiththeClanguagecompilation,actuateselectricalmachinery'srotationalspeedandservo'sdirectionwiththePIDcontrolalgorithmadjustm
8、ent,completestothemodelvehiclevelocityofmovementandtheheadingclosed-loopcontrol.Theintelligentvehiclecandistinguishthespecificracec