基于单片机的酒精浓度测试系统设计--毕业论文 下载本文

基于单片机的酒精浓度测试系统设计

摘要

因酒精引起的安全问题逐年增加,酒精浓度测试系统也成为当今安全领域的研究热点。本次设计是对酒精浓度测试系统进行研究,借助编程来实现酒精浓度测试。酒精浓度测试系统的设计包含传感器、单片机、编程等多方面知识。

本次设计一共分为硬件和软件系统,其中控制芯片选用STC89C52RC单片机;选用MQ-3酒精浓度传感器作为系统的信号收集模块,利用传感器采集信号,经过模数转换将信号转换为能被单片机识别的数字信号;采用LCD液晶显示器进行最终的显示。软件系统采用C语言编程,对系统各个模块分开编写控制。本次设计的系统硬件和软件都采用模块化结构,通过对酒精浓度测试系统硬件的选择和程序的编写,最终完成了基于单片机的酒精浓度测试系统设计。

关键词:STC89C52RCRC单片机;C语言;MQ-3酒精传感器

I

Design of alcohol concentration test system based on MCU

Abstract

With the increasing safety problems caused by alcohol, alcohol concentration test system has become a hot research field in today's security field. This design is the alcohol concentration test system to study, with programming to achieve the final alcohol concentration test. Alcohol concentration test system design includes sensors, microcontrollers, programming and other aspects of knowledge.

The design of a total of hardware and software is divided into two major systems, including the central control of the hardware system core selection STC89C52RC microcontroller; use MQ-3 alcohol concentration sensor as a system of signal collection module, and the use of sensors to collect signals and signals can be converted into Single-chip identification of digital signals; using LCD liquid crystal display for the final test results show. Software system using C language programming, the system separately prepared to control the various modules. The design of the system hardware and software are modular structure, through the alcohol concentration test system hardware selection and procedures for the preparation, and ultimately completed the single-chip based on the alcohol concentration test system design.

Key Words:STC89C52RCRC microcontroller; C language; MQ-3 alcohol sensor

II

目录

1 绪论 ....................................................................................................................... 1

1.1 课题背景............................................................................................................. 1 1.2 现状及发展趋势................................................................................................. 1 1.3 研究意义............................................................................................................. 2 1.4 研究内容............................................................................................................. 2 1.5 系统总体思路..................................................................................................... 2

2 系统总体方案设计 ........................................................................................... 3

2.1 总体设计............................................................................................................. 3 2.2 处理器优势论证................................................................................................. 3 2.3 显示部分论证..................................................................................................... 4

3 硬件电路设计 .................................................................................................... 5

3.1 单片机的选择..................................................................................................... 5 3.1.1 单片机介绍.................................................................................................. 5 3.1.2 STC89C52RC单片机主要性能参数 .......................................................... 6 3.2 传感器................................................................................................................. 7 3.2.1 MQ-3酒精传感器介绍 ................................................................................ 7 3.2.2 MQ-3酒精传感器关键部件材料 ................................................................ 7 3.2.3 MQ-3酒精传感器各项技术指标 ................................................................ 7 3.2.4 MQ-3酒精传感器结构 ................................................................................ 9 3.2.5 MQ-3酒精传感器系统电路 ........................................................................ 9 3.3 模数转换器....................................................................................................... 10 3.4 电源电路........................................................................................................... 11 3.5 LCD显示........................................................................................................... 11 3.5.1 LCD1602液晶显示器主要参数................................................................ 11 3.5.2 LCD1602液晶显示器引脚及其功能........................................................ 11 3.6 报警设计........................................................................................................... 13 3.7 按键电路设计................................................................................................... 14 3.8 存储电路........................................................................................................... 15 3.9 系统硬件设计原理图分析............................................................................... 15

4 系统软件的设计 .............................................................................................. 17

III