东北农业大学学士学位论文 学号:A02110021
基于FPGA智能窗控制系统
学生姓名:李婷婷 指导教师:崔天时 所在院系:电气与信息学院 所学专业:电子信息工程 研究方向:智能检测与控制
东 北 农 业 大 学
中国·哈尔滨 2015年5月
Northeast Agricultural University Bachelor's Degree Thesis Student ID:A02110021
Base on FPGA Intelligent Window
Name:Li Tingting Tutor:Cui Tianshi
College:College of Electronic and Information Major:Electronic Information Engineering
Direction:Intelligent Detection and Control
Northeast Agricultural University
Harbin · China May 2015
基于FPGA智能窗控制系统
摘 要
随着电子技术、自动控制技术、应用感测技术的飞速发展以及人民生活水平的日益提高,智能家居这个概念逐渐深入人心,随着人们对居住环境质量的关注度的提升,能够改善居室环境的智能产品也越来越受到广大消费群体的青睐。基于目前的智能家居的发展态势以市场需求,本文以市场需求为导向设计了一种新型的、经济的智能窗控制系统。
根据FPGA智能窗控制系统需要达到的总体需求,通过调节硬件部分、软件部分以及机械部分,将智能窗控制系统划分为以下功能模块:温度检测模块、CO2气体检测模块,以及Quartus II 开发软件和GSM通信等模块。从而实现智能窗的温度监控,气体监控以及智能窗的远程控制功能。
本设计总体方案采用FPGA Cyclone IV系列的EP4CE6F17C8N作为核心控制芯片,由L298N作为电机驱动的两相四线步进电机拖动窗体完成开关动作,通过DS18B20温度传感器、GE6603 CO2气体传感器进行相关环境参数的采集,由GSM通信模块TC35i实现远程控制的功能。从而以相对稳定的性能实现智能窗户的基本功能,为人们营造出一个更加舒适便捷的智能生活环境。
关键词:FPGA;智能窗;传感器;GSM通信模块
-I- I
基于FPGA智能窗控制系统 Base on FPGA Intelligent Window
Abstract
With the rapid development of electronic technology, automatic control technology, the application of sensing technology and increasing people's living standards, the smart home concept has been widely accepted, with the enhancement of people's quality of living environment of concern, it is possible to improve the indoor environment Smart products are increasingly popular majority of consumer groups. Based on the current development trend of smart home market demand, the paper market demand-oriented design of a new, economical smart window control system.
According FPGA smart window control system needs to reach the overall demand, by adjusting the hardware components, software components and mechanical parts, the smart window control system is divided into the following modules: temperature detection module, CO2 gas detection module, and Quartus II development software and GSM communication modules. In order to achieve smart window temperature monitoring, gas monitoring and remote control of smart windows.
The overall program design using FPGA Cyclone IV family EP4CE6F17C8N as the core control chip, the L298N as a motor-driven two-phase four-wire stepper motor drive form completion switch moves through DS18B20 temperature sensor, GE6603 CO2 gas sensor related environmental parameters The acquisition, by the communication module TC35i GSM remote control functions. Thus a relatively stable performance to achieve the basic functions of smart windows for people to create a more comfortable and convenient living environment intelligent.
Keywords: The Intelligent Window; The Sensor; The GSM Communication Module
- II -
基于FPGA智能窗控制系统 目 录
摘 要......................................................................................................................................... I Abstract ...................................................................................................................................... II 1 前言......................................................................................................................................... 1
1.1 研究背景 ...................................................................................................................... 1 1.2 国内外研究现状 .......................................................................................................... 1 1.3 本设计的主要内容 ...................................................................................................... 2 2 研究方案 ................................................................................................................................. 3
2.1 研究目标 ...................................................................................................................... 3 2.2 研究内容 ...................................................................................................................... 3 2.3研究方法及技术问题 ................................................................................................... 3 2.4 设计中所需解决的关键问题 ...................................................................................... 5 2.5 实验方案 ...................................................................................................................... 5 3 硬件设计 ................................................................................................................................. 7
3.1 FPGA的介绍 ............................................................................................................... 7 3.2温度检测模块 ............................................................................................................... 8
3.2.1 温度传感器的选择 ........................................................................................... 8 3.2.2 温度检测模块电路 ........................................................................................... 9
3.2.2.1 DS18B20的工作状态 ............................................................................ 9 3.2.2.2 DS18B20有两种供电接法 .................................................................. 10
3.3 CO2气体检测模块 .................................................................................................... 10
3.3.1 CO2气体传感器 .............................................................................................. 10 3.3.2 CO2气体传感器工作原理 .............................................................................. 12 3.3.3 CO2气体传感器外围接口电路 ...................................................................... 12 3.4 GSM通信模块 ........................................................................................................... 13
3.4.1 GSM的介绍 .................................................................................................... 13 3.4.2 TC35i的介绍................................................................................................... 13 3.4.3 TC35i硬件原理图(见附录) ....................................................................... 15 3.5 显示器模块 ................................................................................................................ 15 3.6 电机设备 .................................................................................................................... 16 3.7 窗户机械模型模块 .................................................................................................... 17
3.7.1 自动开关窗任务分析 ..................................................................................... 17 3.7.2 齿轮齿条参数选择 ......................................................................................... 18 3.7.3 自动开关窗机械模型 ..................................................................................... 18
4 软件设计 ............................................................................................................................... 19
4.1 FPGA的开发环境与工具 .......................................................................................... 19
-II-