设计简介:
项目名:基于单片机的密码锁的设计
项目编号:mcuclub-dz-090
单片机:STM32F103C8T6
功能简介:
1、通过4*4的矩阵键盘中的0-9为数字键,*为删除键,#为确定键,A为重置密码键,B为一键还原密码键
2、重置密码过程:管理员密码–>旧密码–>新密码–>再次新密码
3、一键还原:输入管理员密码,直接还原密码123456
4、通过AT24C02存储密码,实现掉电保存密码
5、当输入密码错误次数大于等于3次,进行锁定键盘1分钟,在此期间,每按一次按键都会蜂鸣器报警
6、通过显示屏显示输入的密码(*号表示,防止被偷看),另外,输入密码可以前后加入扰乱码,只要包含正确密码即可
7、密码正确时,LED绿灯亮,显示屏显示”密码正确“,语音提示”开锁成功“;密码错误时,LED红灯亮,显示屏显示”密码错误“,语音提示”密码错误”
总字数:12779
实物链接:点击跳转
设计说明书链接:点击跳转
开题报告链接:点击跳转
答辩PPT链接:点击跳转
摘要
本项目旨在设计和实现一种基于STM32F103C8T6单片机的密码锁系统。该系统通过4*4的矩阵键盘进行密码输入,并具有密码重置、一键还原、密码存储、密码错误锁定等功能。具体功能包括管理员密码的设置与更改、密码输入的显示与验证、密码存储与掉电保存等。在系统中,管理员可以通过特定的按键顺序设置和更改密码。密码输入过程中,显示屏以”*”的形式显示输入的密码,防止被他人偷看。同时,密码可以加入扰乱码以增加安全性,只要包含正确密码即可。系统还具备一键还原功能,管理员通过输入特定的密码,可以将密码还原为默认密码。密码错误次数达到设定阈值时,系统会锁定键盘一分钟,并蜂鸣器进行报警。为了实现密码的掉电保存,系统采用AT24C02芯片进行密码存储,确保密码不会因断电而丢失。在密码验证过程中,如果输入正确密码,系统会点亮LED绿灯,并在显示屏上显示”密码正确”,同时通过语音提示”开锁成功”。如果输入错误密码,系统会点亮LED红灯,并在显示屏上显示”密码错误”,同时通过语音提示”密码错误”。
本设计通过使用STM32F103C8T6单片机和相关模块,实现了功能完善、安全可靠的密码锁系统。该系统具有较高的实用性和实际应用价值,在家庭、办公室等场景中可以提供安全便捷的门锁保护。
关键词:单片机;密码锁;密码存储;密码错误锁定;显示屏;语音提示
Abstract
The aim of this project is to design and implement a password lock system based on the STM32F103C8T6 microcontroller. The system utilizes a 4×4 matrix keypad for password input and incorporates functions such as password reset, one-key restoration, password storage, and password error lockout. Specific functionalities include setting and modifying the administrator password, displaying and verifying password input, and storing passwords with power-off protection.In the system, the administrator can set and modify passwords through specific key sequences. During the password input process, the display screen shows “*” characters to prevent unauthorized viewing. Additionally, the passwords can include scrambling codes to enhance security, as long as the correct password is included. The system also features a one-key restoration function, where the administrator can input a specific password to restore the password to the default value. If the number of incorrect password attempts reaches a predetermined threshold, the system will lock the keypad for one minute and activate the buzzer for alarming.To achieve power-off protection for passwords, the system adopts the AT24C02 chip for password storage, ensuring that passwords are not lost during power interruptions. During the password verification process, if the correct password is entered, the system will illuminate a green LED, display “Password Correct” on the screen, and provide a voice prompt for successful unlocking. If an incorrect password is entered, the system will illuminate a red LED, display “Password Error” on the screen, and provide a voice prompt for incorrect password.
This design utilizes the STM32F103C8T6 microcontroller and relevant modules to achieve a feature-rich, secure, and reliable password lock system. The system possesses practicality and practical application value, providing secure and convenient door lock protection in settings such as homes and offices.
Keywords: microcontroller, password lock, password storage, password error lockout, display screen, voice prompt.
目 录
摘要
Abstract
第1章绪论
第2章 系统总体设计方案
第3章硬件设计
第4章 系统程序设计
第5章 实物测试
第6章 总结展望
参考文献
附录