基于单片机的智能小车控制专业:测控技术与仪器姓名:咸蛋小超人2013年6月本科毕业设计(论文)基于单片机的智能小车控制摘要:智能化作为现代电子产品的新趋势,是今后的电子产业的发展方向。智能化设计的电子产品可以按照预先设定的模式在一个环境里自动运作,不需要人为的管理,可应用于科学勘探、环境监测、智能家居等方面。基于单片机的智能小车控制就是其中的一个体现。本设计实现了一种基于51单片机的自动避障智能模型车系统,通过红外传感器采集路况信息,通过对检测信息的分析,自动控制转向电机转向,改变行驶路径,绕过障碍物,从而实现车稳定避障。本课题设计的智能小车,具有自动避障功能,超声波测距报警,无线电遥控等功能。关键词:智能车;51单片机;避障;红外线SmartcarbasedonSCMcontrolAbstract:Asanewtrendofmodernelectronicproducts,intelligentisthedevelopmentaldirectionofelectronicindustryafterthen.Electronicproducts,whichareintelligentlydesigned,canautomaticallyoperatefollowingthemodethatispre-set.Withoutthemanagementofhumanbeings,itcanbeusedforscientificexploring,environmentalmonitoring,intelligenthomefurnishing,etc.Oneoftheembodimentsistheintelligentcontrolcarwhichisbasedonsinglechipmicrocomputer.Inthedesign,anintelligentmodelcarsystembasedonMCU51hasbeenrealized.Itcancollecttrafficinformationwithinfraredsensors.Meanwhile,bytheanalysisofinformationexamined,itcantransferfromautomaticcontroltomotorsteeringinordertochangetherouteanddodgetheobstaclessothatthesteadyavoidanceofthebarriercancometrue.Inthispaper,acarwiththeabilityofintelligentjudgmenthasbeendesignedandmade.Itfunctionsasthedevicewhichcandodgeobstaclesautomatically,alarmwithultrasonicdistanceexamination,andremotecontrolbyradio.Keywords:SmartCart;Single-chip51;ObstacleAvoidance;Infrared目录序言............................................................................................................错误!未定义书签。第1章总体设计方案.........................................................................错误!未定义书签。1.1课题任务分析...............................................................................错误!未定义书签。1.2方案论证.......................................................................................错误!未定义书签。1.2.1小车遥控部分....................................................................错误!未定义书签。1.2.2小车驱动部分....................................................................错误!未定义书签。第2章系统硬件构成.........................................................................错误!未定义书签。2.1系统设计原理................................................................................错误!未定义书签。2.2主要元器件简介............................................................................错误!未定义书签。2.2.1STC89C52RC简介...........................................................错误!未定义书签。2.2.2NRF24L01无线收发芯片简介....................................错误!未定义书签。2.2.3L298N芯片直流电机驱动模块..................................错误!未定义书签。2.2.4红外避障模块...................................................................错误!未定义书签。2.2.5HC-SR04超声波测距模块.............................................错误!未定义书签。2.2.6蜂鸣器驱动电路..............................................................错误!未定义书签。2.2.7液晶显示电路...................................................................错误!未定义书签。2.2.8遥控部分独立按键电路..................................................错误!未定义书签。第3章软件的设计与说明..............................................................错误!未定义书签。3.1软件设计.........................................................................................错误!未定义书签。3.2软件的说明.....................................................................................错误!未定义书签。3.2.1遥控部分主程序流程.....................................................错误!未定义书签。3.2.224L01子程序流程图......................................................错误!未定义书签。3.2.3小车部分主程序流程图................................................错误!未定义书签。第4章调试与总结..............................................................................错误!未定义书签。4.1硬件部分.........................................................................................错误!未定义书签。4.1.1硬件的焊接........................................................................错误!未定义书签。4.1.224L01无线电模块...........................................................错误!未定义书签。4.1.3外接电源模块...................................................................错误!未定义书签。4.2软件部分........................................................................................错误!未定义书签。4.2.1超声波模块.......................................................................错误!未定义书签。4.3小车联调........................................................................................错误!未定义书签。4.4调试的总结.................................................................................................................20参考文献...................................................................................................................................21致谢...........................................................................................................................................22附录..............................................................................................................................................23附件1L298N电机驱动模块........................................................................................23附件2小车侧视图...........................................................................................................24附件3小车俯视图...........................................................................................................25附件4小车的遥控部分...............