You Are Here: Home » AVR ATmega Projects » Security - Safety Projects » Sleeping Security – Smart Keypad Lock using AtMega16

Sleeping Security – Smart Keypad Lock using AtMega16




This project is just a smart version of any keypad lock. What’s smart about it is that it can detect whether it is needed by the user or not and accordingly switches itself to take a sleep. Making a microcontroller to sleep reduces power consumption as well as increases its usage span.

Many of you must be wondering that would it be secure enough to make a lock go to sleep, isn’t it. Don’t worry, when a microcontroller goes off to sleep it puts a hold on what it was doing before sleeping. In my project I have made it to sleep only when the user has finished entering the password stuff and microcontroller has done its entire job.

Sleeping Security - Smart Keypad Lock using AtMega16

This was really necessary because I didn’t find it logical to make the microcontroller keep active all the time even when it’s not needed.

So after entering the sleep mode it can be woken up by any interrupt source. Here what I have done is that I have used 4 diodes in such a way that when any of the keypad buttons is pressed they generate a low level pulse at the external interrupt INT0. INT0 is set to call its ISR routine function when such a thing happens. In short these diodes are working as an OR gate to detect any key pressed.

After waking up, the microcontroller resumes from the position where it went to sleep, thus no risk of data mishandling.

For further references you can see the coding part as well.

The Keypad is connected to PORTC and the LCD works on 4-bit mode with PORTB.

I have used a self-made header file for the keypad interfacing which you can find in this folder itself.

A great thing about this lock is that it can remember your changed password. Now the question that arises is how to change the password? It can be done when the safe is open; you just need to enter the new password that you want. Note this password won’t be hidden, as it is at the unlocking time.

What I want to say is that at the time of unlocking the LCD screen displays “*” for each time user presses a button. This is done to secure the password. But at the time of renewing it, LCD displays the same character pressed on the keypad just to ensure user about the password. Once the password has been changed everything becomes hidden again.

Sleeping Security - Smart Keypad Lock using AtMega16 schematic

One more feature about this lock that would excite some of you is that you can even erase and rewrite your password. For erasing purposes, “<-” this button needs to be pressed.

In my project I have used a LED as an indication about the lock status. When LED lights up it means unlocked status and when LED switches off it indicates the locked status.

 

For more detail: Sleeping Security – Smart Keypad Lock using AtMega16

Leave a Comment

You must be logged in to post a comment.

Read previous post:
New land snail species from Australia shows dissection not necessary to identify molluscs

Dissection might prove unnecessary when identifying new molluscs after scientists Corey Whisson, Western Australian Museum, and Dr Abraham Breure, Naturalis...

Close
Scroll to top