• 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 22 May 2025 by Admin-Lavi Leave a Comment

This circuit teaches how to make a secret code lock!

To open anything like a box or a door it requires a specific code rather than a key.

Circuit Working:

Simple Electronic Code Lock Circuit Diagram

Parts List:

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

This electronic code lock circuit is unique by its simple design which uses a remarkable code implementation with only one active component and a minimum of eight button switches.

How does the code locks circuit operate?

To activate the relay all four buttons from S1 to S4 must be pushed together.

If any of the S5 to S8 buttons are pressed the relay stays inactive preventing the code from opening.

It is essential that the supply voltage should match the functioning voltage of the relay.

A transistor such as the BC547 can handle currents up to 50 mA but the transistor 2N2222 can only take 0.2A for larger relays.

Formulas:

Relay Coil Current is a tool used to calculate how much resistance a bipolar junction transistor (BJT) requires to operate a relay coil.

Let us look at what is included in the formula below:

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

  • The resistance value (R) in ohms Ω is being solved for.
  • Us indicates the supply voltage expressed in volts V that is being used to power the circuit.
  • The term hFE refers to the BJTs forward current gain.
  • Relay Coil Current in Amperes A represents the current that must run through the relay coil in order to activate the relay.

How the formula is used:

Voltage Drop:

The phrase (Us – 0.6) takes note of the voltage drop across the BJTs base emitter junction (Vbe).

Silicon BJTs usually have a voltage of around 0.6V.

Subtracting this number from the supply voltage (Us) gives the voltage that can provide driving current through the base resistor R and into the base of the BJT.

Base Current Amplifier:

The word hFE multiplies the base current.

To obtain the required current through the relay coil a greater hFE provides a lower base current.

Ohms Law:

Finally using ohms law formula (R = V / I) can divide the desired relay coil current by the resistor value R.

This ensures that the expected resistor value activates the relay coil limiting the current traveling through the BJTs base to the right amount.

In other words this formula is designed to choose a resistor that when used with the voltage in the circuit and the gain of the BJT it allows enough current to travel through the BJTs base to activate the relay coil.

How to Build:

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

Identify components:

  • Check that all of the necessary components mentioned in the circuit diagram are present and that the requirements are correct.

Circuit Design:

  • Connect the power supplies positive terminal to the relays common pin terminals.
  • Wire the relays normally open (NO) pin contact to the positive side of the code locking mechanism.
  • Connect the power supplies negative terminal pin to the negative side of the code lock mechanism.

Place buttons S1 to S4 in parallel:

  • This parallel combination should be connected to the relays input.
  • To avoid activation connect buttons S5 to S8.
  • Connect them to the ground.

Resistor Placement:

  • Use resistors when needed to protect the components and allow proper current flow.

Optional LED Connection:

  • If using an LED for visual indication connect it in parallel with the relay coil using a correct resistor.

Soldering:

  • After testing the circuit on a breadboard one may attach the components to a PCB for a more permanent setup.

Testing:

  • Test the circuit to check that pushing buttons S1 to S4 equally triggers the relay allowing the door lock to open.

Safety:

  • Before powering up the circuit ensure all connections and component values are correct
  • If someone seems confused or inexperienced with electronic circuits look for seeking advice from someone with experience or consulting further resources for better result.

Conclusion:

Electronic code locks provide several advantages over traditional locks including the ability to easily change codes, monitor access and connect with other security systems.

They are used at homes, workplaces, industrial sites and other control of access cases where electronic security is essential.

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: « Simple 70 Watt Audio Amplifier Circuit
Next Post: Simple 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