Security is a prime concern in our day-today life. Everyone wants to be as much secure as possible. An access control for doors forms a vital link in a security chain. The microcontroller based digital lock for Doors is an access control system that allows only authorized persons to access a restricted area.
An electronic lock or digital lock is a device which has an electronic control assembly attached to it. They are provided with an access control system. This system allows the user to unlock the device with a password. The password is entered by making use of a keypad. The user can also set his password to ensure better protection. The major components include a Keypad, LCD and the controller PIC16F877A. This article describes the making of an electronic code lock using the 16F877A microcontroller.
The system is fully controlled by the 8 bit microcontroller 16F877A which has a 8Kbytes of ROM for the program memory. The password is stored in the EPROM so that we can change it at any time. The system has a Keypad by which the password can be entered through it. When the entered password equals with the password stored in the memory then the relay gets on and so that the door is opened.
The code is built in a modular style to allow a user to find ways to modify project. In start the D Lock programs loads with a default code of "2345" format is *2345# which can be enter to unlock the door, the code cam be change by entering the master code in the format *23455#new 4 digit code. In this program i only display the result on LCD and lock will be placed at PORTA bit 0 where i put led for simulation.
A 4x3 matrix keypad and a 16x2 LCD have been used here. Keypad and LCD are very commonly used input & output devices, respectively. The password is stored in the system EEPROM.
While unlocking, if the entered password from keypad matches with the stored password, then the lock opens and a message is displayed on LCD. Also an output pin is made high to be used for further purpose..
As the program starts, wait for 5sec and press * string ‘Enter Password’ is displayed on LCD. The keypad is scanned for pressed digits one by one. Every time, row and column of the key pressed is detected and is displayed on LCD. After the four digits are entered, the user should press # to Confirm Password and again the input is taken through LCD. If the passwords do not match, a message is displayed to indicate ‘Access Denied’ otherwise the ‘Access Granted’ message.
Update 28-8-2013
1. Here two circuit are provided, the smaller one works only forsimulation and the larger one works only in real world( Problem
with Pull Down resistors)
2. Due to frequent Requests I have Uploaded the HEX(8Mhz Crystal) file of these project in Our Facebook Group-Click Here
Password should not be displayed on LCD. It is not secured. **** can be displayed instead.
ReplyDeleteThank you foe your advise. This project is designed as an academic project. Simplicity is for the ease of demonstration. And added a buzzer and some more features to it. If anybody enter wrong password more than three times, the buzzer sounds continuously and system should be restarted.
Deletei have a problem. i designed a system using this code. but it cant simulate in real simulation
ReplyDelete@Nayantha
ReplyDeleteIts working no problem. I will send the whole project in proteus. You should use pull downs for all pins connected to keypad in a real design.
nupsangel05@gmail.com
Deletereally interested to kjnow the deatails of this project..so pls send me here..
thanks for this great idea
ReplyDeletebut i need this programs in Mikrobasic can you get it for me??
is the code given full complete..?
ReplyDeletewhich compiler did you use?
ReplyDeleteMikroC for PIC.
Deletecan u pls send me the whole project in proteus? because it is my project now and i have a problem about the circuit. I don't know where do i put the oscillator, the resistor in keypad and its value? and where do i put the L7805 5V output to pic? I hope you send it to me immediately because the deadline of my project is on OCT.12(Friday). thank you for your electronic lock =)
ReplyDelete@ Raimar : Please check this link
Deletehttp://www.facebook.com/photo.php?fbid=367276126688130&set=a.258302774252133.62236.258274150921662&type=1&relevant_count=1
THANK YOU FOR THIS SUCH A GOOD COMPILATION OF PROJECTS. CAN YOU MAIL ME. THIS PROJECT CODING ON NOTEPAD.
ReplyDeleteMY EMAIL ADDRESS IS
cheez.wheelz@gmail.com
THANK YOU FOR YOUR QUICK REPLY. IF I WANT TO USE 4X4 KEYPAD WHAT CHANGES ARE EXPECTED.
ReplyDeleteconnect the 4th column to 4th(1,2,3,4) pin of the keypad port, and make required change in program.
Deletegreeting
ReplyDeletei am having a problem while compiling this code at mikroc version 8.2. it is giving an error char keypadPort at PORTD; on this line.
i really want to compile it and need its hex file.
please help
GREETINGS ONCE AGAIN
ReplyDeleteI have tried your code many times to compile. please help me why it is not compiling my compiler is working fine.
PLEASE REPLY AS SOON AS POSSIBLE
Make sure that you included the keypad library.
ReplyDeletecan you end to me the code please
ReplyDeleteeng_ahmed_osama@hotmail.com
Please tell me the library file for keypad.. and what more header files are to be included.
ReplyDeleteWAITING FOR YOUR REPLY. THANKS
You can see Library Manager tab left of the project window. Check the check box of required libraries.
DeleteGREETINGS MY PROBLEM REGARDING ITS SIMULATION IS SOLVED THANKS FOR YOUR HELP. NOW SOME THING WHICH IS NOT SUPPOSED TO BE OCCURRED IS BEING OCCURRED.
ReplyDeleteWHEN THE SIMULATION STARTS THE LED AT PORT A pin 0 starts glowing but instead it should glow when ACCESS is being granted. before it must not glow. If am right then please provide appropriate solution. else guide me what is the real logic behind it.
PLEASE REPLY AS SOON AS POSSIBLE
wait
proteus simulation code
ReplyDeletevalisha.dcosta@gmail.com
Hello,
DeleteSorry the file is missing, i will try to build a new one. Sorry for late reply.
sir can you also send me the proteus file?
ReplyDeletehere's my email betoy.aguila@gmail.com
thank you very much!!
Hello,
DeleteSorry the file is missing, i will try to build a new one. Sorry for late reply.
my lcd is taking random data after "Enter Code" an after 3 attempts shows Access denied
ReplyDeleteGreetings,
ReplyDeletePlease, can you mail me the pdf of the project, and if you do...would it be ok if I modify it while practicing?
wi.turtlez@gmail.com
Also, I've been given a project on
"Microcontroller based electronic locking system module"
...and I'm not really sure how to go about it....can you help.
Thanks,
Chuck Konta
I had written only this much of matter, so there is no PDF available. I hope the above explanation is enough. There is no problem for using the code or design, but if you post this project somewhere please add a reference.
DeleteUse the Discussion Group link please.
Deletecan you plz send me proteus file...i am having difficulty in making 1....
ReplyDeletewhat does the circuit U1 do thats on top right if the figure..
aazib.gil@gmail.com
sir can you pls mail the code and proteus file
ReplyDeletemy id is
swap_k007@rediffmail.com
This comment has been removed by the author.
ReplyDeletehello .... i tried your code and it compiles just fine but i can't seem to simulate it in proteus .... could you please send me the whole project(code and simulation ) on fasika47@gmail.com
ReplyDelete.i would be really great-full....
can you please send me proteus file at harshits996@gmail.com
ReplyDeletekindly send me proteus file at focusme19@gmail.com...
ReplyDeletecan u sent to me the project 'code' to my email
ReplyDeleteir_student007@yahoo.com
hope u can help me.. n_n
please send the project code in notepad and proteus file. thank you.
ReplyDeletejulius_cimeni@yahoo.com
can u pls mail the program code my id is
ReplyDeletesukrut_goswami@yahoo.com
Hello,Sir
ReplyDeleteThanks for yr sharing.
I already chosen this project as my school final project.
Please send me this source in C (.txt) , other .pdf files and useful references links to my mail: paing.peace@gmail.com.
Thanks for yr kindness.
Paing Khant
There is a link posted at the end of the article, you can download HEX file and C file (From Facebook Group).
ReplyDeleteSir, i can't download from http://www.scribd.com/doc/86640317/Electronic-Code-lock.
ReplyDeletei cannot purchase thus also cannot download because of our country. Can't do copy/paste. But i read and typed in Notepad and complied in mikroC Pro. when write, occur 4 data error. So please send me Source Code in C with Notepad.
i downloaded HEX file from FB Group.
Thanks a lot,sir
sir im really cant access the facebook link...can u send the source code to my emaIl (sunkgacrewz22@gmail.com) asap..please sir..im doing this project for my final year. hOpe u will help me.
ReplyDeleteDoes it work well? Could it surely secure anyone's home?
ReplyDeleteMaster Keys Farmers Branch
Is the upper portion of the circuit given at the right corner of the application circuit
ReplyDeletenecesary?Those who have worked with this circuit please help me.
please do you PIC code of conveyor belt project. if you have. please send me safdar.rasul@gmail.com
ReplyDeleteThat's an awesome concept with microcontrollers. Security system is very essential in each and every technology nowadays. Password must be complex and should not be in an easy way to analyse by anyone. PIC microcontroller is used to perform various kinds of tasks which is used control a production line and microcontrollers are programmed as timers. It is used in control systems such as door lock mentioned in the blog, alarm system, phones,etc.
ReplyDeleteI have a problem with "FF", I received this message " Undeclared identifier 'FF' in expression
ReplyDeleteCheck for FF in the program.
ReplyDeleteI can identify it if you paste the code snippet here.
This comment has been removed by the author.
ReplyDeleteCan u send to me the PIC source code ...thanks
ReplyDeleteEmail: max_yong1994@hotmail.com