1、摘 要 本设计实现了对不同浓度酒精的检测和显示,通过适当改进可以用于检 测酒后驾车。设计用 AT89S51 单片机与 MQ-3 型气体传感器实现了对酒精浓 度的测量,并对测量数据进行显示,同时利用 LCD 简单显示浓度的高低,在 超过允许值时发出报警,并且可以根据具体情况通过按键改变报警阀值。 硬件方面主要研究了 MQ-3 气体传感器技术参数的检测和将它接入到酒 精浓度检测模块中; 将模拟电压信号通过 LCD 显示, 并且驱动发光二极管点 亮与蜂鸣器报警;软件方面主要研究了电压到浓度的线性转换和最终浓度值 的 LCD 显示。设计的传感器对酒精气体反应灵敏,能在有效范围内测量它的 浓度值。并且在
2、检测低浓度酒精时误差较小。 本设计的传感器可以检测不同浓度的酒精气体,改进之后对解决酒后驾 车事故和特殊场合酒精检测都可以使用。 关键词:气体传感器,模数转换,单片机 Abstract The design and implementation of the different concentrations of alcohol detection and display, through appropriate improvements can be used to detect drunk driving. Designed AT89S51 microcontroller and MQ-3
3、-type gas sensors to achieve a measure of alcohol concentration, and measurement data show that while using a simple LCD display concentration level of alarm when exceeding the allowable value, and can be based on the specific circumstances through the key change the alarm threshold. The main hardwa
4、re detection MQ-3 gas sensor technology parameters and its access to the alcohol concentration detection module; analog voltage signal through the LCD display, and the drive LED lights and buzzer alarm; major research software voltage conversion, and the concentration of the final concentration of l
5、inear LCD display. Alcohol gas sensor design for responsive, able to measure its concentration within the valid range. And a low concentration of alcohol in the detection error is small. The design of the sensor can detect different concentrations of ethanol gas, after improvements to solve drunk dr
6、iving accidents and special occasions can be used to detect alcohol. Key Words: Gas sensor, A/D conversion, Single-chip Microcomputer 目目 录录 第 1 章 绪论 1 1.1 设计背景 . 1 1.2 气敏传感器的研究现状 . 2 1.3 设计酒精浓度探测仪的意义 . 3 1.4 本文主要研究工作 . 4 第 2 章 方案选择与分析 5 2.1 方案选择 5 2.1.1 控制器选择分析 5 2.1.2 显示模块的选择分析 . 6 2.1.3 传感器模块的选择分析 . 7 2.2 可行性分析 . 8 第 3 章 硬件电路设计与实现 9 3.1 单片机最小系统 . 9 3.2 信号采集电路 13 3.3 信号转换电路 15 3.4 发光二极管显示与蜂鸣器报警电路 17 3.5 LCD1602 显示电路. 18 3.6 按键 20 第 4 章 软件编程 . 21 4.1 开发环境 21 4.2 主程序流程 21 4.3 程序代码编写 23 4.3