Introduction: Arduino IR Password Lock DIY

So it's the time for an upgrade. Let's make a IR remote password lock! You can even use this to control your room's door lock with a password. You can connect the LED wires to a servo motor to do so, I'll make a tutorial later about it. This is a simple and easy project even absolute beginners can make.

Inside the code, You have the possibility to edit many settings.

So, let's make it!!!

Step 1: Video Tutorial

Watch the video tutorial first and never miss anything!

Step 2: Collecting Parts

  • Arduino
  • TSOP 1738 IR sensor
  • TV/ Any IR remote
  • Breadboard
  • 220 ohm resistors x2
  • Green and Red LED
  • Buzzer (should be active)
  • Connecting wires

Step 3: The Circuit

  • IR reciever connected to PWM pin 11
  • Green LED connected to pin 7
  • Red LED connected to pin 8
  • Buzzer connected to pin 4

Step 4: Arduino Main Sketch

Please download the sketchs from https://drive.google.com/file/d/0B5kBjzQ2BVopd1VyTXNOT05rMjg/ [Includes both scripts(You will need two scripts which are included in this package.)]


password_lock.ino is the main sketch which is included int he package.

Due to technical errors, the code seemed to be losing words when written directly. Sorry about that!

Step 5: Collecting IR Hex Codes of Your Remote Control

In this step, we'll collect the hex codes of your remote control that you gonna use for this project. The circuit of the project is same for this step, but we're going to use an additional code for this step.

The script is included in the above package, in step 4. (ir_get_hex.ino)

Upload the above code to your arduino and collect the hex codes of the keys 0-9 and a key to reset the password (I recommend the power key). Once you collected it, edit the main code of your arduino to add these hex codes to the main sketch.

Step 6: Edit the Main Code to Add Your Values

You can find many settings throughout the script. Everything is described int he script. But the main part is setting values of the IR remote buttons. This is from line 41 to 51 (You can go to a line by pressing Ctrl+L). The values you need is collected from the code 1.

Step 7: Finishing Up

Now all you have to do is to upload the main sketch to your arduino and you can change the settings in the main sketch to make your project perfect for your need.

Step 8: Errors and Error Codes

Error with code decryption. Error code: 0x0001

This occurs when you edit something unusual in the arduino sketch. Try to re upload a fresh version of sketch.

Comments

author
WahyuA7 made it!(author)2017-01-06

help
not work atmega8

author
KomotoD made it!(author)2016-12-11

How should i do this with out the Buzzer? Would i just not include the buzzer or should i change the script?

author
ajithgopi made it!(author)2016-12-11

No, You can do it without the buzzer. Just don't connect the buzzer. there are no other changes :)

author
KomotoD made it!(author)2016-12-12

Thanks :)

author
JUST+CHILIN made it!(author)2016-08-19

Hi I cant open the give two files

author
bcarlsson made it!(author)2016-01-16

Great project, Thanks a lot ... but when compiling the code I get the error:

...IRremoteTools.cpp:5:16: error: 'TKD2' was not declared in this scope
int RECV_PIN = TKD2; // the pin the IR receiver is connected to

Any suggestions?

author
ajithgopi made it!(author)2016-01-16

Try to upload a fresh copy of the script. Just edit the needed variables rather than adding new.

make sure you have installed IRremote.h library

author
ProogramMaker+-+Batty made it!(author)2016-02-24

Apparently the library only works on arduino robot, not uno

author
AnsoGroup made it!(author)2016-02-14

Cool tutorial.

P_20160215_063707.jpgP_20160215_063725.jpg
author
Heyup made it!(author)2016-01-26

This is very good, But would have been a lot better without the music!

Keep it up..... :)

author
ajithgopi made it!(author)2016-01-26

Thank you.It was my first tutorial... next time, I will turn the music volume to minimum or completely remove it.

author
passatempo made it!(author)2016-01-16

thanks! worked out of the box :)

author
ajithgopi made it!(author)2016-01-16

You are always welcome

author
Fearce1 made it!(author)2016-01-14

This first project has earned my vote.
Good job, stay inspired to create!

author
ajithgopi made it!(author)2016-01-14

Thanks a lot

author
Knights12 made it!(author)2016-01-13

Hi Ajith Gopii ! Nice work ! Can You make a Clear Circuit Connection with Pen and Paper Explanation?

author
ajithgopi made it!(author)2016-01-14

Sure, I will add it

author
Duxtal made it!(author)2016-01-13

wht is araduino ?

author
ajithgopi made it!(author)2016-01-14

It's a micro controller.

author
jkarah+fallah made it!(author)2016-01-13

this is awesome thanks a lot ??

author
ajithgopi made it!(author)2016-01-13

You are always welcome :)

author
jkarah+fallah made it!(author)2016-01-13

I have to say that this is a very good start keep it like this and the next stop will be 100k followers but still a very awesome kickoff project

author
DIY+Hacks+and+How+Tos made it!(author)2016-01-13

Awesome project. I like the idea of using a remote for a pass code.

author
ajithgopi made it!(author)2016-01-13

Thank you, you have made the 1st comment on my first project on instructables :D