张棚 李正 徐艺源 余植 张誉羚


摘要:随着互联网以及硬件的不断发展,物联网也得到飞快发展,并且在智能家居方面应用尤为广泛[5]。本设计是基于树莓派3B模块以及STM32模块为控制核心,APP为人机交换界面,摄像头图像数据通过树莓派3B模块采集,互联网作为信号传输媒介传输到APP,用户直接使用APP查看门外情况,并通过APP控制舵机进行门的开关,此设计还具有报警功能。
关键词:树莓派;物联网;门禁系统
Abstract: with the continuous development of the Internet and hardware, the Internet of things has also been rapid development, and is particularly widely used in smart home. This design is based on raspberry pie 3B module and STM32 module as the control core, the web app is the human-computer exchange interface, the camera image data is collected by raspberry pie 3B module, and the Internet is transmitted to the web app as a signal transmission medium. Users can directly use the web app to view the situation outside the door, and the user can control the steering gear to open the door through the web app.
Key words: Raspberry pie; Internet of things; access control system
0 引言
门禁系统是一种提高安全性便于生活的智能设计,物联网门禁系统则是通过搭建服务器,采集摄像头图像以及图像处理和传输,通过同一局域网进行连接,再通过大数据、云计算传输到APP。并通过APP控制门以及实现报警功能[2]。
1 控制系统设计概述
基于树莓派[3]的智能家居门禁系统包括APP客户端,摄像头服务器和控制端服务器以及STM32操作端。用户可以根据APP查看门外情况,再根据实际情况通过APP发送控制指令至后台服务器,基于Bottle实现pythonweb[1,4]服务器配合Bootstrap、JQuery这两个框架实现GPIO控制,STM32检测到GPIO电平变化,实现开门或报警功能。用户通过APP查看到MJPG-streamer视频流服务器从webcam摄像头采集的图像,再根据实际情况,发送指令到Bottle后台服务器,再结合其它框架控制GPIO端口电平,最后STM32接收电平变化控制舵机以及蜂鸣器,轻松、便捷的实现门的开关,提高用户的居住安全和生活质量以及便捷度[6]。控制系统图如图1所示。
2模块设计
2.1 MJPG-streamer服务器
MJPG-streamer是一款免费基于IP地址的视频流服务器,是用于从webcam摄像头采集图像,把他们以流的形式通过基于IP的网络传输到用户浏览器。……