摘要
主要围绕HC-05蓝牙模块的主从连接来实现U盘的防丢功能。在该设计中首先对两个HC-05蓝牙模块进行主从设置,使它们能够在上电后自动验证密码,当密码正确时则进行配对连接,密码错误则拒绝连接,防止其他蓝牙模块的干扰。当主从两个蓝牙模块之间物理距离在所设定的15米范围内,报警电路不输出报警信息。超过15米范围,蓝牙主模块与从模块之间的信号连接将会中断,蓝牙主模块检测不到从模块所发出连接信息,蓝牙主模块将会给继电器模块发出高电平信号,驱动继电器模块动作,使继电器模块的常开触点吸合,进而为单片机提供5V电源,单片机开始得电运行并通过P1.0口输出高电平来驱动蜂鸣器发出警报声,从而实现防丢的目的。
This design mainly around the HC-05 bluetooth module of master-slave connection to achieve the function of usb lost prevention. In the first place in the design of two HC-05 master-slave setup bluetooth module,enabling them to automatic matching connection after the electricity,to facilitate people to use. Through the two bluetooth module signal interruption caused because of the expansion of physical distance and to determine whether U disk,within the scope of what we set security,( bluetooth connection distance(15 meters)when people are using in U disk 15 meters,the system has no action. When people to avoid the U disk is using for more than 15 meters,bluetooth main module undetectable sub-modules to information will be made by relay module,relay module is normally open contacts and for MCU power supply.
出处
《自动化与仪器仪表》
2016年第1期108-109,共2页
Automation & Instrumentation
关键词
蓝牙模块
继电器模块
单片机
Bluetooth module
Relay module
Single chip microcomputer