项目编号:mcuclub-dz-285
设计简介:
项目名:密码锁(实物)
项目编号:mcuclub-dz-285
单片机类型:STM32F103C8T6
具体功能:
1、通过4*4的矩阵键盘中的0-9为数字键,*为删除键,#为确定键,A为进入模式(重置密码、一键还原初始密码、添加删除指纹、添加删除卡),B为向上选择模式,C为向下选择模式,D为模式确认
2、重置密码过程:管理员密码–>旧密码–>新密码–>再次新密码
3、一键还原:输入管理员密码,直接还原密码123456
4、添加指纹:输入管理员密码,再添加指纹
5、删除指纹:输入管理员密码,再删除指纹
6、添加RFID卡:输入管理员密码,再添加RFID卡
7、删除RFID卡:输入管理员密码,再删除RFID卡
8、通过AT24C02存储密码,实现掉电保存密码
9、当输入密码、指纹、RFID卡总错误次数大于等于3次,进行锁定键盘及RFID卡模块3分钟,在此期间,每按一次按键都会蜂鸣器报警
10、通过继电器控制门磁锁,模拟门开关
11、通过显示屏显示输入的密码(*号表示,防止被偷看),另外,输入密码可以前后加入扰乱码,只要包含正确密码即可
12、通过人体热释电感应模块感应是否有人,如果有人提留超过3分钟,蜂鸣器报警1分钟,并发送提示信息“有人门前停留过长时间,请速速查看”
13、通过独立按键按下门铃,蜂鸣器响3秒,如果按下门铃3次后还没有人开门(另一个独立按键控制开门),则发送提示信息“有客人来了,请速速查看”
14、通过WIFI模块,手机端可模拟键盘所有功能,另外手机端可收到提示信息
总字数:22117
摘 要
当今社会,在日常的生活和工作中大多物品都需要赋予密码从而保护个人隐私。随着单片机和传感器技术在不断更新,如今多数单片机都凭借完备的功能和低廉的价格受到用户的青睐,因此市面上也逐渐不同种类的密码锁,保护人们的生命财产安全。
本设计采用STM32单片机作为主控芯片,通过4*4的矩阵键盘进行密码重置、还原密码、添加指纹、删除指纹、添加RFID卡、删除RFID卡等操作;通过AT24C02存储密码,实现掉电保存密码;通过继电器控制门磁锁,模拟门开关;通过显示屏显示输入的密码(*号表示,防止被偷看);通过人体热释电感应模块感应是否有人;通过独立按键对门铃进行控制,当输入密码、指纹、RFID卡总错误次数大于等于3次,进行锁定键盘及RFID卡模块3分钟,在此期间,每按一次按键都会蜂鸣器报警。此外,还通过WIFI模块可远程控制键盘所有功能,也可以将提示信息发送到手机端进行显示。
本设计在软件部分采用 C 语言对各模块进行程序设计,并通过实物来验证初期人为设定的功能。通过不断调试程序和功能测试,最终能够准确完成初期所设想的功能, 使得该密码锁具有较高的应用价值。
关键字:密码锁;防偷窥;STM32单片机;OLED显示屏;远程控制
Abstract
In today’s society, most items in daily life and work require passwords to protect personal privacy. With the continuous update of single-chip and sensor technology, most single-chip computers are now favored by users with complete functions and low prices, so the market is gradually different types of password locks to protect people’s lives and property safety.
This design uses STM32 single chip microcomputer as the main control chip, through 4*4 matrix keyboard to reset password, restore password, add fingerprint, delete fingerprint, add RFID card, delete RFID card and other operations; The AT24C02 stores the password to save the password after power failure. The door magnetic lock is controlled by the relay to simulate the door switch; The input password is displayed on the display screen (* indicates that it is to prevent being peeped); Whether people are detected by the pyroelectric induction module of the human body; Through the independent key to control the doorbell, when the input password, fingerprint, RFID card total error number is greater than or equal to 3 times, lock the keyboard and RFID card module for 3 minutes, during this period, every key press the buzzer alarm. In addition, all functions of the keyboard can be controlled remotely through the WIFI module, and prompt information can also be sent to the mobile phone for display.
In the software part of this design, C language is used to program each module, and through the physical object to verify the initial artificial function. Through continuous debugging and functional testing, the functions envisaged in the initial stage can be accurately completed, which makes the password lock have high application value.
Key words: password lock; Anti-snooping; STM32 MCU; OLED display; Remote control
目 录摘 要
Abstract
第一章 绪论
第二章 系统总体设计方案
第三章 硬件系统设计
第四章 系统程序设计
第五章 实物调试
结 论
参 考 文 献
致 谢
附录