基于单片机的汽车油耗检测仪设计
基于单片机的汽车油耗检测仪设计(任务书,开题报告,论文12200字)
摘 要
随着中国汽车保有量的不断增加,汽油和柴油等不可再生资源的逐渐减少,加上环保意识的增强,人们更加关注汽车的燃油消耗。本次设计的目的就是做出一个简易、稳定、直观的油耗监测系统。
本系统主要包括STM32单片机最小系统、油耗采集传感器、按键电路、LCD1602显示电路。系统通过传感器实时采集系统油耗值,把采集的油耗值与行走的路程数据进行相应的处理,得到相应的油耗参数;液晶显示屏显示瞬时油耗、累计油耗、里程数、百公里油耗和平均油耗。系统软件设计采用模块设计思想,以C语言作为程序设计语言,通过KEIL MDK完成程序设计,使用仿真器下载软件完成程序的烧录和在线调试。本文中设计了每个模块的流程图和程序运行思想。
通过焊接调试完成了整个油耗检测系统平台的搭建,并进行测试和验证。经过模拟验证和调试,证明了本系统能够正常的完成相关测量值的获取和显示,并具有一定的稳定性。
关键词:单片机;流量传感器;LCD1602;油耗检测
Abstract
With the increasing number of automobiles in China, the gradual decrease of non-renewable resources such as gasoline and diesel, and the gradual increase of environmental awareness, people pay more attention to the fuel consumption of automobiles. The purpose of this design is to make a simple, stable and intuitive fuel consumption monitoring system.
The whole system of this design mainly includes STM32 single chip microcomputer minimum system, oil consumption acquisition sensor, key circuit and LCD1602 display circuit. Through the sensor real-time acquisition system oil consumption value, the collected oil consumption value and the walking distance data are processed accordingly, and the corresponding fuel consumption parameters are obtained. The system I design can real-time display of instantaneous fuel consumption, cumulative fuel consumption, mileage, 100 km fuel consumption, average fuel consumption.The design software system adopts the module design idea, the C language as the programming language, completed the program design through the KEI MDK. It also uses the simulator to download the software to complete the program burning and the on-line debugging. In this paper, the flow chart of each module and the idea of program operation are designed.
The platform of the whole fuel consumption detection system is built through welding debugging, and the test and verification are carried out. Through simulation verification and debugging, it is proved that the system can normally complete the acquisition and display of relevant measurements, and has a certain stability.
[版权所有:http://DOC163.com]
Keywords: single chip microcomputer; flow sensor; LCD1602;Fuel consumption detection
[资料来源:http://Doc163.com]
[资料来源:http://doc163.com]
目 录
第1章 绪论 1
1.1研究背景和意义 1
1.2国内外研究现状 1
1.3本文研究内容 3
第2章 控制系统总体设计 5
2.1控制系统功能分析 5
2.2系统网关架构设计 5
2.3单片机芯片的选择 6
2.4显示模块电路的选择 6
2.5传感器的选择 6
第3章 系统的硬件平台设计 8
3.1系统总体框架设计 8
3.2控制中心电路设计 8
3.2.1 MCU电路设计 8
3.2.2最小系统电源电路设计 10
3.3信号采集与处理电路设计 11
3.3.1油耗采集传感器电路设计 11 [来源:http://www.doc163.com]
3.3.2 LCD1602显示电路设计 11
3.3.3按键电路设计 13
3.4系统总体电路设计 14
第4章 系统软件平台设计 16
4.1控制中心开发环境软件 16
4.1.1 ARM开发环境 16
4.1.2 ARM软件开发流程 16
4.2控制系统软件架构 18
4.3系统信号采集与处理程序设计 18
4.3.1按键检测程序设计 18
4.3.2 LCD1602程序设计 19
4.3.3流量传感器程序设计 20
第5章 系统调试与性能验证 22
5.1系统调试环境搭建 22
5.2系统软硬件调试 22
5.2.1系统软件调试 22
5.2.2系统硬件调试 23
5.3测试结果分析 24
第6章 总结 26
参考文献 27
附 录A 30
附A1 主程序 30
[资料来源:Doc163.com]
附A2 LCD1602显示程序 32
附A3 按键程序 37
附A4 外部中断程序 38
附A5 定时器中断 39
致 谢 42
[资料来源:www.doc163.com]