• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Simple Electronic Code Lock Circuit

Simple Electronic Code Lock Circuit

Last updated on 12 July 2025 by Admin-Lavi Leave a Comment

This is easy and Simple Electronic Code Lock Circuit.

To open door or box no need of key we can use special code instead.

This circuit uses buttons and code to the open lock.

Only correct code can open and wrong code will not work.

Circuit Working:

Simple Electronic Code Lock Circuit Diagram

Parts List:

ComponentQuantity
Resistors (1/4 watt) 1k 2
Semiconductors
Transistor BC5471
Diode 1N40071
Relays1
Mini switches (ON/OFF)8

This code lock circuit is famous because design is very simple.

It uses smart code with only one main part and 8 push buttons.

How this lock circuit work?

To turn ON the relay we must press all 4 buttons S1, S2, S3, S4 together.

If we press any wrong button like S5 to S8 relay will not work and lock will stay closed.

Very important: power supply voltage must be same like relay voltage.

Small transistor like BC547 can take current up to 50mA.

If relay needs more power then use transistor like 2N2222 it can take 0.2A.

Formulas:

Relay Coil Current is tool for finding how much resistor (R) needed for BJT transistor to turn ON relay coil.

Lets see what is inside the formula:

R = (Us – 0.6) × hFE / Relay Coil Current

  • R is resistor value in ohms Ω we want to find this.
  • Us is power supply voltage in volts V.
  • hFE is BJT gain how much it can increase base current.

Relay Coil Current is how much current is in Amps A which is needed to turn ON the relay.

How to use this formula:

Voltage Drop:

(Us – 0.6) means voltage drop at base emitter of BJT.

Most BJT have drop of 0.6V so we subtract it from power supply.

This give us voltage for base resistor.

Base Current Gain:

hFE show how much transistor multiply base current.

Bigger hFE = less base current needed to turn ON relay.

Ohms Law:

Use formula R = V / I.

This will help find correct resistor R so enough current goes in base of BJT which is not too much.

In simple words:

This formula help choose good resistor so transistor work correct and switches ON relay coil with right amount of current.

How to Build:

To build a Simple Electronic Code Lock Circuit following steps are used for connections:

Identify Parts:

  • Check all parts in circuit diagram are there.
  • Be sure all parts match the needs of circuit.

Make Circuit:

  • Connect power supply positive (+) to relay common pin.
  • Connect relay NO (normally open) pin to positive side of code lock system.
  • Connect power supply negative (-) to negative side of code lock.

Button Connection (S1 to S8):

  • Put S1, S2, S3, S4 in parallel.
  • Connect this group to relay input.
  • Connect S5, S6, S7, S8 to ground to stop wrong press from turning ON relay.

Use Resistors:

  • Put resistors where needed to save parts and control current flow.

LED (Optional):

  • If we use LED then connect it with resistor in parallel to relay coil.
  • This show light when relay is ON.

Soldering Work:

  • After testing on breadboard we can solder all parts on PCB for better and strong setup.

Test Circuit:

  • Press all buttons S1 to S4 together, relay should turn ON and unlock the door.
  • If wrong button is pressed then relay will stay OFF.

Be Safe:

  • Before power ON check all wires and part values.
  • If we are not sure how to make circuit then ask someone who knows or learn more before trying.

Conclusion:

Simple Electronic Code Lock Circuit are better than old key locks.

We can change code easily and can see who entered and how are connected with other security systems.

This type of circuits are used in homes, offices, factories and more.

References:

Development of a Programmable Electronic Digital Code lock system

Filed Under: Security and Protection

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « 70 Watt Audio Amplifier Circuit
Next Post: Cable TV Amplifier Circuit »

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar




Categories

  • Alarm Circuits (30)
  • Amplifier Circuits (67)
  • Arduino Projects (29)
  • Audio Circuits (93)
  • Automobile Circuits (19)
  • Battery Charger Circuits (48)
  • Free Energy (13)
  • Heater and Temperature Controllers (9)
  • Indicator Circuits (38)
  • Inverter Circuits (13)
  • LDR Circuits (13)
  • LED and Lamps (111)
  • Meters and Testers (27)
  • Motor Controllers (18)
  • Oscillator Circuits (32)
  • Power Supply Circuits (91)
  • Remote Control Circuits (6)
  • Security and Protection (23)
  • Sensors and Detectors (71)
  • Solar Circuits (16)
  • Timer Circuits (27)
  • Transistor Circuits (56)
  • Transmitter Circuit (12)
  • Tutorials (4)
  • Water Level Controller (4)

Copyright © 2025 | New Circuit Ideas