基于单片机的自行车测速仪设计
基于单片机的自行车测速系统设计

基于单片机的自行车测速系统设计【摘要】本文主要是对测速系统的设计与应用进行了研究,以单片机为核心,利用A44E霍尔传感器设计出一种可以即时显示速度和路程的测速系统,并用液晶显示器LCD1602显示出来。
【关键词】传感器;单片机;即时测速1.前言随着人们对低碳生活的追求,特别是在交通拥挤的城市,自行车成为代步及休闲运动的工具。
因此爱好自行车运动的人十分需要一款能测速的装置,以便更好知道自己的运动情况。
2.总体设计整个系统是以单片机作为控制模块,其工作原理是:A44E霍尔传感器检测自行车的轮胎的运转情况,将不同的车速转变成不同的频率的脉冲信号输入到单片机进行处理和计算,最后把即时信息显示在LCD1602液晶显示器上,让人们清楚知道当前的速度、累计运动时间和路程等物理量,系统的总框图如图1所示。
我们先把磁铁放在自行车的车轮上,而霍尔传感器就放在车架,转动自行车的转轴,磁铁也就跟着一起转动,从而使霍尔传感器周围的磁场发生变化,传感器在磁钢经过时,产生一个脉冲低电压,记录自行车转动了一周。
将霍尔传感器的输出引脚与单片机的P3.2脚相连。
测速度的原理:定义测量的时间间隔为,自行车车轮转过的圈数。
假设车轮周长为,则速度为:,在中断子程序里调用时钟函数,实现时间的累加,最后在中断子程序里输出累计时间,速度和路程。
图1 测速系统总框图3.硬件选择整个系统包括了三大部分,分别是:传感器模块、单片机模块以及显示模块。
3.1 传感器的选择A44E霍尔开关集成电路应用霍尔效应原理,其输入为磁感应强度,输出是一个数字电压讯号,霍尔传感器A44E 在测速系统中的主要作用是对车轮转速信息进行采集。
它具有一致性好、性能稳定、可靠性高、响应速度快、安装简便,可和各种逻辑电路接口直接对接的特点。
3.2 单片机的选择本文选用的控制模块是AT89C52单片机,AT89C52是低电压,高性能CMOS 8位单片机,片内含8K bytes的可反复擦写的只读程序存储器(PEROM)和256 bytes 的随机存取数据存储器(RAM),与标准MCS-51指令系统及8052产品引脚兼容,片内置通用8位中央处理器(CPU)和Flash存储单元,功能强大,适合于复杂控制应用场合。
基于单片机的多功能自行车里程速度仪设计

毕业设计报告(论文) 基于单片机的多功能自行车里程速度仪设计所属系电子工程系专业自动化学号01212117姓名陆奕喆指导教师辛海燕起讫日期2016.02 ---2016.05设计地点东南大学成贤学院实验大楼502东南大学成贤学院毕业设计报告(论文)诚信承诺本人承诺所呈交的毕业设计报告(论文)及取得的成果是在导师指导下完成,引用他人成果的部分均已列出参考文献。
如论文涉及任何知识产权纠纷,本人将承担一切责任。
学生签名:日期:基于单片机的多功能自行车里程速度仪设计摘要当今社会,能源资源越来越紧缺,全世界,包括中国都在倡导绿色出行,骑车出行越来越成为一种时尚,风格,甚至一种生活态度,随着自行车的不断普及与发展,与之相关的一些配套设备也将蓬勃发展,码表就是其中之一。
一个好的码表集美观、实用、功能多样于一身,码表应该在能够正常稳定的基础上尽可能多的显示骑行者所需信息,方便骑行者调整自身。
本次设计将UBLOX- GPS芯片接收到的信息与霍尔元件接收的脉冲通过单片机处理以后传输到一块LCD12864显示芯片中,从而将定位速度信息显示出来。
本文主要介绍所用芯片的特点,并将这些芯片按照一定方式组合起来,再通过软件的编程使每个芯片发挥应有的作用。
单片机有体积小,能耗低,稳定性好的特点,可以获得理想的效果,从而产生一个优秀的自行车码表。
关键词:UBLOX- GPS;单片机;霍尔元件Design of Multifunctional Bicycle Speedmeter Based on MCUAbstractIn today's society , more and more scarce energy resources leads the world , including China,Advocating green trave . Cycling is becoming more and more fashionable, style, and even a kind of life attitude. With the popularization and development of bicycle, some related equipment will also be developed,which contains Cycle Computers. A good Cycle Computer must Contain beautiful, practical, functional diversity. Cycle Computers should be based on the stability as much as possible, and they also should display the riders the necessary information they need, to make riders adjust themselves simply.This design makes the GPS UBLOX- chip receiving the information and Holzer components receiving the pulse and then transmitted through the MCU to a LCD12864 display chip,which will display the location and speed information.This paper mainly introduces the characteristics of the used chips,and the chips are combined in a certain way. Programming through the software to play the role of each chip.MCU has a small size, low energy consumption, good stability characteristics.We can obtain ideal results,so that a great bike computer is going to be created.Keywords:UBLOX- GPS;MCU;Hall element目录摘要 (I)Abstract (II)第一章绪论 (1)1.1研究背景 (1)1.2国外现状 (1)1.3国内现状 (1)1.4发展前景 (1)1.5 功能介绍 (2)1.6设计内容与预期结果 (2)第二章系统方案设计 (3)2.1系统总体设计 (3)2.2系统设计原则 (3)2.3单片机选择 (3)2.4显示模块的选择 (4)第三章系统硬件电路 (5)3.1 主控模块 (5)3.1.1 STC89C52 (5)3.1.2 STC89C52的主要特点 (5)3.2 时钟电路 (6)3.3 复位电路 (7)3.4 GPS模块 (7)3.5 霍尔测速模块 (8)3.6 LCD 12864显示模块 (9)3.7 接口转换电路 (10)第四章系统软件 (11)4.1主程序 (11)4.2 GPS数据解析程序 (12)4.3霍尔元件处理程序 (12)4.4 LCD 12864显示模块程序 (13)4.5 小结 (13)第五章心得与体会 (15)致谢 (16)参考文献(References) (17)附录:系统总体程序 (18)第一章绪论1.1研究背景随着人们生活水平提高,越来越多的人更加注重生活质量,与世界他国的接触越来越多,文化的交融,政策的变化致使一些曾经不被人们重视的东西也越来越被人重视。
基于单片机设计的自行车测速计系统设计说明

届.别. 2013届学号毕业设计基于单片机设计的自行车测速系统姓名系别、专业导师姓名、职称完成时间word格式.目录摘要 (3)Abstract (4)1 绪论 (5)1.1 课题背景 (5)1.2 课题主要任务及容 (5)1.3 任务分析与实现 (5)2 系统设计 (6)2.1 硬件方案设计 (6)2.2 软件方案设计 (7)2.3 硬件电路设计 (8)2.3.1 概述 (8)2.3.2 系统总电路图 (9)2.3.3 单片机简介 (9)2.3.4 单片机的引脚功能介绍 (10)2.3.5 单片机中断系统介绍 (10)2.3.6 传感器及其测量系统 (11)2.3.7 霍尔传感器的测温原理 (11)2.3.8 集成开关型霍尔传感器 (12)2.4 单片机外围电路的设计 (13)2.4.1 时钟电路的设计 (13)2.4.2 复位电路的设计 (14)2.4.3 显示电路的设计 (15)3 软件程序设计 (16)3.1 概述 (16)3.2 总体程序设计 (16)3.3 中断子程序设计 (18)结论 (19)参考文献 (20)致 (20)附件一:总体原理图设计 (21)摘要随着居民生活水平的不断提高,自行车不再仅仅是普通的运输、代步的工具,而是成为人们娱乐、休闲、锻炼的首选。
自行车的速度里程表能够满足人们最基本的需求,让人们能清楚地知道当前的速度、里程等物理量。
本论文主要阐述一种基于霍尔元件的自行车的速度里程表的设计。
以 STC89C52 单片机为核心,A44E 霍尔传感器测转数,实现对自行车里程/速度的测量统计,并能将自行车的里程数及速度用LED实时显示。
文章详细介绍了自行车的速度里程表的硬件电路和软件设计。
硬件部分利用霍尔元件将自行车每转一圈的脉冲数传入单片机系统,然后单片机系统将信号经过处理送显示。
软件部分用汇编语言进行编程,采用模块化设计思想。
该系统硬件电路简单,子程序具有通用性,完全符合设计要求。
基于单片机自行车测速系统设计 (2)

基于单片机自行车测速系统设计摘要随着居民生活水平的不断提高,自行车不再仅仅是普通的运输、代步的工具,而是成为人们娱乐、休闲、锻炼的首选。
自行车的速度里程表能够满足人们最基本的需求,让人们能清楚地知道当前的速度、里程等物理量。
本论文主要阐述一种基于霍尔元件的自行车的速度里程表的设计。
以 AT89C52 单片机为核心,A44E 霍尔传感器测转数,实现对自行车里程/速度的测量统计,采用 24C02 实现在系统掉电的时候保存里程信息,并能将自行车的里程数及速度用LED实时显示。
文章详细介绍了自行车的速度里程表的硬件电路和软件设计。
硬件部分利用霍尔元件将自行车每转一圈的脉冲数传入单片机系统,然后单片机系统将信号经过处理送显示。
软件部分用汇编语言进行编程,采用模块化设计思想。
该系统硬件电路简单,子程序具有通用性,完全符合设计要求。
关键词:里程/速度;霍尔元件;单片机;LED显示Bike speed system design based on single chipABSTRACTWith the developing of people’s life, the bicycle is not only th e universal tool of transportation and substitute for walking, but becomes the first choice of entertainment and exercising. The bicycle mileage/speed can fulfill the basic need of people’s life, so that they can learn the speed and the mileage of the bicy cle. In this paper, the bicycle mileage/speed design based on the Hall element is elaborated. By AT89C52 as kernel, using A44E Hall element to measure revolution, the measure and statistic are achieved. The range information is saved by 24C02 when the power is off, the bicycle speed can be displayed on LED. In this article, the hardware circuit and software design of bicycle mileage/speed instrument are introduced in detail. About the hardware, the pulse number is transmitted of one cycle of the bicycle into Single Chip Microcomputer system. Then the signal processed by Single Chip Microcomputer system is sent to display scream. About the software, in assemble language; the program is designed in the mode of modules. The system has simple hardware, common sub-program, and meets the demand of design..Keyword:Mileage / speed; Hall element; Single chip microcomputer; LED引言自行车被发明及使用到现在已有两百多年的历史,这两百年间人类在不断的尝试和研发过程中,将玩具式的木马车转换到今日各式新颖休闲运动自行车,自行车发展的目的也从最早的交通代步的工具转换成休闲娱乐运动的用途。
基于单片机的自行车测速系统设计与实现论文

桂林电子科技大学毕业设计(论文)报告用纸第1 页摘要随着社会的进步发展和环保意识的增强,能够锻炼身体,且能环保出行的自行车成了大众的宠儿。
随自行车的快速发展,人们对自行车的功能要求也越来越高。
自行车测速仪通过测量并显示出行时的日期、时间、温度、速度和里程数,能够较好的满足人们对自行车的基本需求。
本设计通过分析自行车测速仪的原理,基于STC89C52单片机和C语言,设计和实现了一种自行车测速系统。
该系统主要包括单片机数据处理、电机测速、温度测量、时钟计时、显示数据、按键控制七大功能模块。
在系统实现中,硬件部分以STC89C52单片机为处理核心,用红外对管传感器将车轮的转数转换为电脉冲,进行处理后送入单片机,通过测量电机转的圈数,经过数据处理得到速度和路程数。
软件部分采用C语言进行编程,实现系统的控制与显示。
本系统的实现达到了预期的设计目标。
关键词:自行车测速;STC89C52单片机;红外对管传感器;C语言AbstractWith the development of social progress and environmental protection consciousness, can physical exercise, andgreen travl bicycle ,became the darling of the public. With the rapid development of bicycle, the bicycle features people are increasingly high requirements. Bicycle speedometer can display the travel date, time, temperature, speed and mileage by measuring,to better me people's basic needs for bicycle.This design through the analysis of principles of bicycle speedometer, based on STC89C52 singlechip and C language,design and implementation of a bicycle speed system.The system includes a SCM data processing, motor speed, temperature measurement, timing, data shows,key control that seven major function module.In the system realization, The hardware part with STC89C52 SCM as core processor. Using the infrared tube sensor will wheel speed is converted into electrical pulses, processed into the microcontroller.By measuring the motor cycles,after data processing, we can know the speed and distance. The software using C language programming ,to realize the system control and display. The realization of this system reaches the expected design goal.Key words:Bicycle Tachometer ;STC89C52 single chip microcomputer; Infrared tube sensor; C language目录引言 (2)1 设计要求 (2)1.1 毕业设计题目 (2)1.2 设计的主要功能 (2)2 工作原理和系统结构 (3)3 硬件设计 (4)3.1 系统总电路图 (4)3.2 单片机控制处理模块 (4)3.3红外对管测速模块 (8)3.4 DS1302时钟芯片模块 (10)3.5 DS1302温度采集模块 (12)3.6 LCD显示模块 (14)3.7 电机驱动模块 (15)3.8 按键功能、供电和串口下载模块 (15)4 软件设计 (18)4.1 Keil uVision 4软件介绍 (18)4.2 程序设计思想与开发环境 (18)4.3 主程序设计 (19)4.4 各个模块程序设计 (19)4.4.1 红外对管测速模块程序设计 (19)4.4.2 DS18B20温度测量模块程序设计 (21)4.4.3 DS1302时钟芯片模块程序设计 (24)4.4.4 LCD12864显示模块程序设计 (27)5 系统测试 (28)5.1 硬件调试 (28)5.2 软件调试 (29)5.3 对实际电路进行测试 (29)6 总结 (31)致谢 (32)参考文献: (33)附录 (34)引言自行车是传统产业,具有100多年的历史,由于环保以及交通的问题,自行车再度成为世界各国特别是发达国家居民喜爱的交通、健身工具。
基于AT89C52单片机的自行车里程与速度计的设计

自行车里程与速度计的设计本论文主要阐述一种基于单片机的自行车里程/速度计的设计。
主要分为三个部分:硬件设计,软件设计和模拟仿真。
硬件设计以AT89C52单片机为核心,主要包括复位电路、显示电路、时钟电路、报警电路的设计。
本设计采用霍尔传感器测量自行车转速脉冲, 经处理后由LED数码管显示,最多可超速时发出光、语音报警提示。
软件设计主要是通过单片机编程软件Keil C设计计算自行车行驶里程和实时速度的程序,以及速度和里程的显示程序;模拟仿真是利用仿真软件Proteus对所设计的硬件电路和程序进行测试。
本论文对设计当中所需元件作了详细介绍,对设计中存在的问题进行了说明,而后对硬件和软件部分的设计和实现作了认真的分析,并在此基础上进行了控制仿真。
本设计具有结构简单,成本低廉,显示清晰,稳定可靠等优点。
关键词:AT89C52单片机;LED;霍尔传感器THE DESIGN OF ODOMETER ANDVELOCITY GAUGEThis paper mainly tells the design of odometer and velocity gauge on bicycles based on MCU.There are three part in the thesis:hardware design,software design and simulation.The hardware design use with the core of AT89C52 as controler, includes the designs of Reset circuit,display circuit,clock circuit and alarm circuit.which hall sensor is usued to measure the pulse of rotating speed of the wheel,which is displayed by LED after processing,being able to display four figures.The alarm circuit can give a light or sound alarm when there is an overspeed or no perimeter input.The software design mostly includes the design of program on caculating the mileage and real-time speed of the bicycle with Keil C as The simulation is finished by testing the designed hardware circuit and program with the simulation software Proteus.This paper introduces the demanded components of the design in details,explaining the existing problems in the design,and seriously analyzes the design of both hardware and software,then takes the simulation here on the basis.This design can guarantee the precision measurement precision and owns high real-time performance on the basis of the system resource saving and the process of programming. it has a simple strcture, that is low cost, clear display, stable and reliable.AT89C52;LED;hall sensor目录摘要....................................................... 错误!未定义书签。
基于单片机自行车测速仪的设计毕业设计

基于单片机自行车测速仪的设计摘要本设计主要阐述一种基于单片机与霍尔传感器等元件的测速仪设计。
以AT89C51单片机为核心,实现对自行车里程、速度、时间、温度等参数的测量,并能简单的将里程及速度用LCD实时显示。
在本文中详细介绍了测速仪的硬件电路和软件设计。
硬件部分利用霍尔传感器将每秒内的脉冲数传入单片机系统,然后经单片机系统计算处理并将过处理结果送LCD显示。
软件的设计采用模块化结构,使程序的逻辑关系更加简洁。
使硬件在软件的控制下协调运作。
仿真,所设计的硬件电路及软件程序是正确的,实际的硬件电路中也基本上能够满足设计要求。
关键词:里程/速度,时间,温度,霍尔元件,单片机,LCDAbstractThis design mainly elaborated based on MCU and Hall element of speed instrument design. Take STC MCU as the core, Hall element speed, realizes to the bicycle mileage, speed, time, temperature measurement, and a simple bicycle mileage and speed with the LCD real time display. The hardware part using the Hall element will bike per second pulse number of incoming MCU system, and then by the single chip microcomputer system calculation processing and processing result to the LCD display. Program design in order to facilitate the expansion and the change, the software design uses the modular structure, make the logic relations more concise. Make hardware tocoordinatethe operation under the software control. Simulation experiments show that the designed hardware circuit and software program are correct, practical hardware circuit also basically can satisfy the design requirement, but due to the knowledge, in practice there are still some problems in the hardware circuit.Keywords: Mileage / speed,time, temperature, Hall element, MCU,LCD毕业设计(论文)原创性声明和使用授权说明原创性声明本人郑重承诺:所呈交的毕业设计(论文),是我个人在指导教师的指导下进行的研究工作及取得的成果。
基于单片机的自行车里程速度计设计 精品

基于单片机的自行车里程速度计设计摘要随着自行车行业和电子技术的发展,自行车里程速度计技术也在不断进步和提高,用户对自行车里程速度计的要求也越来越高,因此设计了自行车里程速度计。
本文主要研究了以单片机为基础的自行车里程速度器的设计。
采用STC89C52单片机为主要控制芯片,运用自行车车轮上的传感器进行计数,通过一定时间间隔对信号的采集,结合自行车本身车轮参数,经过单片机对采集信号进行分析计算,最终在液晶显示器LCD 上显示车辆行驶的里程和速度,同时运用其他按键分别自行车单里程计数,瞬时速度、最大速度和平均速度显示,具有超速报警。
该设计重点阐述了系统的工作原理、硬件构成、各部分的主要功能以及软件的结构和实现。
自行车里程速度计的设计本着安全、方便、节能、人性化的原则进行,可使现代生活显著提高。
关键词:自行车,STC89C52, LCD1602IBicycle mileage velocity meter based on MCUABSTRACTAlong with the development of the bicycle industry and electronic technology, bicycle speedometer technology is also in constant progress and improve, user demand for bicycle mileage is more and more is also high, so I chose bicycle mileage speedometer This article mainly introduced take the monolithic integrated circuit as the foundation rental car fare register design. Uses the 89C52 monolithic integrated circuit for the primary control chip, using the pressed key signal imitation rental car wheel counting signal, simultaneously utilizes other pressed keys to control the rental car movement to carry passengers separately/the spatial vehicle condition, the kilometer idea regulation/waiting time and the traveling schedule expense amount to the demonstration. The system used three groups of nixietubes, the utilization dynamic display technology has demonstrated the distance in kilometer, the standby period and the expense separately. Meanwhile carries on the design using the software programming to the monolithic integrated circuit timer, produces the waiting timed pulse signal.this article elaborated with emphasis system's principle of work, the hardware constitution, various part of major functions as well as software's structure and realizes.The mileage log system with STC89C52 as control core, using sensors to detect signals, by a certain time interval signal collection, in combination with itself, bicycle wheel parameters through single chip microcomputer for the analysis of the collected signal, finally displayed on the LCD screen LCD vehicle mileage and speed, overspeed alarm。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
毕业设计说明书
题 目:基于单片机测速仪的设计
姓 名:
学 号:
指 导 教 师:
专 业 年 级:2008级机械设计制造及其自动化专业
(机械电子工程方向)
所在学院和系:机械工程学院
完 成 日 期:2012年6月8日
答 辩 日 期:2012年6月13日
基于单片机测速仪的设计摘要来自本设计主要阐述一种基于单片机与霍尔传感器等元件的测速仪设计。以STC单片机为核心,实现对自行车里程、速度、时间、温度等参数的测量,并能简单的将里程及速度用LCD实时显示。说明书中详细介绍了测速仪的硬件电路和软件设计。硬件部分利用霍尔传感器将每秒内的脉冲数传入单片机系统,然后经单片机系统计算处理并将过处理结果送LCD显示。软件的设计采用模块化结构,使程序的逻辑关系更加简洁。使硬件在软件的控制下协调运作。仿真和实验表明,所设计的硬件电路及软件程序是正确的,实际的硬件电路中也基本上能够满足设计要求。
Keywords:Mileage / speed,time,temperature,Hall element,MCU,LCD
1
1.1课题研究的目的和意义
目前环保问题已经成为一个世界性的课题,保护环境也已经成为每个人的责任,汽车已经不能够满足现在环境的要求。且在人口众多的中国,人们的经济水平与西方国家还存在着一定的差距,人们使用的交通工具主要还是自行车,它轻巧便捷、使用简单、环保,深受大多数人的喜爱,同时也可以作为休闲运动工具,是人们锻炼身体的一种重要的工具。但随着社会的发展,人们追求的是集成更多功能于一体的自行车,它能显示当前车子行驶的速度、里程、行车时间、最高行驶速度,甚至还有GPS全球定位系统、MP3、短信、新闻播报等娱乐功能。本文就是以此为基础,设计一款简单低成本多功能的测速仪,旨在解决自行车驾驶者在行驶时能够了解当前的行驶状态,并且根据周围环境,能够做出正确的判断和操作,提高了驾驶的安全性。
1.2课题的发展概况
随着微型计算机可靠性提高和价格下降,用单片机测量电机转速技术已经成熟,但是这种技术目前主要还是用于工业生产方面,测速装置用于生活中还是少之又少。欲提高测量精度,必须先测出准确的转速,而原先在可控硅调速电路中采用的测速发电机方式已不能满足要求,必须采用数字测速的方法。转速的测量方法很多,根据脉冲计数来实现转速测量的方法主要有M法(测频法)、T法(测周期法)和MPT法(频率周期法),该系统采用了M法(测频法)。转速检测方式采用霍尔脉冲法测量转速有两种简单的方式。本设计采用频率法,检测的是输入脉冲数,这种方式又称频率法。它测出一定时间内外界所输入的脉冲的个数。在控制系统中占有非常重要的地位。对测速装置的要求是分辨能力强、高精度和尽可能短的检测时间。所设计的基于霍尔元件的脉冲发生器要求具有成本低、结构简单、使用方便、性能好等特点。
关键词:里程/速度,时间,温度,霍尔元件,单片机,LCD
THE CIRCUIT DESIGN OF VELOCIMEETER BASED ON MCU
Abstract
This design mainly elaborated based onMCUand Hall elementofspeed instrument design. Take STCMCUas the core, Hall elementspeed, realizes to the bicycle mileage, speed, time, temperature measurement, and a simple bicycle mileage and speed with the LCD real time display. The hardware part using the Hallelementwill bike per second pulse number of incomingMCUsystem, and then by the single chip microcomputer system calculation processing and processing result to the LCD display. Program design in order to facilitate the expansion and the change, the software design uses the modular structure, make the logic relations more concise. Make hardware tocoordinatethe operation under the software control. Simulation experiments show that the designed hardware circuit and software program are correct, practical hardware circuit also basically can satisfy the design requirement, but due to the knowledge and the level is limited, in practice there are still some problems in the hardware circuit.