
基于STM单片机的智能安防系统的设计电子信息科学与技术毕业论文.doc
87页基于STM32的智能安防系统的设计 学生专业: 电子信息科学与技术 学生姓名: 王正辉 指导教师: 康辉 20摘要随着社会的发展,人们的生活质量越来越高,家用电器和厨房设施也随之增多,家庭存在的安全隐患相应增加,同时整个社会正处于转型期,家庭的安全问题也引起了人们的关注传统的安全防范措施已无法适应现代化社会的需求因此,将智能化引入住宅小区已成为一种趋势,并且在智能化住宅的家庭智能管理系统中,安防报警已经成为民用建筑领域,向信息化和网络化发展的一个重要组成部分基于将最新的通信技术融合到传统产业中的考虑,本文综合了单片机、无线数据通信、数据采集等技术,研究并设计了以STM32单片机基于GSM短信模块作为信息传输的家庭安防系统此系统由主控制器、显示模块、信息传输模块和防盗模块,防火模块,声光报警模块等组成,可解决传统安防系统存在的隐患,让家庭防盗更及时、使用更方便它不再依赖有线执行报警,而是借助最可靠、最成熟的GSM移动网络,以最直观的中文短消息形式,直接把报警情况反映到用户的屏幕上,并发出声音报警,可以防范一定的险情,用户可以通过无线遥控对该系统进行布防和解防。
该系统具有用户投资小,运营费用少的优点,并且操作简单关键词 安防系统;防火;STM32;GSMAbstractWith the development of the society, The quality of people life become more And more good,Accordingly, The number of household electrical appliances And kitchen facilities also become more,So the safe hidden trouble in security family is increasing, at the same time the whole society is in transition period, the family security problem has caused the attention of people. Traditional security measures have been unable to meet the needs of modern society. Therefore, it has become a trend to the introduction of the intelligent residential district, And Security alarm has become an important part of the field and civil construction, the information And network development.In consideration of based on the latest communications technology integrated into traditional industries, this article combination the knowledge of the micro-controller, wireless data communication, data acquisition technology. Then research and design the home security system,based on GSM module as the information transmission and STM32 micro-controller. This system consists of main controller, display module, information transmission module and alarm module, fire protection module, sound alarm module. The security system can solve the hidden danger existed in the traditional security system,make the family security more quickly, more conveniently.It is no longer depend on the cable telephone, but with the help of the most reliable and most mature GSM mobile network, use the most intuitive form of Chinese message, the alarm situation reflects to the user.This system can prevent some dangerous situations; users can control the system for protection or reconciliation by the wireless remote. The system has advantages that the user has a small cost and operating expenses.Keywords Security system;Fire prevention;STM32;GSM目录摘要 IAbstract II第1章 绪论 11.1 课题背景和意义 11.2 国内发展现状 11.3 智能安防系统的发展前景 3第2章 系统方案设计 42.1 设计任务与要求 42.2 方案的比较 42.3 系统总体设计思路 62.4 本章小结 7第3章 系统硬件设计 83.1 主控模块的设计 83.1.1 STM32最小系统 83.1.2 SD卡电路的设计 103.1.3 字库Flash接口电路 113.2 防火监控的设计 113.2.1 烟雾传感器的电路设计 123.2.2 天然气体浓度监测的电路设计 123.2.3 电流传感器的工作原理和电路设计 133.2.4 火焰传感器的电路设计 143.3 防盗监控的设计 153.4 环境监控模块 163.4.1 温湿度传感器的电路设计 163.4.2 CO传感器的工作原理和电路设计 173.5 报警模块的设计 183.5.1 声音报警 183.5.2 GSM模块短信报警 193.6 人机交互显示模块的设计 223.7 电源模块 223.8 无线遥控电路设计 233.9 本章小结 24第4章 系统软件设计 254.1 软件模块化设计 254.2 系统软件子程序 254.2.1 SD卡驱动设计 254.2.2 FAT32文件系统 274.2.3 时间模块程序设计 344.2.4 RTC实时时钟驱动程序设计 344.2.5 液晶显示设计 354.3 硬件驱动子程序设计 384.3.1 GSM短信报警设计 384.3.2 烟雾监控设计 394.3.3 天然气监控设计 404.3.4 CO监控设计 414.3.5 温湿度监控设计 424.3.6 电流监控设计 434.3.7 火焰监控设计 444.3.8 防盗监控设计 454.3.9 语音播报设计 464.3.10 无线遥控设计 474.4 模块整合 484.5 本章小结 50第5章 仿真和调试 515.1 硬件调试问题 515.2 软件调试问题 515.3 实物演示结果 515.4 本章小结 56结论 57致谢 58参考文献 59附录1 原理图 60附录2 实物图 63附录3 程序 64CONTENTSAbstract(Chinese) IAbstract(English) IIChapter 1 Introduction 11.1 Background And Significance 11.2 Domestis Situation 11.3 The Development Prospects Of Intelligent Security Systems 3Chapter 2 The plan Of System Design 42.1 The Design Task And Requirements 42.2 Scheme Comparison 42.3 Design Ideas Of System 62.4 The Summary Of This Chapter 7Chapter 3 The hardware Circuit Design 83.1 The Design Of The Main Control Module 83.1.1 STM32 System 83.1.2 SD Card Circuit Design 103.1.3 Flash Circuit Design 113.2 The Design Of Monitoring Fire 113.2.1 Smoke Sensor Circuit Design 123.2.2 The Circuit Design Of Natural Gas Concentration Monitoring 123.2.3 The Working Principle And Circuit Design Of Current Sensor 133.2.4 Flame Sensor Circuit Design 143.3 The Design Of security Monitoring 153.4 Environmental Monitoring module 163.4.1 The Circuit Design Of temperature And Humidity 163.4.2 The CO Sensor working principle And Circuit Design 173.5 The Design Of the Design Module 183.5.1 Voice Design 183.5.2 SMS Design 193.6 The Design Of The Display Module 223.7 The Design Of The Power Supply Module 223.8 The Remote Control Of Wireless Circuit Design 233.9 The Summary Of This Chapter 24Chapter 4 The system sOftware Design 254.1 The Software Modular Design 254.2 The System Software subroutines 254.2.1 SD Card Driver Design 254.2.2 FAT32 File System 274.2.3 Time Module Design program 344.2.4 RTC Driver Design。












