Image may be NSFW. Clik here to view. ![]() |
Digital Code locker system using 8051 |
Microcontrollers form the most significant part of several security and surveillance systems which plays an important role in ensuring safety of our priced possession. Here we are about to see the Embedded design and programming of a Password based Digital locker system using 8051 Microcontroller. Despite the simple look this system can handle intrusions to offer high protection and also alerts the user in case anonymous person tries to break into the system.
16 x 2 LCD:
Image may be NSFW. Clik here to view. ![]() |
16x2 LCD Pin diagram |
16 x 2 LCD is most commonly used display in many applications, it consists of a 16 columns and 2 columns hence got the name 16 x 2 LCD. The LCD consists of a Data register which is used to write the data to be displayed and a Command register used to write the instructions needed to the display. I have written a brief article on Programming and Interfacing LCD with 8051 Microcontroller kindly take a look before getting started with this project.
4 x 3 KEYPAD:
Image may be NSFW. Clik here to view. ![]() |
4x3 keypad |
The keypad part of this project was used to feed password input and to initialize the system. I have used a 4 x 3 configuration keypad a total of 12 keys in it, you can increase the number of keys by altering the program and design. Read Programming and Interfacing of Keypad with 8051 Microcontroller to obtain complete knowledge about it.
DESIGN:
This system comprises a bit complex design in order to protect the safe from intruders and alarm the user in case any breach was detected. This design of this system comprises of three basic steps, they are
INITIALIZATION:
- The system needs to be initialized by pressing the "*" key in the keypad.
- This locker will not respond to any of the key press before initialization using "*" key.
- It will Turn ON the LCD and count of trials is initialized to zero.
- A command "Enter Password" in the LCD and blink of cursor will convey that the system is ready for password input.
PASSWORD INPUT:
- The strength of the password in our system is 4 characters.
- The password input can be fed into the system by using keys from 1,2......9
- As soon as you enter four characters controller will verify if the entered password matches with the system password.
- Based on the password verification by the controller there will be two cases totally.
CASE 1:
- If the password matches, LCD will display as Message "Locker Open" and relay will gets activated.
- After the usage of the protected locker, you need to turn off the system by means of pressing "#" key in the keypad
- The relay as the system will gets turned off.
CASE 2:
- If the password doesn't match , LCD will display a Message "Wrong Password" in it and the trial count will be incremented by one in the microcontroller.
- Then the user have to initialize the system by pressing "*" before making the next try.
- If a user entered the correct password in the second attempt then the trail count will be back to zero and then the user have to lock the system after usage after pressing "#"
- But if the user failed to enter correct password for three continuous attempts, then alarm will start to alert the security surrounding there.
- Then the system will not respond to any of the key inputs therefore the intruder cannot stop the alarm.
- The alarm can be stopped only by turning off the system which should be accessible only to the orginal user.
TURNING SYSTEM OFF:
- Now the Last thing after usage of the system is to turn them off using the "#" key.
- This applies only in the case if the user entered correct password.
- If the number of trial gets over the system enters into to alert mode and cannot be turned off using "#" during that period of time.
WATCH THE SIMULATION VIDEO TO GET BETTER UNDERSTANDING:
CODE:
|
For more reference download the Package of design and hex file of the above system. Get it here
NOTE:
- The first '0' of the array "passwd" is dummy, "2940" is the password for the above system.
- In case you face with multiple inputs while pressing a key increase the debounce delay value by means of y value increment in the sub routine "debounce_delay".
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.![]()
Image may be NSFW.Clik here to view.
Clik here to view.
Clik here to view.
Clik here to view.
Clik here to view.
Clik here to view.