毕业设计(论文)基于51单片机的车载防撞报警器基于51单片机的车载防撞报警器摘要超声波的测距由于在使用的时候不受光照度、电磁场与色彩等因素影响,再加上超声波传感器的结构简单,成本低廉,并且以声速传播,便于检测与计算,在机器人的避障、汽车倒车、测量等许多方面都已有了非常广泛的应用。本文是基于STC89C51单片机为核心的车载防撞报警器的设计,分析了汽车倒车防撞系统的基本的设计原理。主要是利用了超声波的特点与优势,还将超声波的测距系统与STC89C51单片机结合于一体。该系统采用软、硬件结合的方式,硬件部分主要是由单片机硬件接口电路与超声波发射电路、超声波接收电路与数码管显示电路、电源电路与报警电路组成的,软件部分主要是由主程序和超声波发射接收中断程序、距离计算子程序和显示报警子程序等部分组成的具有模块化与多用化的特点。驾驶者只需要坐在汽车驾驶室就可以做到心里有数,极大地提高泊车和倒车的时候安全性与效率。关键词:超声波、LED、测距、传感器I51carcollisionavoidancesystembasedonAbstract【Abstract】Ultrasonicrangingcaranti-collisionsystembasedon51,introducestheprincipleandsystemframeofultrasonicdistancemeasurement,theultrasonictransmitterandreceivercircuit,theblindareaelimination,toimprovethemeasurementaccuracy.Therelationbetweenultrasonictransmissiondistanceandtime,using51single-chipmicrocomputercontrolanddataprocessing,designtheultrasonicliquidleveldetectionsystemforaccuratemeasurementofdistancebetweentwopoints.Thesystemismainlycomposedoftheultrasonictransmittercircuit,ultrasonicreceivercircuit,single-chipmicrocomputercontrolcircuit,keyboardcircuitanddisplaycircuit.Theuseofultrasonicrangingautomotiveanti-collisionsystemaredesigned,therunningdistancebetweenvehiclesweretested,twocarcollectionwastooclosetothesystemwillsendoutsoundandlightalarmtowarnthedriverresponseaction.Thissystemhastheadvantagesofeasycontrol,reliableoperation,highmeasuringprecision,real-timevehicledistancedetecting.【KeyWords】Ultrasonic,LED,location,sensorII目录1绪论..........................................................................................................................................11.1项目背景...........................................................................................................................11.2项目的主要任务...............................................................................................................32超声波概述..............................................................................................................................42.1超声波基本理论...............................................................................................................42.1.1超声波发展史............................................................................................................42.1.2超声波的本质............................................................................................................52.1.3超声波的应用............................................................................................................52.1.4超声波的衰减特性....................................................................................................73超声波测距方法与原理..........................................................................................................93.1超声波测距方法...............................................................................................................93.1.1方法种类介绍和说明................................................................................................93.2超声波测距原理与超声波传感器.................................................................................103.2.1超声波测距原理......................................................................................................103.2.2超声波传感器..........................................................................................................114系统电路设计........................................................................................................................164.1电路设计.........................................................................................................................164.1.1发射与接收电路设计方案......................................................................................164.1.2显示电路设计方案..................................................................................................174.1.3报警电路设计方案..................................................................................................194.1.4系统复位电路设计..................................................................................................204.2电路调试及性能分析.....................................................................................................224.2.1元器件的焊接..........................................................................................................224.2.2电路调试与分析......................................................................................................225系统硬件与软件设计............................................................................................................235.1硬件与软件设计.............................................................................................................235.1.1硬件设计..................................................................................................................23III5.1.2软件设计..................................................................................................................256系统误差分析与改进............................................................................................................286.1误差产生原因分析.......................................................................................