For about a year now I have been wanting to build a combination lock with the PIC16F84A so finally here it is, very simple as it is yet the important thing is that it works.

I built it from the schematic from this website: http://jap.hu/electronic/combination_lock.html:

The hex and asm code can also be downloaded from the website to program the pic with. For this initial setup of the combination lock i made a few modifications to the design which involved taking out the 5v regulator and replacing it with a 5v1 diode, removing the relay and transistor setup and replacing it with a simple L.E.D and also getting rid of LED1. The crystal I used was a 3.578 MHZ crystal. The main purpose for all this is just to make sure the PIC is being interfaced with the keypad correctly and is acknowledging a password being entered in and being able to change its password stored in its memory. Which, believe it or not – works! <insert a little dance here>

Basic Combination Lock

So now that everything looks dandy on a basic level the goal is to have a combination lock that is interfaced with a computer, allowing a number of parameters of the lock to be changed via pc as well as passwords and a log of what has been entered on the keypad and any successful or unsuccessful entry attempts. Anyway thats hopefully where things are heading!

Stay tuned for more mystical, world domineering and pointless projects.

3 Responses to “Finally… A combination lock!”

  1. csirac2 Says:

    Zane! Finally you’re making PIC projects like the rest of them. I remember when I told you about PICs and you thought it’d be all hard and scary.

    So you’re doing the keypad debounce in software? Come on… a small RC circuit never hurt anyone. The best software is hardware!

  2. r3cca Says:

    can u send me the schematic diagram pls.. the site is no longer available.. tnx ryoma2k8@yahoo.com

  3. zanev Says:

    It’s is all still scary, there is so much you can do with PICs. Unfortunately I am not very efficient in programming them yet but when I am world domination is inevitable.

    I’ve been looking into the RC circuit for debouncing but it looks there there is an easier way with logic gates but still doing a bit of research on it at the moment.

    r3cca – it looks like the website only went unavailable for a little while and is back up now.


Leave a Reply