基于单片机的自行车里程测速仪设计

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

毕业论文

基于单片机的自行车里程测速仪设计

院系:信息工程学院

姓名:

学号:

专业:

年级:

指导教师:

职称:

完成日期:

摘要

随着居民生活水平的不断提高,自行车不再仅仅是普通的运输、代步的工具,而是成为人们娱乐、休闲、锻炼的首选。自行车测速仪能够满足人们最基本的需求,让人们能清楚地知道当前的速度、里程、时间等物理量。

本文介绍了一种基于单片机控制的简易自动自行车速度以及里程计算系统,包括自行车里程表的硬件构成,软件逻辑以及程序代码。该里程测速系统以AT89C51作为系统控制核心,采用霍尔传感器来检测信号,通过一定时间间隔内对信号的采集,结合自行车本身车轮参数,经过单片机对采集信号进行分析计算,最终在LCD上显示车辆行驶里程、平均速度和瞬时速度,并且具有超速报警功能。该系统硬件电路简单,子程序具有通用性,完全符合设计要求。

为了便于扩展和更改,软件的设计采用模块化结构,使程序设计的逻辑关系更加简洁明了,使硬件在软件的控制下协调运作。正文中首先简单描述系统硬件工作原理,且附以系统硬件设计框图,论述了本次毕业设计所应用的各硬件接口技术和各个接口模块的功能及工作过程, 并具体描述了AT89C51接口的软、硬件调试;其次阐述了程序的流程和实现过程。仿真实验表明所设计的硬件电路及软件程序是正确的,满足设计要求。

关键词:里程/速度;霍尔元件;单片机;LCD

I

Abstract

With the development of people’s life, the bicycle is not only the universal tool of transportation and substitute for walking, but becomes the first choice of entertainment and exercising. The bicycle speedometer can fulfill the basic need of people’s life, so that they can learn the speed, the mileage, time of the bicycle.

This article describes a simple microcontroller-based control automatically bike speed and mileage calculation system, including bicycle odometer hardware structure, software logic, and program code. Velocity system of the mileage uses AT89C51 as the control core, uses the hall sensors to detect the signal within a certain time interval the signal acquisition, combined with a bicycle wheel parameters after a single-chip signal acquisition, analysis and calculation, the mileage, average speed and instantaneous speed will finally display on the LCD, and the system has speed alarm function. The system hardware circuit is simple, the subroutine is versatile, which fully meets the design requirements.

For the sake of easy to expand with the design adoption mold a logic for turning construction, making procedure designing relation that change, software more shorter and more easier to understand. Make hardware control in software descended to moderate the operation. The text inside describes the system hardware work principle in brief first, and attach with the system hardware design frame diagram, discuss this graduate design a function for applied each hardware connecting a people the technique connects with each one a mold piece and work processes, combine to describe in a specific way the AT89C51 electric circuit connects oscular and soft, the hardware adjusts to try. Expatiated the process of the procedure the next in order with realizes process. The simulation results have proved that the hardware circuits design and software program is correct, and the system can meet the designing requirement completely.

Keywords: Mileage / speed; Hall element; MCU; LCD

II

相关文档
最新文档