Many electronics circuits and projects for learning in simple ways.

10 Key Code Lock Switch Circuit

This is a key code lock switch circuit, type of electronic circuit. To replace a conventional normal key switch, without inserts keys. But you can press the number code instead of unlocking keys. We do not need to carry a load key, and do not worry about your keys are lost. We just must remember to commit to a code only.

The feature of this circuit

  1. Using a four numeric code number and can change one thousand numbers.
  2. The case of other people to know our original code. The code can be changed easily.
  3.  It is a simple digital circuit that without a microcontroller. Thus it is no programming, easiest, and cheaper.

The circuit is designed to have the reset system, immediately enter the wrong code. So can prevent pressing a random numeric code. Because in this circuit the switches are set to the ten numbers, be the code switch 4 pcs. and be reset switches 6 pcs.

The advantages of having a system reset. Suppose we set the code number is 6583. If people do not know the code, they will press random from 0 to 9.  It will have one correct number is 6.

But we press randomly in second, that is not 5. Then, the circuit will reset number 6 that last remember go away.

Thus, we will enter a correct code, just the first digit only.  However, if it is without the reset system. Even those who do not know the code, it can press random in a fourth only.

When we hit 0-9 from the first round, we will correctly hit to the No.6.  Then we hit the second round will correctly is one of No.5 as well. When the full four rounds, it will have a four code so the circuit is working.

This difference is quite obvious.

We have talked about its advantages and disadvantages for enough.  Then to look at the circuit and how it works really well.

How it works

This circuit uses a 74HC4017 or CD4017 IC  number that is DECODE Counter model. It serves to change the code.

In normal conditions, when we provide a power supply to this circuit. Then, there is a positive voltage at the output, pin 3 of IC1.

When you press the switch A, S1. The positive voltage from pin 3 via it to the pin 14 of IC1, input pin.

Key Code Lock Switch Circuit Using IC-4017


Key code lock switch circuit diagram

Next, when IC1 has the input is a positive voltage. It will move the output from pin 3 to pin 2.

So the next switch that we must press to be switch B, S2. It causes the positive voltage at the input of IC1, in next step.

As you can see, if we do not press the switch B, it will not change any more of IC.

And if we push a wrong switch in one of six options on the left-hand side of this circuit.

It is the positive voltage to pass through this switch to the input pin 15, reset pin of IC1. When the pin 15 is the positive voltage, IC1 will change the output to at pin 3.

Thus it is resetting switch A to restart new again.

If we press these switches in the correct ways from A, B, C and D in order. IC will move output to pin 10. Which it connects through a diode, and R-10K to pin B of the Q1-2SC1815.

Then, Q1 conducts a power to relay-RY1 and LED1, they work together. the LED lights up.

Let us know, for the 5 diodes that connected to the out of IC1. They protect a collision of the output. For example, the two codes are the same as 5385 code.

The connection of keys code

When we need any code, we can connect code number to switch positions.
For example, we need code is 5385. We have to connect as follows.

  1. First, CODE 5 to Switch 1 (A) at pin  of IC
  2. Second, CODE 3 to Switch 2 (B) at pin of IC
  3. Third, CODE 8 to Switch 3 (C) at pin  of IC
  4. Fourth, CODE 7 to Switch 4 (D) at pin  of IC
  5. Fifth, others CODEs to Switch 5 to 10 to connect to pin of IC

Parts List
IC1_74HC4017 or CD4017 —DECODE Counter model
Q1_2SC1815 or 2SC828 —45V 0.1A NPN Transistor
RY1_Relay 9V—One contact 5A
C1_100uF 25V—Electrolytic
0.25W, 5% Resistor
R1,R2_100K
R3_10K
R4_1K
D1-D5_1N4148—0.4A 200V Diodes
D6_1N4002—1A 200V Diode
LED1_LED any color 3mm.
S1-S10_Switch Tactile ON OFF Single Pole, Single Throw Round Button

Keep reading: ‘16 key encoder using IC 74C922N’ »

How to builds

If you want to build this project, can assemble them on universal PCB. Because of fast and saving.

But you need to make the general PCB,
Component-layout-of-key-code-lock-switch-circuit-min.jpg Actual-size-of-Single-sided-copper pcb of key code lock switch
Actual-size of single-sided Copper PCB layout and

Component-layout-of-key-code-lock-switch-circuit
Component layout.

We test the circuit on a breadboard it working, as Figture 2

key-code-lock-switch-circuit-on-breadboard

Watch video building and testing circuit on a breadboard.

Note: Q1 you can use a lot of numbers that is NPN transistors but the position legs are different.

Creation – Application

You should assemble include the parts to the correct place. The small first such as R, Diodes, IC Socket, etc. Then, followed by large parts.

When place parts ready, Check everything compete before, insert IC1 into a Socket. Next, connects a power supply, and pressing code.   If the relay pulls in and LED glows, the circuit works well.

Keep reading: ‘One button code Switch’ »

This Post Has 22 Comments

  1. How to change the code of this circuit

  2. Hi, irfan shah

    You can change position of A B C D of code to any Sw1-10 on panel.

  3. Is this project work in real????
    Bcs i got this project in my clg
    Pls tell me and help me bcs i hv very short time to complete it
    I will bw thank full you

  4. is it really works? badly need in our project :'(

  5. Boa tarde, como projeto de final de ano decidi elaborar este projeto do “switch key” e, tendo todos os componentes bem montados, não consigo fazer o circuito reagir, preciso de fazer alguma alteração?

    Obrigado pela atenção,
    Cláudio

  6. There is only one but major problem in this project and that is “sequence of shifting the output from one to another is not trustworthy”. After providing clock pulse the shifting of output is not sequential. May be, this is fault of IC.

  7. I have succeeded in making this project.
    It is really a good project.
    It is working also good,without any else.
    I am a student of class xth..SAM

    1. How to set password first time.. because I don’t all connection but I don’t know how set password first time… Pls help me

    2. Saad ahmad minari i will also have this one project can you please tell me that how can I change the password and make a new password

  8. Hi Saad ahmad mirani,
    We are very happy that hear good sound.
    This is circuit useful for you.
    Thanks for feedback.

  9. Thank you from your helpful schematic, but how can I put a code on it ? how to change the code?

  10. By saying connections of 6digits to N what do you mean N

  11. my project is not working properly…as in m not able to find what is exactly the output….please help me ASAP….dis is my mini project in college…..plz rply fast…..n i hav done the same ckt ua given….n used 9V relay…..plzzzzzzz help me…..i will b thankful 🙂 🙂

    1. Use BC 547 or bc 548 transistor instead of 2n3904

      1. Yes you are right

  12. Hi
    I need help.
    I am making a combinations lock.
    Someone pls help me construct it
    Can someone post a video please.
    Thanking you in advance

  13. My brother suggested I may like this website. He was once totally right.
    This submit actually made my day. You cann’t consider simply how so much time I had spent for
    this info! Thanks!

  14. Hii,
    My circuit is not working what should i do it cannot start by pressing the correct password :please tell me what i do for this

    1. Hi Gulshan
      Thanks for your question.
      I am sorry for my article is not clear.
      I rewrite it new.
      You can read it again.
      But it is not complete. I will come back to modify circuit it new.
      (Today I busy.)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu