Introduction: Remote Controlled Door Lock

Picture of Remote Controlled Door Lock

This instructable is based on designing an automated door locking system. Detailed drawing will also be given in aid of understanding.

The aim of this report is to design a remote controlled electronic locking mechanism. This design is a solution to safety in the homes of many citizens by ensuring the ease of locking up at safe distances by means of a remote when faced with danger. It also saves time, reduces the effort associated with keys, and features a dead-bolt locking mechanism which ensures strength and a low probability of mechanical failure with regards to the locking mechanism because of the design simplicity.

In order for this system has features such as an emergency protocol which locks the lock by means of an emergency power supply to drive the servo motor that advances the dead-bolt when the main power to the system is cut. Finally, it in incorporates simplicity into the design because the locking mechanism can be controlled with various remotes, such as garage door remotes, and therefore the appeal of the design can relate to older consumers as well.

Step 1: Step 1: Parts List

Picture of Step 1: Parts List

To build the hardware necessary for this mechanism an initial assumption of hardware that was to be needed was made. This included a servo motor, Arduino Uno, ATMEGA 385PU-P microchip, resistor, power supply, and a signal sending and receiving unit. The logic behind the hardware choices are based on whether it is reliable, cost effective, and whether it would contribute to making this system commercially viable. There after the interfacing of these parts with one another were defined and the coding necessary for the Arduino Uno Microprocessor.

complete with Arduino Boot loader

8 or 16MHz Crystal and 18pF capacitors

3.3V or 5V Voltage Regulator and 47uF capacitor

PCB mount reset switch

10K pull-up resistor

0.1uF capacitor for self-reset

LED and resistor

220 ohm resistor

Sender and receiver

Servo Motor

Power Supply

Step 2: Step 2: Function and Operation

Picture of Step 2: Function and Operation

For this design to function there has to be a mechanism that locks the door in a manner which ensures that it can withstand the possible forces exerted on it by means of intrusion. A dead-bolt (steel bar that can retract and advance, usually into the frame of doors) was chosen as the method of preventing those forces. This is then propelled by a servo motor causing either retraction or advancement of the dead-bolt.

The action of the motor is controlled by indirectly controlled by the receiver. When the button on the remote is pressed the signal it sends out is received by the receiver. As the receiver has a relay on the inside, it is then switched from the open to the closed position which then sends a signal to the Arduino Uno that tells the program to move to the next specified piece of code. When this jump is made to the specified piece of code, the servo motor in turn then actuates and pushes the dead-bolt forward into the door frame. Consequently pressing the button the second time will cause the servo motor to actuate in the opposite direction and retract the dead-bolt from the door frame.

Step 3: Step 3: Connection and Interactions Between Parts

Picture of Step 3: Connection and Interactions Between Parts

The servo motor is connected to the live, ground and to the 3rd dc output port which is a PWM port (clock port) on the Arduino Uno. The receiver is connected to the second port of the Arduino and connected to a resistor and live (5 volt Arduino output) in series and then to Normally Open port of the receiver. The common port is directly connected to ground. Then lastly the receiver is connected to a 12 volt dc power source

Step 4: Step 4: Main Components and Choice Validation

Picture of Step 4: Main Components and Choice Validation

The Servo Motor:

A servomotor is a rotary actuator that is used for precision control of angular position, velocity and acceleration. It also requires a relatively sophisticated controller like the Arduino, often a dedicated module designed specifically for use with servomotors. Servomotors are not a specific class of motor although the term servomotor is often used to refer to a motor suitable for use in a closed-loop control system. This specific motor is a Fitech Micro Servo 9 gram FS90, and was chosen because of its relatively low price and small size, however a different and more powerful motor is used in our locking mechanism intended for actual use although that design is only theoretical and will be mentioned later.

The H-Bridge:

To control the direction of rotation, the polarity of current supplied to the motor must be reversible; this is achieved by the H-bridge. It uses 4 switches which, when switched on one pair at a time, changes the direction to the desired motion.

The Arduino Uno:

The Arduino device will be responsible for programming the ATMEGA microchip of the circuit, which. Arduino is a single-board microcontroller, intended to make the application of interactive objects or environments more accessible. Current models feature a USB interface, 6 analogue input pins, as well as 14 digital I/O pins which allow the user to attach various extension boards.

It was chosen because it is an inexpensive and easy way to program interactive objects. It comes with a simple integrated development environment (IDE) that runs on regular personal computers and allows writing programs for Arduino using C or C++.

The Infrared Remote Control:

A wireless device used to operate electronic equipment within a room using light signals in the infrared range. The Infrared light needs to be in line of sight to the receiver and also in the same room; therefore the distance of the required infrared signal is limited, making it safer.

Step 5: Step 5: Progamming

Picture of Step 5: Progamming

Coding and explanation of coding for Arduino Uno

#include // include servo header file

Servo myservo; // create servo object to control a servo

int pos = 0; // variable to store the servo position

int remotePin = 2; // set pin for remote input

int servoPin = 3; // set pin for servo

int openState = 1; // variable to store mechanism position (1 if open; 0 if closed)

int x = 5; // stores time to delay before next position is sent to servo

// also helps to set speed of mechanism and debounces switch input

void setup()


pinMode(2, INPUT); // set pin 2 as input

myservo.attach(servoPin); // attaches the servo on pin 3 to the servo object


void loop()


if(digitalRead(remotePin)) //checks if remote has been pressed


if(openState) //checks if mechanism is open


for(pos = 1; pos < 179; pos += 1) // goes from 10 degrees to 180 degrees

{ // in steps of 1 degree

myservo.write(pos); // tell servo to go to position in variable 'pos'

openState = 0; // sets state to closed

delay(x); // waits x ms for the servo to reach the position



else //checks if mechanism is closed


for(pos = 179; pos>=1; pos-=1) // goes from 180 degrees to 10 degrees


myservo.write(pos); // tell servo to go to position in variable 'pos'

openState = 1; // sets state to open

delay(x); // waits x ms for the servo to reach the position





{} // do nothing if remote pin is not active


Protection of system

Step 6: Conclusion

Picture of Conclusion

a simple yet efficient wireless door locking mechanism. the design will successfully open and close the door latch and will also have enough power to withstand a heavy latch. The design is simple to operate and very convenient.


sidaqdeep1 (author)2016-08-08

Hi, I made it right with the right code but its just not working. Please can anyone help?

DIY Hacks and How Tos (author)2015-12-12

Awesome! One step closer to a fully automated house.