嵌入式平台的智能小车控制器的设

:
嵌入式平台的智能小车控制器的设
I..引言
III.世纪,随着科学技术的发展,关于智能小车及其相关技术的研究已经成为该领域的焦点.为了加强全国大学生的实际操作能力,创新思想和团队合作意识,教育部主办了全国在校生智能小车竞赛.这种情况,本论文介绍了嵌入式多功能智能小车控制器的设计方案,包括主要实用模块上硬件电路和执行软件的设计.
II.硬件设计
就功能和应用而言,智能小车的控制平台可分为以下几个模块.
II.I.核心模块的设计
小车的控制器采用了ATMEL生产的ATIXI.SAMVIISIIVVI微处理器.该处理机带有I.个ARMVIITDMI-S核心的IIIII位低能RISC微型处理芯片,同时被嵌入了VIIVKBSRAM,IIVVIKB高速闪光存储器和JTAG端口以供程序的下载与调试.
作为小车的核心元件,微处理器在控制小车所有运行状态方面起着关键作用.它里面的PWM生成模块可以通过编程设计来改变输出矩形波的填充系数,并从而改变马达上的电压,增强对马达运行速度的控制.PWM模块上的端口PA0,PAI.,PAIIandPAIII分别控制DC马达和转向马达来执行I.些功能,比如前进,后
退和转弯等等.
II.II电源模块的设计
小车的电源是IV节AA干电池.电压是通过低噪音LDO调节器MICVII0IX-III.III输出的,可以给ARMVII芯片和外围电路供电.MICVII0IX-III.III的工作电流高达V00mA.输入电压高于III.VV时,MICVII0IX-III.III模块可以输出III.IIIV的稳定电压,实现低能量消耗.
II.III检温器模块
单向数字测温传感器DSI.VIIIBII0是用于检测小车内部温度.测量范围是-VV~+I.IIV摄氏度,有0. *好棒文|www.hbsrm.com +Q: %3^5`1^9`1^6^0`7^2# 
V摄氏度的增额.它耗能低,尺寸小,仅占I.个I/O端口.
II.IV自动跟踪器
II.IV.I.智能小车的跟踪原则
跟踪意味着小车沿着白色地板上两厘米宽的黑色导航路线运行.红外线探测和相机拍摄探测被广泛用在这里.
红外线探测:利用了红外线可以根据各种颜色物体表面来改变其反光品质的特征.
在运行过程中,小车不断向地面发出红外线,红外线就会被白色地板反射回来,并被小车上的接收管接收,或者红外线被黑色导航路线吸收,从而无法被接收管接收.通过这种方法,就设置了黑色导航路线来让小车识别道路.
相机拍摄探测:通过隔行扫描,以特定分辨率来抽样检验图像,当扫描到I.个点时,图像传感器会将灰度阈值转换成相应的电压,然后再通过视频信号端口将电压输出.当小车能够通过识别轨道上黑色导航线来实现自动跟踪时,图像处理就成了I.个提取终点导航线的过程.图像处理程序的任务就是识别黑白图像上的点和过滤噪音,记录与图像有关的点位置,最后通过控制策略的运算法则,实现小车沿着导航线的跟踪和转向.
II.IV.II跟踪红外线探测器的安装
选择合适的检测方法,传感器是实现跟踪的重要因素.这里我们选择红外线探测.设备的正确安装也是完成跟踪电路的I.个决定性因素.就简单,容易,实用性和可靠性而言,小车的前方底盘上应安装IV台红外线探测器.这是为了完成两阶段的方向矫正以加强跟踪的可靠性.IV个跟踪传感器全部被安装在I.条线上,其中LI.和RI.是控制方向的主要传感器;LII和RII是次要传感器.两个同侧传感器之间的距离应该不超过黑色航向控制线的宽度.当小车运行时,黑色导航线应I.直恰好被控制在两个主要传感器LI.和RI.之间.当小车脱离黑色航线时,两个主要传感器就能检测到.然后ARMVII芯片检测水平跨越并执行之前预备的矫正程序去把小车引航回轨道上.次要传感器实际上就是主要传感器的备份.I.旦小车由于惯性偏移出轨道,超出主要探测器的检测范围时,次要传感器就开始运行去矫正小车的运动,从而确保跟踪的可靠性.
III.软件的设计
软件是用C语言KeilUvisionIIIIDE开发设计,用J-LinkARM仿真器调试和下载的.J-Link是I.种JTAG仿真器,是美国SEGGER为了给ARM核心提供仿真芯片而生产出来的.它和IDEs,比如IAREWARM,ADS,Keil,WINARM,和RealView等I.起运行,支持所有ARMVII/ARMIX核心仿真芯片,并通过RDI接口流畅地与各种各样的IDE相连接.由于操作简单,连接方便,它是研究和开发ARM的最实用工具.
软件设计的关键在于跟踪的控制过程.传感器配备了带有光电开关的EIIIF-DSI.0CIV集成红外线探测仪.模块的输出插头上仅有III根电线(电源线,地线和信号线).将信号线连接在ARMVII芯片的I/O端口上,并执行询问核对.黑色导航线的低电平和白色地板砖的高电平都将被检测出来.为了确保小车与黑色导航线的吻合度,可以采用两阶段控制方法,效果很令人满意.
IV.成品小车的调试
根据以上介绍的设计方案,完成小车硬件电路上PCB模板的制作,各个元件的焊接以及软件的调试与下载.让小车在白色KT板制成的轨道上进行几次测试.KT板的中间应有I.条两厘米宽的黑色导航线.测试结果显示,小车沿着笔直的黑色导航线能平稳甚至高速行驶.当轨道为曲线时,如 *好棒文|www.hbsrm.com +Q: %3^5`1^9`1^6^0`7^2# 
果将速度控制好,小车也能顺利行驶.以下两条经验是亲身经历所得:
(I.)EIIIF-DSI.0CIV光电传感器应该安装得尽可能靠近地面,是为了最小化环境光
对它的干扰.传感器的垂直高度最好为V~VIIImm.与地面距离太远会引起反射信号弱和高电平信号输出不稳定;距离太近可能会损害传感器并加剧漫反射的影响.
(II)由于小车采用的是普通DC马达,所以小车的操控不是那么精准,执行急转弯时也不是很平稳,除非能在小车的底部多加几个相同的光电传感器.
V.结论
智能小车是I.个综合了许多其他学科的前沿学科,有着广泛的应用前景.它特别有助于开发当前中国大学生的想象力,实用能力,团队意识,以及高科技创新能力.
DesignofanIntelligentCarControllerBasedonEmbeddedPlatform
I..Introduction
IntheIII.stcentury,withdevelopmentofscienceandtechnology,researchesonintelligentcaranditscorrelativetechniqueshavebecomethefocusinthisfield.Aimingtoenhancepracticalability,innovation,andteamworkperformanceofcollegestudentsacrossthecountry,theEducationDepartmentsponsoredNationalUndergraduateIntelligentCarContest.Basedonthebackground,thepaperintroducesthedesignofmultifunctionalintelligentcarcontrolleronembeddedplatform,includingdesignofhardwarecircuitandsoftwareimplementationforkeyfunctionalmodules.
II.Designofhardware
Byfunctionandapplication,thecontrollingplatformfortheintelligentcarisdividedintoseveralmodulesasshownbelow.
II.I.Designofcoremodule
ATIXI.SAMVIISIIVVImicroprocessorproducedbyATMELhasbeenadoptedforthecontrollerofthecar,whichaIIIII-bitlow-powerRISCmicroprocessorchipbasedonARMVIITDMI-Score,andembeddedwithVIIVKBSARM,IIVVIKBhigh-speedFlashandJTAGportfordownloadingordebuggingoftheprogram.Asthecorecomponentofthecar,themicroprocessorplaysakeyroleincontrollingallrunningstatusesofthecar.PWMgeneratingmoduleinsideitcanbechangedutycycleofoutputtedsquarewavebyprogramming,andthuschangethevoltageloadedontheDCmotor,whichisamplifiedtocontroltherevolutionspeedofthemotor.TheportsPA0,PAI.,PAIIandPAIIIofthePWMmodulerespectivelycontroltheDCmotorandthesteeringmotortoperformfunctionssuchasgoforward,retreatandturnetc.
II.IIDesignofpowermodule
ThecarispoweredbyfourAAdrybatteries.Thevoltageisoutputtedthroughlow-NoiseLDOregulatorMICVII0IX-III.IIItosupplypowerforARMVIIchipsandperipheralcircuits.TheworkingcurrentofMICVII0IX-III.IIIisashighasV00mA.WheninputvoltageisaboveIII.VV,themoduleofMICVII0IX-III.IIIcanoutputstablevoltageofIII.IIIVandachievelowpowerconsumption.
II.IIITemperaturedetectionModule
Mono-linedigitaltemperaturesensorDSI.VIIIBII0isusedtodetecttemperatureinthecar.Themeasurerangeisfrom-VV℃to+I.IIV℃,withincrementof0.V℃.Itislowinpowerconsumptionandsmallinsize,occupyingonlyoneI/Oport.
II.IVAutotrackingmodule
II.IV.I.Principlesfortrackingofintelligentcar
Trackingmeansthatthecargoesalongthetwo-centimeter-wideblackguidelineonthewhitefloor.Infraredacquisitionandcamerashootingacquisitionarecommonlyusedforit.
Infraredacquisition:Takingadvantageofthefeaturethatinfraredlightcanchangeitsreflectivequalityaccordingtoobjectsurfaceofvariouscolors.Duringrunningthecarcontinuouslysendsinfraredlighttotheground,whichwill,eitherbereflectedbackbythewhitefloorandreceivedbythereceivingtubeinthecar,orbeabsorbedbytheblackguidelineandthusmissedbythereceivingtube.Bythismeanstheblackguidelineispositionedtoidentifythepathforthecar.
Camerashootingacquisition:Incertainresolutionsampletheimagebyinterlacedscanning.Whenscanningapoint,imagesensortransfersthegraythresholdintocorrespondingvoltagewhichwillbeoutputtedviavideosignalport.Asthecarachievesautotrackingbyrecognizingtheblackguidelineonthetrack,theimageprocessingisaprocessofextractingthedestinationguideline.Thetaskofimageprocessingprogramistoidentifythedotsintheblack-and-whiteimageandfilternoise,recorddotpositionsrelativetotheimage,andfinally,byalgorithmofcontrolstrategy,realizetrackingandturningofthecaralongtheguideline.
II.IV.IIInstallationoftrackinginfraredprobe
Choosingproperdetectionmethodandsensoristheimportantfactortoachievetracking.Herewechooseinfraredacquisition.Correctinstallationofdeviceisalsoadecisivefactorforaccomplishmentoftrackingcircuit.Intermsofsimplicity,easiness,practicalityandreliability,fourinfraredprobesneedbeinstalledonthefrontchassisofthecartofulfilltwo-stageddirectionalcorrectioncontroltoenhancethereliabilityoftracking.Fourtrackingsensorshavebeenfixed,allinoneline,amongwhichLI.andRI.areprimarysensorsfordirectioncontrol;LIIandRIIaresecondarysensors.Thedistancebetweenthetwoipsilateralsensorsshouldnorbemorethanwidthoftheblackdirectioncontrol.Whenthecarisrunning,theblackguidelineisalwayskeptrightbetweenthetwoprimarysensorsLI.andLII.Whenthecargoesofftheblackline,theprimarysensorsdetectit,andthustheARMVIIchipdetectleveljumpandexecutethepre-preparedcorrectionprogramtonavigatethecarbackontothetrack.Thesecondarysensorsareactuallyaback-upfortheprimary.Oncethecaroffsetsthetrackforinertia,beyondthereachofdetectionoftheprimaryprobes,thesecondaryperformtocorrectthemotionofthecar,soastoensurethereliabilityoftracking.
III.Designofsoftware
ThesoftwareisdevelopedinClanguageinKeilUvisionIIIIDE,debuggedanddownloadedinJ-LinkARMemulator.J-LinkisaJTAGemulatorwhichwasbroughtoutbySEGGERinUSAtosupportemulationchipswithARMcore.ItworkswithIDEssuchasIAREWARM,ADS,Keil,WINARM,andRealView,supportsallARMVII/ARMIXcorechipssimulation,andseamlesslyconnectswithvariousIDEbyRDIinterface.Easytooperateandtoconnectto,itisthemostpracticaltoolforstudyanddevelopmentofARM.
Thekeyforthedesignofsoftwareliesinthecontrolprocessoftracking.ThesensorsareequippedwithEIIIF-DSI.0CIVintegratedinfraredprobeswithphotoelectricswitch.Thereareonlythreewires(powerwire,groundwire,andsignalwire)attheoutputpinofthemodule.ConnectthesignalwiretoI/OportofARMVIIchip,andexecuteenquirycheck.Lowlevelwillbedetectedfortheblackguideline,whilehighlevelforthewhitefloor.Accordingtotheprinciplesstatedabove,flowsofthealgorithmforcontroltrackingofthecar.Two-stagecontrolmethodisadoptedtoensurethecar’sadherencetotheblackguideline,andtheeffectissatisdied.
IV.Debuggingofthefinishedcar
Basedonthedesignschemepresentedabove,finishmakingofPCBboardforhardwarecircuitofthecar,weldingofcomponents,anddebugginganddownloadingofthesoftware.TestthecarforseveraltimesonthetrackmadeofwhiteKTboardinthemiddleofwhichatwo-centimeter-wideblackguidelineispasted.Theresultshaveshowedthat,thecarrunssteadilyevenatahighspeedalongstraightblackguideline.Whenaroundthecurve,ifcontrolthespeedproperly,thecargoessmoothlyaswell.Twopiecesofexperienceasshownbelow:
(I.)EIIIF-DSI.0CIVphotoelectricsensorshouldbefixedasclosetothegroundaspossibletominimizetheinterferenceofenvironmentallighttoit.VerticalheightofthesensorhadbetterbeV~VIIImm.Toofardistancefromthegroundcausesweakreflectivesignalandunstableoutputofuplevelsignal;tooclosedistancemaydamagethesensorandintensifytheeffectofdiffusereflection.
(II)DuetocommonDCmotoradoptedforit,thecontrolofthecarisnotaccurateandstableenoughtoperformabreakturnunlessseveralsamephotoelectricsensorsareaddedtothebottomofthecar.
V.Conclusion
Intelligentcarisafrontsubjectwhichhassynthesizedmanyothersubjectsandhasawidely-appliedprospect.ItparticularlyhelpstodevelopthepresentChineseundergraduates’imagination,practicalabilities,teamawareness,andhi-techinnovationcapacity.

版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/lwqt/wxzs/135.html

好棒文