• 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 » Solenoid Door Lock Circuit with Arduino

Solenoid Door Lock Circuit with Arduino

Last updated on 22 November 2025 by Admin-Lavi Leave a Comment

In this project we have used Solenoid Door Lock Circuit with Arduino

Solenoid lock works like magnet latch.

Arduino control it using small signal.

With few parts and simple wiring, we can create automatic locking system for our home or office.

Very easy and very useful circuit and is good for DIY security system.

Arduino coding:

int lockPin = 7;

void setup() {
pinMode(lockPin, OUTPUT);
}

void loop() {
digitalWrite(lockPin, HIGH);
delay(3000);
digitalWrite(lockPin, LOW);
delay(3000);
}

Coding Explanation:

  • lockPin is the pin that controls solenoid.
  • In setup Arduino sets pin as output.
  • In loop code turns pin HIGH.
  • Solenoid gets power and lock opens.
  • Delay waits 3 seconds.
  • digitalWrite LOW turns solenoid OFF and lock closes.
  • Second delay waits 3 seconds and repeats.

Circuit Working:

Solenoid Door Lock Circuit Diagram with Arduino

Parts List:

Part NameQuantity
Arduino UNO1
Solenoid Lock1
DC 12V Power Supply1
5V Single Channel Relay Module1
USB Connector1

Arduino cannot give 12V to solenoid directly.

So we used relay module.

Relay work like electric switch.

Arduino give 5V signal to relay coil.

Relay coil activates and makes the relay click.

When relay clicks, it connects 12V supply to solenoid lock.

Lock pulls inside and door unlocks.

When Arduino sends LOW signal then relay turns OFF.

Relay breaks 12V line.

Solenoid lock loses power and locks back.

So Arduino just controls the relay and relay controls solenoid.

Formula with Calculation:

Formula for solenoid current:

I = V / R

where,

  • I is the current
  • V is the voltage
  • R is the resistance

So, I = V / R means:

Current = Voltage divided by Resistance.

How to Build:

To build a Solenoid Door Lock Circuit with Arduino follow the below connection steps:

  • Gather all the parts as shown in circuit diagram.
  • Connect Arduino 5V pin to relay module VCC pin.
  • Connect Arduino GND pin to relay GND pin.
  • Connect Arduino digital pin D7 to relay IN pin.
  • Take DC 12V supply positive wire and connect it to relay COM pin.
  • Connect relay NO (Normally Open) pin to positive wire of solenoid lock.
  • Connect negative wire of solenoid lock to 12V supply negative.
  • Connect Arduino to laptop using USB connector for programming.

Conclusion:

This Solenoid Door Lock Circuit with Arduino can safely control a solenoid lock.

Transistor and diode protect Arduino and give proper current to the lock.

Good for door locks, drawers, cabinets and basic home automation.

References:

Solenoid Lock doesn’t work

Filed Under: Arduino Projects, Motor Controllers

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: « RF Transmitter Receiver Circuit with Arduino Uno
Next Post: KY040 Encoder Module Circuit with Arduino »

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar




Categories

  • Alarm Circuits (47)
  • Amplifier Circuits (67)
  • Arduino Projects (100)
  • Audio Circuits (116)
  • Automobile Circuits (19)
  • Battery Charger Circuits (65)
  • Free Energy (13)
  • Heater and Temperature Controllers (13)
  • High Voltage (1)
  • Indicator Circuits (46)
  • Inverter Circuits (20)
  • IoT projects (1)
  • LDR Circuits (26)
  • LED and Lamps (150)
  • Meters and Testers (31)
  • Motor Controllers (22)
  • Oscillator Circuits (40)
  • Power Supply Circuits (110)
  • Remote Control Circuits (10)
  • Security and Protection (29)
  • Sensors and Detectors (127)
  • Solar Circuits (29)
  • Timer Circuits (41)
  • Transistor Circuits (92)
  • Transmitter Circuit (17)
  • Tutorials (8)
  • Water Level Controller (7)

Recent Posts

  • IC 7805 12V To 5V 2A Boost Converter Circuit
  • IC LM309 Based 5 Volt Power Supply Circuit
  • 5V 0.5A Regulated Power Supply Circuit
  • Transistor Based 5V Linear Power Supply Circuit
  • 5V Regulated Power Supply Circuit using Transistors

Recent Comments

  1. TDHofstetter on DIY Variable Power Supply Circuit using Arduino
  2. feathbuff on Simple Micro Ampere Meter Circuit
  3. Admin-Lavi on Simple School Project Multimeter Circuit
  4. choke on Simple School Project Multimeter Circuit
  5. Admin-Lavi on Analog to Digital Converter Circuit using IC 555

Copyright © 2026 | New Circuit Ideas