基于STM32的智能安防系统的设计 学生专业: 电子信息科学与技术 学生姓名: 王正辉 指导教师: 康辉 摘要随着社会的发展,人们的生活质量越来越高,家用电器和厨房设施也随之增多,家庭存在的安全隐患相应增加,同时整个社会正处于转型期,家庭的安全问题也引起了人们的关注传统的安全防范措施已无法适应现代化社会的需求因此,将智能化引入住宅小区已成为一种趋势,并且在智能化住宅的家庭智能管理系统中,安防报警已经成为民用建筑领域,向信息化和网络化发展的一个重要组成部分基于将最新的通信技术融合到传统产业中的考虑,本文综合了单片机、无线数据通信、数据采集等技术,研究并设计了以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章 绪论 1 课题背景和意义 1 国内发展现状 1 智能安防系统的发展前景 3第2章 系统方案设计 4 设计任务与要求 4 方案的比较 4 系统总体设计思路 6 本章小结 7第3章 系统硬件设计 8 主控模块的设计 83.1.1 STM32最小系统 83.1.2 SD卡电路的设计 10 字库Flash接口电路 11 防火监控的设计 11 烟雾传感器的电路设计 12 天然气体浓度监测的电路设计 12 电流传感器的工作原理和电路设计 13 火焰传感器的电路设计 14 防盗监控的设计 15 环境监控模块 16 温湿度传感器的电路设计 163.4.2 CO传感器的工作原理和电路设计 17 报警模块的设计 18 声音报警 183.5.2 GSM模块短信报警 19 人机交互显示模块的设计 22 电源模块 22 无线遥控电路设计 23 本章小结 24第4章 系统软件设计 254.1 软件模块化设计 25 系统软件子程序 254.2.1 SD卡驱动设计 254.2.2 FAT32文件系统 27 时间模块程序设计 344.2.4 RTC实时时钟驱动程序设计 34 液晶显示设计 35 硬件驱动子程序设计 384.3.1 GSM短信报警设计 38 烟雾监控设计 39 天然气监控设计 404.3.4 CO监控设计 41 温湿度监控设计 42 电流监控设计 43 火焰监控设计 44 防盗监控设计 45 语音播报设计 46 无线遥控设计 47 模块整合 48 本章小结 50第5章 仿真和调试 51 硬件调试问题 51 软件调试问题 51 实物演示结果 51 本章小结 56结论 57致谢 58参考文献 59附录1 原理图 60附录2 实物图 63附录3 程序 64CONTENTSAbstract(Chinese) IAbstract(English) IIChapter 1 Introduction 1 Background And Significance 1 Domestis Situation 1 The Development Prospects Of Intelligent Security Systems 3Chapter 2 The plan Of System Design 4 The Design Task And Requirements 4 Scheme Comparison 4 Design Ideas Of System 6 The Summary Of This Chapter 7Chapter 3 The hardware Circuit Design 8 The Design Of The Main Control Module 83.1.1 STM32 System 83.1.2 SD Card Circuit Design 10 Flash Circuit Design 11 The Design Of Monitoring Fire 11 Smoke Sensor Circuit Design 12 The Circuit Design Of Natural Gas Concentration Monitoring 12 The Working Principle And Circuit Design Of Current Sensor 13 Flame Sensor Circuit Design 14 The Design Of security Monitoring 15 Environmental Monitoring module 16 The Circuit Design Of temperature And Humidity 163.4.2 The CO Sensor working principle And Circuit Design 17 The Design Of the Design Module 18 Voice Design 183.5.2 SMS Design 19 The Design Of The Display Module 22 The Design Of The Power Supply Module 22 The Remote Control Of Wireless Circuit Design 23 The Summary Of This Chapter 24Chapter 4 The system sOftware Design 25 The Software Modular Design 25 The System Software subroutines 254.2.1 SD Card Driver Design 254.2.2 FAT32 File System 27 Time Module Design program 344.2.4 RTC Driver Design 34 Display Design 35 Hardware Driver Software Design 384.3.1 SMS Design 38 Smoke Monitoring 39 Gas Monitoring 404.3.4 CO Monitoring 41 Temperature And Humidity 42 Current Monitoring 43 Flame Monitoring 44 Security Monitoring 45 Voice D。