基于单片机的汽车油箱测控电路的设计(含电路图,程序清单)(论文12000字)
摘 要
随着汽车电子进程的加快。本设计油箱测控系统由硬件和软件两部分组成。
关键词 单片机 温度传感器 油位传感器 液晶显示
Abstract
With the acceleration of the process of the automobile electron, using microelectronic technology and modern sensing theory to the design of vehicle running and monitoring system, replacing the mechanical principle of traditional way of monitoring, avoid the components by mechanical wear caused by monitoring failure, improve stability and reliability of the monitoring and control system. This paper design a based on oil tank measurement and control system based on single chip microcomputer to STC89S52 as the main control chip and values through the acquisition of the temperature sensor (DS18B20) and the oil level sensor CW15 output, the implementation of oil temperature and oil level height of the real-time measurement, temperature sensor with single bus interface and a single-chip microcomputer communication. The oil level height acquisition by AD8420 and ad0832 composition of oil level detection circuit, and the sensor input analog signal conversion to digital signal transmission to the microcontroller, microcontroller through the received data into the display LCD1602 display. Set by set three key parameters of the system of upper and lower using a buzzer to achieve the alarm output function. The design of measurement and control system of oil tank is composed of two parts, hardware and software. Hardware design using Protel to design schematic diagram, and the working principle of each function module are described in detail[9]; software first design system The main process, according to the mainstream in the process of implementation of the process, using keil software code, realize the hardware circuit of driving[10]. Through the coordination of software and hardware, completed the design target of the system. The design has the advantages of simple circuit, the advantages of strong stability, can accurate turn collecting automobile oil box temperature and height of the oil level can widely used in measurement and control system of motor vehicle fuel tank.
Keywords Single chip temperature sensor level sensor for liquid crystal display
本课题是设计基于STC89C52单片机操控的汽车油箱的测控系统,取代了传统的机械原理的监控方法,发出报警提示音;利用液位传感器实现对油箱液位高度的测量,单片机通过接到数据后,利用蜂鸣器实现对报警输出功能。本设计具有电路简单、稳定强的优点,可以广泛应用于机动车的油箱的测控系统中。通过软件和硬件的协调工作,实现对油箱温度和油箱油位高度的实时测量,完成系统设计目标。
1)选择合适的液位传感器,并对各功能模块的工作原理进行了详细的说明;软件中首先设计系统的工作主流程,将传感器输入的模拟信号转换为数字信号传输给单片机,实现对硬件电路的驱动。本文设计一款基于单片机的油箱测控系统,当采集温度值超过设置值,当油箱液位低于设置最小液位高度时发出报警提示音。
目 录
摘要 I
Abstract II
第1章 绪论 1
1.1 课题背景 1
1.2 研究现状 1
1.3 主要研究内容和方法 2
1.4 本文结构安排 2
第2章 系统总体结构 3
2.1 系统设计目标 3
2.2 系统总体设计方案 3
2.3 主要器件选型 4
第3章 系统硬件设计 8
3.1 电源电路设计 8
3.2 单片机最小系统 8
3.3 数据采集电路设计 9
3.4 键盘和显示电路 11
3.5 提示音电路 12
第4章 软件设计 14
4.1 开发环境介绍 14
4.2 主程序设计 15
4.3 键盘程序设计 16
4.4 显示程序设计 19
4.5 温度读取程序设计 21
4.6 油位高度读取程序设计 24
4.7 报警子程序设计 26
5系统调试 28
5.1硬件调试 28
5.2软件调试 28
结 论 30
参 考 文 献 31
附录 程序清单 32