资源描述:
《基于单片机测速系统设计》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、基于单片机自行车测速系统设计摘要:随着科技的迅速发展,单片机的应用也越来越广泛,并带动传统控制检测技术不断更新。现在的车速表大多是电子式的,用LED数码管或LCD即时显示,显示更加直观。电子式车速表采用接触车速传感器代替软轴传动,可使车速表的安装位置不受距离限制,进一步有效地克服了机械式车速表中的诸多不足。本次设计给出了以AT89C2051为核心,利用单片机的运算和控制功能,并采用系统化LED显示模块实时显示所测速度的设计方案,以及串口数据存储电路和系统软件。该方案由于使用了数码管显示模块和E2PROM,以及高效快速算法,因而可在节约系统资源和简化程序设计的基础上保证测量精度
2、和系统实时性。其中信号预处理电路包含信号放大、波形变换和波形整形:信号预处理电路中的放大器用于对待测信号进行放大,以降低对待测信号的幅度要求;波形变换和波形整形电路则用来将放大的信号转换成可与单片机接口的TTL信号。通过单片机的设置可使INT0引脚能够对内部定时器T0的工作进行控制,这样能精确地测出加到INT0引脚的正脉冲宽度(即测出脉冲信号的期)。速度显示部分采用数码显示,所得的数据采用I2C总线,并通过E2PROM来存储,因而节省了所需单片机的口线和外围器件,同时也简化了显示部分的软件编程。本方案实现了电动车速度即时显示,并可通过控制两个按键显示速度或里程,同时加入了超速
3、语音报警功能,使之更加人性化。关键词:单片机;霍尔传感器;数码显示;语音报警;DC/DC变换器Thebicycle’Speedsystemdesignbasedonsingle-chipTonghaichen(SchoolofInformationEngineering,HebeiUniversityofTechnology,Tianjin300401,China)Abstract:Withtherapiddevelopmentoftechnology,moreandmorewidespreadapplicationofmicrocomputer,andpromotethet
4、raditionalcontroldetectiontechnologyconstantlyupdated.Electronicspeedometerflexibleshaftusingthecontactspeedsensorinsteadofdriving,speedtablescanbeinstalledwithoutdistancelimitations,andfurthertoeffectivelyovercomethemechanicaldisadvantagesofspeedinthetable.TheAT89C2051isdesignedtogivetheco
5、reofcomputingandtheuseofmicrocomputercontrol,andadoptingasystematicLEDdisplaymoduleshowsthemeasuredreal-timespeeddesign,andtheserialdatastoragecircuitsandsystemsoftware.TheprogramduetotheuseofthedigitaldisplaymoduleandE2PROM,andefficientfastalgorithm,thussavingresourcesandsimplifyingprogram
6、mingsystembasedonthesystemtoensureaccuracyandreal-time.Signalpre-processingcircuitwhichincludessignalamplification,waveconversionandwaveformshaping:signalpre-processingcircuitintheamplifierfortheamplifiedsignalcouldbetoreducetherequirementsonsignalamplitude;wavetransformationandwave-shaping
7、circuitryisusedtoenlargethesignalconvertedintoTTLsignalswiththemicrocontrollerinterface.TheINT0pinisaddedtothepulsewidth(iemeasuredpulsesignalperiod).Speeddisplaypartofadigitaldisplay,thedatacollectedusingI2Cbus,andthroughE2PROMtostore,thussavingtheneedm