Site icon Circuit Ideas for You

Solenoid Door Lock Circuit with Arduino

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:

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,

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:

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

Exit mobile version