• 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 1 July 2026 by Admin-Lavi Leave a Comment

In this project we have used Solenoid Door Lock Circuit with Arduino, as Solenoid lock works like magnet latch and then Arduino control it using small signal.

With few parts and simple wiring, we can create automatic locking system for our home or office, also its a very easy and very useful circuit and is good for DIY security system.

Arduino Code:

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:

ComponentsQuantity
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 and relay work like electric switch.

Arduino give 5V signal to relay coil and then relay coil activates and makes the relay click; also when relay clicks, it connects 12V supply to solenoid lock.

After that, lock pulls inside and door unlocks and when Arduino sends LOW signal then relay turns OFF and relay breaks 12V line.

Then solenoid lock loses power and locks back and finally, 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:

  • First, gather all the parts as shown in circuit diagram.
  • Next, connect Arduino 5V pin to relay module VCC pin., connect Arduino GND pin to relay GND pin and then connect Arduino digital pin D7 to relay IN pin.
  • After that, take DC 12V supply positive wire and connect it to relay COM pin.
  • Now connect relay NO (Normally Open) pin to positive wire of solenoid lock.
  • Then connect negative wire of solenoid lock to 12V supply negative.
  • Finally, connect Arduino to laptop using USB connector for programming.

Conclusion:

To conclude, this Solenoid Door Lock Circuit with Arduino can safely control a solenoid lock; also, the circuit is good for door locks, drawers, cabinets and basic home automation.

Filed Under: Arduino Projects, Automation Circuits, Mini Projects, Motor Controllers, 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: « 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

  • 555 Timer Projects (137)
  • Alarm Circuits (81)
  • Amplifier Circuits (94)
  • Arduino Projects (103)
  • Audio Circuits (189)
  • Automation Circuits (150)
  • Automobile Circuits (40)
  • Battery Charger Circuits (88)
  • DIY Projects (435)
  • Free Energy (12)
  • Heater and Temperature Controllers (32)
  • High Voltage (24)
  • Hobby Circuits (241)
  • Indicator Circuits (63)
  • Inverter Circuits (17)
  • IoT projects (12)
  • LDR Circuits (47)
  • LED and Lamps (201)
  • Meters and Testers (44)
  • Mini Projects (390)
  • Motor Controllers (26)
  • Oscillator Circuits (70)
  • Power Supply Circuits (244)
  • Radio Frequency (8)
  • Remote Control Circuits (12)
  • Renewable energy (20)
  • Security and Protection (128)
  • Sensors and Detectors (236)
  • Solar Circuits (31)
  • Timer Circuits (63)
  • Transistor Circuits (178)
  • Transmitter Circuit (19)
  • Tutorials (33)
  • Voltage Regulator (55)
  • Water Level Controller (10)

Recent Posts

  • Low Current Controlled Battery Charger Circuit using LM723 IC
  • 741 Op-Amp Treble Booster Circuit
  • Simple Diode and Transistor Based Audio Limiter Circuit
  • Simple 500mW Speaker Driver Circuit
  • Easy DIY LM386 Audio Amplifier Circuit

Recent Comments

  1. Admin-Lavi on High Voltage Fence Charger Circuit
  2. etere on High Voltage Fence Charger Circuit
  3. Admin-Lavi on High Voltage Fence Charger Circuit
  4. egidio grzinic on High Voltage Fence Charger Circuit
  5. Logic OR Gate Circuit using Transistors - Circuit Ideas for You on Automatic Street Light Circuit using LDR

Copyright © 2026 | New Circuit Ideas