Introduction: Programmable Security Lock Using Arduino

About: Mitu Raj -- Just a Hobbyst and Learner -- Chip Designer -- Software Developer -- Physics and Mathematics Enthusiast

This is to inform that this blog is now archived and I have started a new website/blog of my own: Chipmunk Logic. I hope you guys follow/subscribe me for free content and knowledge and continue supporting me. Hereafter, I will publish all my future technical blogs there :)

This is my first blog here. I am presenting here an Arduino based programmable security lock (PSL) for locking electronic appliances. The PSL circuit is used to switch on/activate/unlock an AC/DC appliance on external power supply, based on passwords. The appliance can be unlocked only if the correct password is fed.

- The numeric password can be of any length of our choice ( max.length 15). Initial password is programmed into EEPROM of UNO.

- Password programmable by SMS from a unique authorised number. The authorized number is also initially programmed into EEPROM.

- SMS Commands, Alerts , Maximum 3 wrong attempts , Emergency freeze mode for increased security.

- Developer : Mitu Raj


Arduino UNO, GSM-900 Module, LCD, LEDs, Keypad, Jumper wires, bread board/PCB.

Step 1: Components Required

1) Arduino UNO

2) SIM 900A GSM module

3) 4x4 matrix keypad

4) 5V Relay Module

5) 16x2 LCD display

Step 2: Circuit Connection

1) 4x4 Keypad pins 1-8 are connected to D2-D9 pins of Arduino. If you get incorrect response from the keypad , it maybe because you connected it in the reverse order. Take a note of this.

2) SIM 900A GSM module's RX and TX are connected to D11, D10 respectively. We use these pins as software serial . GND of GSM is connected to Arduino GND .

3) Use 9V 2A adapter as power supply to GSM module. 2A is preferred over 1A rated adapter. The same may be used to power the Arduino too. Your wish.

4) The 5V relay module is connected to D12 pin. and "Busy" status LED . Choose the relay wisely ( generally capable to switch 24V DC/ 240V AC 5A rating).

5) Interface the LCD display as in the circuit diagram shown.

You are ready to GO !!!

Note : The Led in 13th pin is connected in reverse manner in the circuit diagram . please connect the positive of the Led to the Vcc of the arduino , and the negative to D13 via the resistor . Also connect the analog pins to LCD in the reverse order to that in the circuit diagram .

Note : The phone number is 12 digits length total in my code, including country code...If it differs, change accordingly in the code after understanding the code.

Step 3: Notes

Implement individual Keypad test , GSM test and testbench in Arduino before you proceed to the complete circuit implementation ( go through guidelines too in main code folder ). The necessary files and instructions have been attached with this. Also make sure that your Arduino IDE contains keypad.h , softwareserial.h libraries.

link to my paper :

For any queries, feel free to contact me:
Mitu Raj

follow me:



Step 4: