Digital Code lock using AT89C2051

Tuesday, November 18th, 2008

Here is a project called ‘Digital Code Lock using AT89C2051′. LCD is used for display and a keyboard is used to input  the keys. This project source code is written in C. Both the C files and hex files are given for download.

A Brief Description:

This a simple project with efficient hacking prevention from Brute Force etc. The basic user lock is of 5 Digits and Master Lock is of 10 digits so its not easy for an intruder to break the lock unless you keep the code simple.

The input is taken from a 4×3 Keypad (please see the schematic for more information) and Display the user input on a 2×16 LCD. A pin is assigned as output for activating and deactivating the lock. For demonstration i have connected an LED to that pin.

From user side:
The user has two options either he/she can use its own 5 digit code or use the default 5 digit code. If user has to do setup his own code, then he has to enter “12345″ and press ‘#’. After this.. controller will ask for 10 Digit master password which is preprogrammed in the controller. Entering master lock, user can enter the new 5 digit code for the lock and press ‘#’ to save it.

Using the Keypad:
Keypad has 12 keys (4×3) starting from 1,2,3,4,5,6,7,8,9,*,0,# (please see the schematic for layout). Numeric keys are used for entering numbers. ‘*’ is used as the Cancel key and ‘#’ is used as the Enter key.

Circuit Diagram:

Circuit diagram of Digital Code lock using AT89C2051

Circuit diagram of Digital Code lock using AT89C2051

Download File Information:

  1. LCD.C – 4-Bit LCD Drivers
  2. LCD.H – LCD function prototypes and other declerations
  3. Lock.C – code for lock functioning
  4. LOCK.H – lock function declarations
  5. KEYPAD.C – Keypad drivers
  6. KEYPAD.H – Function declarations
  7. DELAY.C – Delay Functions
  8. DELAY.H – Function Prototypes only
  9. MAIN.C – Main function!
  10. Digital Code Lock Schematic – PDF file of orcad schematic

Download the source codes by clicking here

By Ajay Bhargav

http://rickeyworld.info

Avatar Image

Author Name :
Ranjith

Total : 28 Comments


28 Responses to “Digital Code lock using AT89C2051”

  1. AMS says:

    Hello Ajay Bhargav, which compiler did u use? I used SDCC but ur code seems to generate error. So cannot proceed for the asm files to be created.

  2. AVR says:

    Nice project, but where do you store unlock key? I would put an EEPROM for key so you can change it programatically.

  3. emeka says:

    pls sir, from the files listed above, which one do I burn into the ucontroller

  4. emeka says:

    Pls Sir, from the files listed above, which one do I burn into the micro controller

  5. haider sharef mahde says:

    Digital Code Lock Schematic – PDF file of orcad schematic

  6. santosh says:

    you can burn this file emeka

    lock
    intel hex file
    6kb

  7. A well written article, i’ve bookmarked it so I can look at it once i’m back from work.Thanks for writing it! :)

  8. irin says:

    more information about digital code lock.

  9. thiru says:

    nice useful for me
    how much cost this project is?

  10. Prakash says:

    fine

    good…
    thank u very much

  11. PATHIK PATEL says:

    Please Give Me The Program of AT89C2051. Plz it’s Ergent

  12. sahitya says:

    sir please give me documentation for this project.

  13. jordan says:

    asm file please hehe

  14. monika says:

    pls give the microcontroller code for this code lock..

  15. Ayesha says:

    which l.c.d u used in this kindly tell me the model and Vendor name of l.c.d or give me the data sheet if that L.C.D.
    Thnx
    Regards
    Ayesha

  16. Divyam Chhaya says:

    Excellent !!!
    You’re genius….

  17. PHANI says:

    please can you provide detailed information about code lock

  18. dhiru says:

    sir,i implementd on proteus but hex file shws enter lock code,but it dont
    take 12345 or anythng as a password plz help

  19. yemane says:

    Sir,I need circuit design how to connect the keypad,and microcontroll 8051.
    thank you.

  20. sumeet says:

    i want to make a digital clock with 3 displays of hours minutes and seconds using 8051 uc & 7 segment displays….so can u please tell me how to interface six seven segments with the microcontroller for this purpose?

  21. dhanashri suryawanshi says:

    Please sir, give me the more detail information,block diagram of digital code lock & keypad using AT89C2051.Plz it’s urgend.

  22. amit says:

    sir,which file i must burn in microcontroller….????

  23. vipul says:

    very well writtn article.. exellent job..
    bt how to interface it with door or locker.. cn u plss tell.. its urgent

  24. Pravin gaddam says:

    Sir i want component list ,ckt dig. More info. Related to this so plz send me on this pravin.gaddam62@gmail.com

  25. vicky kumar says:

    sir i m making this program bt i have no source code for it so i requested u plz give me source code for this project. it is very urgent bcauz my last submission date is 25 march….so pz give

  26. Jrra says:

    several years ago – but since you all know – it’s BORING!! Well Zumba isn’t. There exists a fairly long DVD that passes through the dance steps slowly – as well as at 57, and also by no means a dancer, I can get a lot of the steps at least sufficiently to be sinc using the people to the dvd! Yeah! My daughter and that i have done the cardio dvd twice now, and that i may also

  27. amagai001 says:

    Please help me with the source code(intel hex file) of this project. It is urgent please.

Leave a Reply

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup