毕业设计说明书毕业设计说明书基于STC89C52单片机的避障智能小车设计基于STC89C52单片机的避障智能小车设毕业设计说明书计摘要本文介绍了基于STC89C52单片机的避障智能小车的设计与实现。小车主要通过单片机实现对自身的控制,使其能够识别黑线并检测障碍物,实现在固定跑道内行驶并且具有自动避障功能。本设计对单片机最小系统、电机驱动、红外避障等硬件电路分别给出了相应的设计方案。依据PCB设计的原则、抗干扰措施,自行设计了印刷电路板。该设计采用STC89C52单片机为控制系统,L298N作为电机驱动,四路红外线探测系统为避障系统,单片机产生PWM波并通过L298N来对小车的方向和速度进行控制。实验测试结果基本满足要求。采用的技术主要有:(1)小车以单片机作为控制器;(2)采用红外线探测系统实现对黑线及障碍物的检测;(3)通过单片机产生PWM波并通过L298N来对小车的方向和速度进行控制。关键词:STC89C52,单片机,L298N,红外线探测系统,避障,PWM毕业设计说明书STC89C52microcontroller-basedintelligentcarobstacleavoidanceDesignAbstractThispaperdescribesthedesignandimplementationofthesmartcarobstacleavoidanceSTC89C52microcontrollerbased.TrolleyprimarilythroughMCUcontroloftheirowntobeabletoidentifytheblacklineanddetectobstaclesandachievetravelinginafixedtrackandhasanautomaticobstacleavoidancefunction.Thedesignforthesmallestsingle-chipsystems,motordrives,infraredobstacleavoidanceweregiventhecorrespondinghardwarecircuitdesign.BasedontheprinciplesofPCBdesign,anti-jammingmeasures,todesignaprintedcircuitboard.ThedesignusesSTC89C52microcontrollerforthecontrolsystem,L298Nasmotordrive,fourinfrareddetectionsystemasobstacleavoidancesystemmicrocontrollerPWMwavegeneratedbyL298Ntothedirectionandspeedofthecarcanbecontrolled.Experimentaltestresultsmeetthebasicrequirements.Technologiesusedare:(1)carmicrocontrollerasacontroller;(2)usingfourinfrareddetectionsystemtoachievethedetectionofblacklinesandobstacles;(3)generatedbythemicrocontrollerPWMwavethroughL298Ntothedirectionandspeedofthecarcanbecontrolled.Keywords:STC89C52,Microcontroller,L298N,Infrareddetectionsystem,obstacleavoidance,PWM毕业设计说明书目录1引言........................................................11.1本课题的研究背景...........................................................................11.2本课题的发展现状及前景....................................................21.2.1国外研究现状......................................................................................21.2.2国内研究现状......................................................................................31.3本课题研究的意义...........................................................................42避障智能小车总体方案论证.....................62.1直流调速方案论证...........................................................................62.2设计方案的论证..................................................................................62.2.1单片机模块的选择与论证................................................62.2.2电机驱动模块的选择与论证.........................................72.2.3避障模块的选择与论证........................................................83避障智能小车硬件设计............................93.1系统硬件设计概述...........................................................................93.2避障智能小车硬件电路设计.............................................93.2.1STC89C52单片机最小系统设计.............................................93.2.2避障模块的设计....................................................