设计说明书
总字数:15000+
摘要
随着社会安全意识的不断提升,对出入口安全防护的需求日益增长。传统机械锁存在钥匙易丢失、复制难度低、安全性不足等问题,难以满足现代生活和工作对安全防护的高要求。
基于 STC89C52 单片机的密码锁,整合了 44 矩阵键盘、AT24C02 存储模块、继电器、门磁锁、LED 指示灯、LCD1602 显示屏及 VS1838 红外遥控模块,实现了便捷且安全的门禁控制。系统核心功能包括:通过 44 矩阵键盘可进行密码输入、密码重置及一键还原密码操作;借助 AT24C02 存储密码,实现掉电后密码不丢失;当密码输入错误次数大于等于 3 次时,系统触发报警并持续 3 秒,同时锁定 3 分钟;通过继电器控制门磁锁,模拟门的开启与关闭;利用 LED 灯显示门的状态,灯亮表示门打开;LCD1602 显示屏以 * 号形式显示输入的密码,保护密码安全,且密码可任意输入,只要包含正确密码即可解锁;通过 VS1838 红外遥控器能够实现远程开锁。
该系统的实现,有效提升了门禁控制的安全性与便捷性,解决了传统机械锁的诸多弊端,为家庭、办公等场所的安全防护提供了可靠解决方案,同时为同类安防设备的研发提供了参考,具有较高的实际应用价值。
关键词:STC89C52;密码锁;矩阵键盘;AT24C02;红外遥控;安全防护
ABSTRACT
With the continuous improvement of social safety awareness, the demand for safety protection of entrances and exits is increasing. Traditional mechanical locks have problems such as easy loss of keys, low difficulty in duplication, and insufficient security, which are difficult to meet the high requirements for safety protection in modern life and work.
The password lock based on STC89C52 microcontroller integrates 44 matrix keyboard, AT24C02 storage module, relay, door magnetic lock, LED indicator, LCD1602 display and VS1838 infrared remote control module, realizing convenient and safe access control. The core functions of the system include: password input, password reset and one-key password restoration through the 44 matrix keyboard; password storage by AT24C02 to prevent password loss after power failure; when the number of incorrect password inputs is 3 or more, the system triggers an alarm for 3 seconds and locks for 3 minutes; control of the door magnetic lock through the relay to simulate the opening and closing of the door; display of the door status by the LED light, which is on when the door is open; display of the input password in the form of * on the LCD1602 display to protect password security, and the password can be input arbitrarily as long as it contains the correct password to unlock; remote unlocking through the VS1838 infrared remote control.
The implementation of this system effectively improves the security and convenience of access control, solves many drawbacks of traditional mechanical locks, provides a reliable solution for safety protection in homes, offices and other places, and also provides a reference for the research and development of similar security equipment, with high practical application value.
Keywords: STC89C52; Password lock; Matrix keyboard; AT24C02; Infrared remote control; Safety protection
目录
第 1 章 绪论
1.1 研究的目的及意义
1.2 国内外发展情况
1.3 本文主要研究内容
第2章 设计思路与方案论证
2.1 主要元器件选择
2.1.1 主控芯片选择
2.1.2 按键模块选择
2.1.3 存储模块选择
2.1.4 显示模块选择
2.1.5 红外接收模块选择
2.1.6 状态指示模块选择
2.2整体设计方案
第 3 章 硬件设计
3.1 主控电路模块
3.2 按键模块电路
3.3 存储模块电路
3.4 报警模块电路
3.5 驱动模块电路
3.6 显示模块电路
3.7 红外接收模块电路
3.8 状态指示模块电路
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 矩阵键盘子流程
4.4 存储模块子流程
4.5 LCD1602液晶显示子流程
第 5 章 实物测试
5.1 整体实物测试
5.2 按键模块功能测试
5.3 存储模块功能测试
5.4 报警模块功能测试
5.5 显示模块功能测试
5.6 红外接收模块功能测试
5.7 状态指示模块功能测试
第 6 章 总结与展望
6.1 总结
6.2 展望
致谢
参考文献
附录
附录一:原理图
附录二:PCB
附录三:主程序
购买后可查看具体内容!