Digital code lock

john November 15, 2011 52 Comments

Description.
This is a simple but effective code lock circuit that has an automatic reset facility. The circuit is made around the dual flip-flop IC CD4013.Two CD 4013 ICs are used here. Push button switches are used for entering the code number. One side of all the push button switches are connected to +12V DC. The remaining end of push buttons 2,3,6,8 is connected to clock input pins of the filp-flops. The remaining end of other push button switches are shorted and connected to the set pin of the filp-flops.
The relay coil will be activated only if the code is entered in correct sequence and if there is any variation, the lock will be resetted. Here is correct code is 2368.When you press 2 the first flip flop(IC1a) will be triggered and the value at the data in (pin9) will be transferred to the Q output (pin13).Since pin 9 is grounded the value is “0” and so the pin 13 becomes low. For the subsequent pressing of the remaining code digits in the correct sequence the “0” will reach the Q output (pin1) of the last flip flop (IC2b).This makes the transistor ON and the relay is energised.The automatic reset facility is achieved by the resistor R11 and capacitor C2.The positive end of capacitor C2 is connected to the set pin of the filp-flops.When the transistor is switched ON, the capacitor C2 begins to charge and when the voltage across it becomes sufficient the flip-flops are resetted. This makes the lock open for a fixed amount of time and then it locks automatically. The time delay can be adjusted by varying the values of R11 and C2.

Circuit diagram with Parts list.



Notes.

  • Assemble the circuit on a good quality PCB.
  • The circuit can be powered from 12V DC.
  • Mount the ICs on holders.
  • The L1 can be a 12V, 200 Ohm SPDT relay.
  • Capacitor C1 should be tantalum type.
  • The C1 and C2 must be rated at least 25V.
Comments
  • ajin
    March 24, 2014

    sir
    In ic1b and ic2b wheather will have the supply connection

  • October 9, 2013

    good day. i have a project digital combination code lock due tomorrow, pls help me. someone made fun of my schematic diagram and swtiched the pins intended for the LCD and for the keypad. now im having a very hard time programming the PIC and header since the pin configurations are all messed up. pls help… look at my name. I am using a PIC16F877 with 2X16 4-bit LCD based display. and 3X4 4 bit keypad with decoder. God speed!

  • rost
    April 1, 2013

    sir i hav been working on this project for 1 week, without the reset circuit its working fine, but once it is included the relay is not being energised,pls help sir

  • shally
    March 18, 2013

    Sir, I have been working on this project for two days. All connections are
    made accordingly to your diagram. I also implemente it on multisim. Its working fine on that.But when I implementing on breadboard even the IC doesnt support output is constant and not varying with changing the clock cycles.
    Please help

  • shally
    March 12, 2013

    Could you please submit a simulation of this circuit using multisim .
    I am facing this problem but i am simulating the exact circuit what is given Please Help!!

  • rost
    February 27, 2013

    sir, can you send the project report!!

  • Fatik
    December 15, 2012

    Sir may I use CD4013BE or CD4013BC instead of CD4013???

  • kasi
    October 18, 2012

    i need this project report

  • kumar
    September 27, 2012

    which software is used to run this circuit in computer. help me sir….

  • swapna
    August 27, 2012

    plz can u tell whats the function of relay coil in this circuit.. and where the output have to be seen……….its very inportant for me.if possible plz upload the breadboard connetion. thanku

  • nagasundhari
    August 24, 2012

    hai sir i want to know the application of this digital code and which purpose it willbe used????

  • POOJA
    April 23, 2012

    Sir,
    I tried simulating in Multisim, but i have no idea what to use as the spdt relay and what difference would i see once the simulation is complete
    pls help
    Thank u

  • rahul
    April 19, 2012

    thank you sir.
    my circuit worked i have raised the holding time by about 7sec. i have used
    a 3300Mfd capacitor and a 2.2k resistance.

  • Seetharaman
    April 16, 2012

    Hi Rahul to increase the holding time, raise the value of R11, C2 or both. Please read last two lines of the description. may be 1000uF or R11 to 2.2K ohms.

  • rahul
    April 16, 2012

    sir
    when i activate my lock the relay activates only for a fraction of time and again deactivates I could not find the error .
    rahul

  • rahul
    April 15, 2012

    sir
    i could not understand why my Vce is not raising at all it is about 0.04 v .
    rahul

  • rahul
    April 15, 2012

    sir
    is it because of the capacitor c2 I have used a 100mf 63v capacitor..
    rahul

  • rahul
    April 15, 2012

    sir
    sorry to bother u again but the circuit is still not working when i activate the lock it the out put is only for small moment the out put still not proper
    rahul

  • rahul
    April 14, 2012

    sir
    thanks a lot for your time and advice..
    rahul

  • seetharaman
    April 14, 2012

    Hi rahul open circuit voltage will be full. once you connect the transistor it will fall down to 0.7 volts when on.

  • rahul
    April 14, 2012

    sir
    u r correct E&C of the transistor i have connected are interchanged.
    sir the data sheet says V EB should be maximum 5v. Initially when the lock is off it is about 0.07 v but when the lock is turned on it raises to about 11v .Sir will it damage the transistor ?? I have checked it without connecting the transistor i.e between the 1.5k resistor and emmiter of Q1, or it will be different when i connect the transistor..
    rahul

  • seetharaman
    April 14, 2012

    Hi Rahul check EBC of Q1. this transistor is different from normal small signal TO92 transistors. Since you have indicated that vbe is 9.51v. cannot be when transistor is forward biased, it can be at a maximum of 0.7volts only. it looks your emitter and collector are interchanged please refer the datasheet.
    http://www.fairchildsemi.com/ds/2N/2N3906.pdf

  • POOJA
    April 14, 2012

    Sir,
    I tried simulating in Multisim, but i have no idea what to use as the spdt relay and what difference would i see once the simulation is complete
    pls help
    Thank u

  • rahul
    April 14, 2012

    sir
    I have corrected my circuit.. but my relay is still not energised . But the voltage between the base of Q1 & gnd is 10.8v (initially) wen i activate the lock it drops to around 1.8 v. which sows my circuit is working.
    The EC & EB voltages of Q1 are as follows.

    initial EB 0.32v when the lock is on EB 9.51v
    EC 8.68v EC 8.68v
    I could not understand whats going on..

    sir please reply as soon as possible.
    rahul

    • ajin
      March 24, 2014

      hi rahul bro can u send the correct circuit to me even me to having the same problem in that 9 pin is data pin then how this will reset the whole circuit so please send me the correct circuit bro

  • Seetharaman
    April 13, 2012

    Hi Rahul go through the following link
    http://www.free-circuit.com/2009/06/

  • rahul
    April 11, 2012

    how is the data line going to reset the circuit…..???
    rahul

  • rahul
    April 11, 2012

    I am still confused about pin 9 its still grounded . Pin 9 is the data line of D flip flop.where should it go .
    please correct the circuit as soon as possible.
    rahul

  • rahul
    April 11, 2012

    hi
    can any one help me with this circuit . Is this circuit working??I have assembled it for my project but it didn’t work.

    rahul

  • February 9, 2012

    Very knowledgeable article. can we use it in a computer security system??

  • anurag
    January 7, 2012

    sir, can plz anyone tell me d way v can change d code? n plz, tell me for wat kind of locks v can use it?

  • santhan
    December 23, 2011

    Can we change the code in this circuit sir..?

  • labtec
    November 14, 2011

    Pin 9 should not be grounded, it is a mistake. Gentleman who made this drawing was too much excited and in a hurry to share so he left two mistakes in the schematic for people to wonder. Never mindm search the pin configuration on the net and use only IC CD4013 (not CD4049). Cheers….

    • admin
      November 15, 2011

      that was a typo error from my part. i have corrected the circuit

      thanks for pointing the error
      Admin

  • hammedshekoni
    October 14, 2011

    pls if dere isn’t a grounded pin 9 in ic1a which pin is den grounded, and wld it be at d relay that there wld be an output after entering the code or pushing d right buttons

  • seetharaman
    September 27, 2011

    Hi Chianmy sorry it was on the same frame this circuit was drawn so please leave those words CD4049 use CD4013 instead.

  • Chianmy
    September 24, 2011

    Why is it mentioned as ‘Digtal code lock using CD4049’ below the circuit diagram?

  • Karthiga
    September 20, 2011

    please can you upload the breadboard connection for this circuit

  • seetharaman
    July 20, 2011

    Hi Ilija you are correct IC1 pin no9 shown as going to ground is wrong. delete that line other wise the circuit is correct.

  • ilija
    July 20, 2011

    yes, what does it mean pin 9 ?!? I don’t understand it

  • ap
    June 19, 2011

    Can you please tell me what will happen when the relay is energised? Where do you put the motor? Thanks!!

  • DG
    February 8, 2011

    HELLO GREAT CIRCUIT HOW EVER THE FIRST IC IC1A HAS TWO PINS 9 LISTED IS THAT AN ERROR CAN YOU PLEASE CONFIRM
    THANKS

  • SARADA PRASANNA
    January 28, 2011

    Thank u sir,i am fully impressed by getting this topic.&soved my doubts.

  • mehatb
    January 26, 2011

    plz give its state diagram to understand its working….plz plz …i have just 2 hrs to submit this project and perform in viva

  • naufan
    January 19, 2011

    sory i want to ask again,, i have been made it, but why it doesn’t work?? i gave it suplay 12 v and i use relay hrs4h and connect it to DC motor,, but the DC motor doesn’t work..

  • Seetharaman
    December 13, 2010

    Hi Naufan L1 can be the solenod coil of the latch or through this relay’s contact you can operate the locks solenoid.

  • naufan
    December 12, 2010

    excuse me,, i want to ask what is the function ogf the relay coil??

  • aawim
    November 19, 2010

    Hi Sir. how can i change the code if i want to change it beside changing it from the circuit’s wire? thank you.

  • June 15, 2010

    I appreciate this entry. This was super cool.

  • angel
    February 25, 2010

    kindly give me materials 4 the digital code lock

  • manish kumar
    February 20, 2010

    it is a very good projects but there is not information of realy and how to control motor.you have to use your mind to control the motor.

  • N.Nagaraj
    December 1, 2009

    Thanking you for giving the code lock circuit.
    By this my problem is solved. Thanking you once more

Leave a Reply to manish kumar Cancel reply

Your email address will not be published. Required fields are marked *