项目编号:mcuclub-dz-290
设计简介:
项目名:车内环境监测
项目编号:mcuclub-dz-290
单片机类型:STM32F103C8T6
具体功能:
1、通过DHT11检测温湿度
2、通过MQ-3检测酒精浓度,若酒精浓度大于设置最大值,则声光报警
3、通过MQ-135检测有害气体浓度
4、通过人体热释电检测是否有人,如果有人,若有害气体浓度大于设置最大值,则声光报警,并自动开启通风系统,并通过GSM模块发消息给车主“车内有人且有害气体浓度过高,请速速查看”
5、通过按键设置有害气浓度最大值、手动控制通风
6、通过显示屏显示测量数据
7、通过蓝牙,将数据发送到手机端,并可远程控制通风
总字数:17882
摘 要
随着经济和城市交通的不断发展,人们对车辆的依赖程度也越来越高。但随之而来的是车内环境质量的担忧日益加重。为了能够实时监测车内环境,通过硬软件相结合设计出一款车内环境监控系统极为关键。
本文基于STM32单片机设计了一款车内环境监控,采用3种不同的传感器对车内环境的温湿度、有害气体浓度、是否有人以及酒精浓度进行监测,并将这些监测数据传输到单片机进行处理,在有人状态下,如果有害气体浓度大于设置最大值,则声光报警,并自动开启通风系统,并通过GSM模块发消息给车主“车内有人且有害气体浓度过高,请速速查看”。如果司机的酒精浓度大于设置最大值,则进行声光报警。
除此之外,使用蓝牙模块进行无线通信,可以将数据发送到手机端,也可以远程控制风扇进行通风,调节车内环境相关参数。
关键词:STM32单片机;车内监测;传感器;继电器;蓝牙
Abstract
With the continuous development of economy and urban transportation, people are becoming more and more dependent on vehicles. But with that comes growing concern about the quality of the environment inside the car. In order to monitor the interior environment in real time, it is very important to design an interior environment monitoring system by combining hardware and software.
This paper designs an in-car environment monitoring system based on STM32 microcontroller. Three different sensors are used to monitor temperature and humidity, concentration of harmful gases, presence or absence of persons and alcohol concentration in the in-car environment, and these monitoring data are transmitted to the microcontroller for processing. In the presence of persons, if the concentration of harmful gases is greater than the set maximum, the sound and light alarm will be generated. And automatically open the ventilation system, and through the GSM module to send a message to the owner, “there is someone in the car and the concentration of harmful gases is too high, please check quickly.” If the driver’s alcohol concentration is greater than the set maximum, an audible and visual alarm is given.
In addition, the Bluetooth module is used for wireless communication, which can send data to the mobile phone, and can also remotely control the fan for ventilation and adjust the parameters related to the interior environment.
Key words: STM32 MCU; In-vehicle monitoring; Sensor; Relay; Bluetooth
目 录
1.绪论
1.1 研究背景及其研究意义
1.2 国内外研究现状
1.2.1国外研究现状
1.2.2 国内研究现状
1.3 研究目标和组织结构
2.系统方案设计
2.1 整体方案设计
2.2 主要器件选型选择
2.2.1 主控芯片方案选择
2.2.2 显示模块方案选择
2.2.3 温湿度检测模块方案选择
2.2.4 有害气体检测模块方案选型
3.硬件电路设计
3.1 主控模块电路
3.2 MQ-135混合气体检测模块电路
3.3 DHT11温湿度检测模块电路
3.4 MQ-3酒精检测模块
3.5 红外检测模块
3.6 OLED显示模块电路
3.7 按键电路
3.8 声光报警报警提醒电路模块
3.9 GSM短信发送模块(SIM000A)
3.10 继电器调节模块
3.11 蓝牙模块(ECB02)
4.系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 温湿度检测模块子流程
4.5 GSM模块子流程设计
4.6 蓝牙模块子流程
4.7 OLED显示流程设计
5.实物调试
5.1 实物总体设计
5.2 酒精浓度模块实物测试
5.3有害气体浓度模块实物测试
5.4温湿度监测模块实物测试
5.5蓝牙模块实物测试
总结与展望
参考文献
致谢
附录
附录A:原理图
附录B:PCB
附录C:程序