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

编号

毕 业 设 计(论文)

题目 基于单片机的酒精浓度

测试系统设计

二级学院 电子信息及其自动化 专 业 自动化

班 级 111070102

学生姓名 陈然 学号11107990703 指导教师 陈鸿雁 职称 副教授 时 间 2015年6月

重庆理工大学毕业论文 基于单片机的酒精浓度测试系统设计

目 录

摘 要 ............................................................... I

Abstract .............................................................. II

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

1.1 酒精浓度测试的背景 .............................................. 1

1.1.1什么叫做酒后驾驶 ........................................... 1 1.1.2酒后驾驶会产生的危害 ....................................... 1 1.2酒精浓度检测仪的设计内容 ........................................ 1

2 总体方案设计 ........................................................ 2 2.1总体设计基本结构 ................................................ 2 2.2主要模块 ........................................................ 3

2.2.1 STC89C51单片机 ............................................ 3 2.2.2 LCD1602液晶显示 ........................................... 4 2.2.3 ADC0832数模转换 ........................................... 8 2.3 小结 ............................................................ 9

3 硬件设计 ............................................................ 10 3.1单片机最小系统 ................................................. 10

3.1.1.晶振电路 ................................................. 10 3.1.2 复位电路 ................................................. 11 3.2 数据采集设计 ................................................... 12

3.2.1 MQ-3酒精传感器 ........................................... 12 3.2.2 A/D转换器 ............................................... 12 3.3 按键设计 ....................................................... 13 3.4 液晶显示设计 .................................................. 14 3.5 报警设计 ....................................................... 16 3.6 小结 ........................................................... 17

4 软件设计 ............................................................ 18 4.1软件介绍 ....................................................... 18 4.2 主程序模块 ..................................................... 18 4.3 A/D转换模块 ................................................... 19 4.4 按键输入模块 ................................................... 19 4.5 液晶显示模块 ................................................... 20 4.6 小结 ........................................................... 22

重庆理工大学毕业论文 基于单片机的酒精浓度测试系统设计

5 系统调试 ............................................................ 23

5.1系统仿真调试 ................................................... 23 5.2 系统硬件调试 ................................................... 23 5.3 小结 ........................................................... 24

6 结论 ................................................................ 25 致谢 .................................................................. 26 参考文献 .............................................................. 27 附录 .................................................................. 28

附录一 硬件设计仿真与实物图 ........................................ 28 附录二 设计主程序 .................................................. 29

重庆理工大学毕业论文 基于单片机的酒精浓度测试系统设计

摘 要

随着中国经济飞速发展,人民生活水平不断提高,作为代步出行的汽车已经迅速发展起来了。汽车作为一种交通工具不但能够进行远距离的行驶也能在公路上保持相当高的速度,大大节省了出行时间,并且提供了方便个人出行的方式,极大的丰富了社会交通工具的多样性。汽车通过消耗柴油和汽油完成能量的转化,来提供行驶需要的能量。但是驾驶员却是保证汽车安全驾驶的最为关键的地方,如果因为驾驶员的错误操作而使得汽车发生交通事故酿成惨剧,是得不偿失的。而酒后驾发生交通事故占了总交通事故很大的一个比重。所以对酒后驾驶的管理是十分重要的,最主要的方法就是通过测试酒精浓度判断驾驶员是否酒后驾驶。

本文研究设计了一种检测酒精浓度的智能测试仪,该仪器在检测到酒精浓度后会通过与上限值比较,当超出酒精浓度上限值后会发出警报提醒酒精浓度超标。实验方案基于89c51单片机,MQ-3酒精浓度传感器设计。传感器负责将测试的酒精浓度信号传送给AD0832,AD0832通过A/D转换将电信号转换为数字信号传送给单片机,单片机接受信号进行处理后传送到LCD上显示。

关键词: 单片机89c51 A/D转换 酒精浓度传感器

I

重庆理工大学毕业论文 基于单片机的酒精浓度测试系统设计

Abstract

The continuous improvement of people's living standards with China's rapid economic development.As a means of travel has quickly developed a car.Car as a means of transport not only capable of traveling long distances,and it can be maintained at a very high speed on the highway.It significant savings in travel time,and provides a convenient way of personal mobility.It also greatly enriched the diversity of the community transport. Automotive diesel and gasoline consumption by complete transformation of energy to provide energy traveling needs.But the driver is the most crucial part of the car to ensure the safe driving,if because of an error operation of the driver and makes the car traffic accident led to the tragedy, is worth the wait.Drink-driving traffic accidents accounted for a large proportion of the total accidents,so the management of drinking and driving is very important.The main way is through alcohol concentration test determines whether the driver drunk driving.

In this paper, design a method for detecting alcohol concentration of intelligent tester.The instrument will be by comparison with the upper limit after detecting alcohol concentration, when the alcohol concentration exceeds the limit alerts to remind alcohol concentration exceeded..Based on the experimental program microcontroller89c51, MQ-3 alcohol concentration sensor design.Alcohol concentration sensor signal is transmitted to the AD0832 is responsible for testing.By AD0832 A / D converter converts the electrical signal into a digital signal is transmitted to the MUC.After the MUC receives signals and sends them to the LCD display.

Key words: MCU89C51; A/D converter; Alcohol concentration sensor

II