基于单片机的智能小车的设计基于单片机的智能小车的设计摘要单片机作为一种微型控制器,自走入人们的视野以来,就随着科技进步不断地更新换代。它能够将计算机所有关键的零件整合集中在一块芯片上,并且具有强大的计数功能,以及各种必要的接口,因此单片机在自动控制系统中通常处于核心地位。本文对于智能小车的设计思路就应用了最常见的AT89S51单片机作控制处理器,该单片机在低功率的基础上,能够保持其性能在一个较高的水平上,且其8K的处理器够灵巧,适用于嵌入式产品,在众多单片机中,表现较为优秀。本设计是在单片机的基础上实施的,兼具数据处理、即时调控和报警提醒功能,小车接到行驶指令后,红外探头会检测路况信息(是否处在黑线路径范围内)并反馈给单片机处理,单片机判断后作出相应指令,由电机驱动使小车执行相应行驶动作。单片机与系统的配合使智能小车的行驶保持灵敏迅速的状态。关键词:单片机寻迹报警红外线电机驱动I基于单片机的智能小车的设计AbstractWiththerapiddevelopmentofscienceandtechnologyinrecentyears,SCMapplicationsarecontinuallydeepening.Traditionalcontroltestdriveatthesametime,therapidlygrowingupdate.Inreal-timedetectionandcontrolofthemicrocomputerapplicationsystem,themicrocontrollerisoftenusedasacorecomponent.SCMisthemainfeatureintegratedcomputerchipinamicro-computer.Itisasetofmulti-countingandtheinterfaceinoneofthemicro-controller.The51single-chipmicrocontrolleristhemosttypicalandmostrepresentativeone.ThedesignofthemainapplicationAT89S51asthecontrol,anddisplaydriverintegratedcircuitsandothersystems.Basedonsinglechipdesign.MCUAT89S51usingthecontrollerasanalarmdevicethatcangivefullplaytoAT89S51ofdataprocessingandreal-timecontrolfunctions.Makethesystemworkinthebestcondition,improvethesystemsensitivity.Whentwosignaldrivenforwardbycartracingmodule,theinfraresonwhethertoproducelevelsignalsthroughtheblack,retutnagainaccordingtorequirementofdesignprocedureofjudgmentformotordrivermodule,itcontrolsthecarturningbackforwardofrunningontheblackline.Keywords:SCM,Tracing,Alarmdevice,Levelsignals,MotordrivermoduleII基于单片机的智能小车的设计目录摘要.................................................................................................IAbstract....................................................................................................II目录.............................................................................................III前言.................................................................................................11设计任务及方案..........................................................21.1设计任务及要求............................................21.2设计方案论证...................................................21.2.1控制器选择.......................................................21.2.2电机驱动芯片的选择...........................31.2.3路况检测模块................................................42系统硬件电路与实现............................................52.1红外遥控及解码模块..............................52.1.1二进制信号的调制..................................62.1.2二进制信号的解调..................................72.1.3二进制信号的解码..................................72.2单片机红外接收硬件电路的实现82.3电机驱动模块...................................................92.4路况检测模块................................................132.4.1寻迹模块..........................................................142.4.2智能防撞报警模块..............................163系统软件设计与实现.....