基于单片机的酒精检测器设计

 2022-08-24 09:08

论文总字数:35779字

摘 要

近年来,由醉酒驾驶而导致的重大交通事故时常出现,国家也逐渐重视起酒驾带来的危害并出台了一系列的法律法规进行惩治,因此,需要给交警携带一个能检测出机动车驾驶员是否处于酒驾状态的仪器。

本设计基于单片机的酒精检测器,目标是能够对驾驶员的呼吸气体进行测量最后能得到其体内的酒精浓度,然后根据初始的阈值设定来判断测量值是否符合交通法规要求并且进行报警。整个系统由气体采集模块、模数转换模块、单片机模块、显示模块、报警模块和键盘模块组成。气体采集模块使用MQ-3酒精传感器检测驾驶员呼吸气体中的酒精含量以0-5V的电压形式进行传输,模数转换模块在接收到传感器输出后使用ADC0809将输出转换成数字量,并传输到单片机开发板上,开发板上的STC89C52单片机芯片完成对数字量的处理并计算得到酒精浓度,然后将计算结果显示在LCD1602液晶显示器上并通过开发板上的蜂鸣器进行报警,开发板上的键盘模块供使用者选择测试和调整阈值功能。

经过软件的仿真以及实物测试的结果验证,本系统能成功完成对酒精检测浓度的工作,且基本上满足了以上对酒精检测器的目标要求。

关键词:乙醇传感器,单片机,酒精浓度,模数转换 ,酒精检测器

Abstract

In recent years, drunk driving caused by major traffic accidents often occur, the state has gradually attached importance to the damage caused by drunk driving and the introduction of a series of laws and regulations to punish, therefore, need to carry a traffic police to detect a motor vehicle driver Whether it is in the state of wine driving equipment.

This design is based on the single-chip alcohol detector, the goal is to be able to measure the patient's breathing gas can finally get its body of alcohol concentration, and then based on the initial threshold set to determine whether the measured value in line with traffic regulations and alarm. The whole system consists of gas acquisition module, analog-to-digital conversion module, single-chip module, display module, alarm module and keyboard module. The gas collection module uses the MQ-3 alcohol sensor to detect the alcohol content of the driver's breathing gas in the form of a voltage of 0-5V. The analog-to-digital conversion module uses ADC0809 to convert the output to digital after receiving the sensor output and transfer it to MCU development board, the development board STC89C52 microcontroller chip to complete the digital processing and calculate the concentration of alcohol, and then the results shown in the LCD1602 liquid crystal display and through the development board buzzer alarm, the development board The keyboard module allows the user to select the test and adjust the threshold function.

After the software simulation and physical test results verify that the system can successfully complete the work of alcohol concentration, and basically meet the above requirements of the alcohol detector.

KEY WORDS: ethanol sensor, single - chip, alcohol concentration, analog - to - digital conversion,alcohol detector

目 录

摘 要 I

Abstract II

第一章 绪论 1

1.1 研究背景及意义 1

1.2 国内外发展状况 2

1.3 研究内容 2

1.4 论文结构 2

第二章 酒精检测器总体设计 4

2.1 酒精检测器的设计任务 4

2.2 酒精检测器设计特点要求 4

2.3 实现思路 4

第三章 酒精检测器硬件设计 6

3.1 酒精检测器的整体工作原理 6

3.2 气体采集模块 7

3.3 模数转换模块 8

3.3.1 ADC0809主要特性 9

3.3.2 ADC0809引脚功能与使用 10

3.3.3 ADC0809工作原理 11

3.3.4 模数转换模块电路连接 11

3.4 单片机模块 12

3.4.1 单片机的简要介绍 12

3.4.2 STC89C52单片机芯片介绍 12

3.4.3 STC89C52单片机引脚功能与使用 13

3.4.4 STC89C52单片机的周边电路 13

3.4.5 单片机模块电路连接 14

3.5 显示模块 14

3.5.1 液晶显示器 14

3.5.2 LCD1602引脚功能与使用 15

3.5.3 LCD1602工作原理 16

3.5.4 LCD1602指令作用 16

3.5.5 显示模块电路连接 17

3.6键盘电路模块 18

3.6.1键盘电路设计要求 18

3.6.2键盘电路连接 19

3.7报警电路模块 19

3.8单片机开发板的使用 20

第四章 酒精检测器软件设计 21

4.1主程序设计流程 21

4.2模数转换模块设计方案 22

4.3 LCD子函数设计 22

4.4 键盘子函数设计 22

4.5 电压值与酒精浓度的转换关系 23

4.6课题使用软件的介绍 23

第五章 仿真与实验 25

5.1仿真 25

5.2实物测试 27

5.3实物测试结果 29

5.4设计过程中遇到的困难与问题 29

第六章 总结与展望 30

6.1对设计过程的总结 30

6.2对酒精检测器未来发展的展望 30

致 谢 31

参考文献 32

附 录 33

第一章 绪论

1.1 研究背景及意义

当我们看到拜仁慕尼黑的球员们在赢得德国杯冠军之后,他们互相之间将啤酒泼洒到对方的身上用以庆祝,我们可以意识到,在这个世界上,酒精给人们带来的是放松与享受、舒畅和愉悦;当我们看到一群妇女与孩子围在一辆已经由于酒驾而导致的交通事故冒着黑烟变成废铁的汽车之前掩面哭泣时,我们又可以意识到,酒精也有可能给人们带来无数痛苦与伤感的回忆,并且酿出不可挽回的惨剧。由此可见,在各种饮用酒中大量存在的酒精对我们来说是一把“双刃剑”,我们经常对它爱不释手,但是在一些意外事故面前,我们又对它极其憎恨。

剩余内容已隐藏,请支付后下载全文,论文总字数:35779字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;