How to Build an Electronic Combination Lock

How to Build an Electronic Combination Lock
Page content


In one of my previous articles I have already discussed the pin designations and operating specifications of IC4017. In this article we will see how simple it is to wire this IC into an electronic combination lock. Since this circuit incorporates a keypad (micro switches) and the locking / unlocking action is done by pressing an assigned code number, it can be also called as a code lock circuit. This circuit can play an important role in numerous places, where a sort of anti-theft security is indispensable, for example in vehicles, safes, restricted entries etc.

Parts list

You will require the following parts for the construction of the electronic code lock:

  • IC 4017- 1 no.
  • Resistors 10 K- 3 nos.
  • Resistor 1 M- 1 no.
  • Transistor BC547- 2 nos.
  • Capacitor 1u/25v- 2 nos.,
  • Diode 1n4007- 4 nos.,
  • Capacitor 1000u/25v- 1 no.
  • Relay 12 volts- 1 no.
  • Micro switches- 10 nos.,
  • General purpose PCB- As per fitting.


You will need a soldering iron, solder wire, nipper to begin the assembly procedure of the electronic code lock, which is as follows (refer circuit diagram alongside):

  • Start the assembly of the electronic code lock by fixing the micro switches first, at one end of the PCB. Place them in such a manner that the whole block of 10 switches is distributed uniformly and covers 50 percent of the space of the PCB. Join together the common points of the switches.

  • Solder the IC in the remaining part of the PCB, keeping its orientation such that you get a most comfortable connecting path from the IC to the switches. Take care, that the interconnections are not messy or congested.

  • Next solder the transistors, resistors, capacitors, relay etc. as per the diagram. Do keep some space for the power supply components.

  • Finally connect the four diodes and the filter capacitor 1000u/25v to complete the power supply bridge configuration.

The circuit board of the combination lock or the code lock circuit is now ready and just requires a supply voltage from a transformer to start functioning.

The testing and the functioning of the above electronic combination lock circuit will be discussed in the next part of the article.