登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 电子信息类 > 通信工程 > 正文

基于Arduino的电子密码锁的设计与实现毕业论文

 2021-05-19 12:05  

摘 要

在日常生活中,人的生命财产安全处处与电子密码锁有关。

本文从经济实用的角度出发,以Arduino为核心元件,使用ATMEGA328P作为主芯片,利用Arduino体积小,可靠性高的特点设计了一个电子密码锁。该电子密码锁通过IO连接外部设备以及控制它们的工作状态,结合键盘输入、显示、报警、继电器等外围设备,用C语言来编写主控芯片的控制程序,扫描键盘输入密码,再与内部EEPROM存储器储存的密码来进行比较,以确定密码是否正确,使用液晶LCD1602显示用户的输入输出,用蜂鸣器报警或提醒,能够准确地实现密码检测、显示、传送,设计了一个密码可以多次更改,并有报警功能的电子密码锁。具体功能包括默认显示时间、开锁LED提示、密码显示、输入错误更改、修改原始密码、密码输入错误三次蜂鸣器报警、输入密码错误三次后按键输入停止一分钟。

在基于本文原理的基础上,设计焊接了由Arduino Uno、LCD1602、DS1307、蜂鸣器、继电器等元器件组成的实物电路板。实物验证结果表明,该锁具有用户界面友好,操作方便,体积轻小,元器件价格低廉,安全性能好,十分值得推广。

关键词:Arduino;电子密码锁;ATMEGA328P;LCD1602;DS1307

Abstract

In daily life, people's life and property safety is related to electronic combination lock.

This article from the perspective of economic and practical, with the core components, the Arduino using ATMEGA328P as the main chip, using Arduino small volume, high reliability characteristics of designed a electronic combination lock. The electronic combination lock by IO connecting external devices and control their work status, combined with the keyboard, display, alarm, relay and other peripheral equipment, using C language to write the main control chip control program, the scanning keyboard input password, block again with the internal EEPROM memory stored passwords to compare, to determine whether the password is right, using LCD LCD1602 display the user's input and output, with a buzzer alarm or warning, can accurately realize the password detection, display, transmission, designed a password can be changed many times, and has the alarm function of electronic combination lock. Specific functions include the default display time, lock tip, password, LED display, input error change, modify the original password, password input error buzzer alarm, input three times wrong password three times after the key input to stop for a minute.

Based on the principle of this article, on the basis of design of welding by Arduino Uno, LCD1602, DS1307, buzzer, relay and other components of physical circuit board. Physical verification results show that the lock has a friendly user interface, convenient operation, light and small volume, the component price is low, safety performance is good, is worthy of popularization.

Key Words:Arduino;electronic coded lock;ATMEGA328P;LCD1602;DS1307

目录

第1章 绪论 1

1.1课题研究背景及意义 1

1.2国内外研究现状 2

1.3本文的研究内容及组织结构 3

第2章 关键原理阐述 4

2.1 Arduino 4

2.1.1 Arduino Uno处理器 4

2.1.2 Arduino Uno引脚 5

2.2 DS1307时钟原理 5

2.2.1 时钟基础 5

2.2.2 I2C总线协议及工作原理 6

2.3 LCD1602 工作原理 6

2.4 矩阵键盘相关原理 9

2.4.1 ADC原理 9

2.4.2 矩阵键盘原理 9

第3章 系统模块设计与实现 11

3.1 总程序流程图设计 11

3.2 LCD1602显示模块设计 12

3.2.1 LCD1602电路设计 12

3.2.2 LCD1602模块程序逻辑 12

3.3按键输入模块设计 14

3.3.1按键输入模块相关函数 14

3.3.2 输入模块程序逻辑 15

3.4 存储芯片模块设计 16

3.5 报警模块设计 17

第4章 系统运行与测试 18

4.1 系统设计 18

4.1.1 系统设计电路图 18

4.1.2 系统测试 21

4.2 系统实物制作与测试 23

第5章 总结与展望 26

5.1本文工作总结 26

5.2下一步的工作展望 26

参考文献 28

致谢 29

第1章 绪论

1.1课题研究背景及意义

锁是一种非常特殊的安全措施,自古以来,锁和人类的生活就密不可分,是人类用于保护自己的私有财产的重要工具[1]。门锁是守护将军,必须是安全的,可靠的和易于使用的。但传统的钥匙锁经过若干年后,它的使用和研究,原理和结构都被大家所熟知了,即使他们并不需要使用钥匙打开锁的方法是不计其数。像传统的机械锁,即时构造较为复杂,也有开锁匠能将其打开,技术稍微好一点的小偷,也能用专业的工具直接打开这个看似十分安全的机械锁,使锁对保护人员财产安全的作用逐渐降低。随着人们经济水平的提高,人们对于安全性的要求也逐年提高,表现在对人身和财产安全的要求激增,对于保障人们安全的锁的要求也越来越高。既要安全可靠的防盗器,但也需要很容易使用。这使得传统的防盗锁防盗效果已经无法适应现代社会的需要,而且钥匙也不方便随身携带。

目前,最常见的锁是1950年意大利设计的机械锁结构,它的结构简单、易于使用、价格便宜[2]。但在使用的时候它暴露了很多弊端:首先,机械锁是依靠不同的齿形和锁芯来配合工作的。据统计,每4000把机械锁就有类似的两把锁是相相或者类似的,所以其安全性低。其次,一旦钥匙丢失,无论是谁捡到都可以打开。第三,机械锁所谓主要材料是铜,质地比较柔软,所以很容易损坏。最后,机械锁的钥匙很容易被复制,如酒店等公共场所不适合使用这种机械锁。如今人们对锁的依赖性越来越大,对锁的的安全性、便利性等性能也有着更高的要求,应运而生出许多智能锁,如指纹识别,IC卡识别智能锁。但智能锁产品有特定的方式,例如指纹锁需要采集指纹,利用指纹来解锁,IC卡识别也是需要特定的有效卡,且这些解锁方式只能是唯一的。但是如果想用将这些智能锁用于保密比较高的箱、柜、房间的时候,费用一般较高,所以这在一定程度上限制了这类产品的推广。

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图