Infrared Door lock


I am an extreme newbie (found out about arduino today after mistaking it for android and being corrected by friend). So let me make it clear that I have close to 0 knowledge about the hardware side, so feel free to correct me if I am wrong.

But anyway, here's my idea, and I'd like to know whether: 1. My idea has any fundamental flaws. 2. It could work. 3. If it could, Arduino board and peripherals I would need 3. If there were a cheaper alternative. 4. Level of difficulty.

So, what I think I want to do is to hook up an Arduino device with:

Input devices: 1. 4 infrared sensors arranged in 2x2 array. 2. A switch.

Output devices: 1. A LCD/LED shield to display stuff. 2. A motor (rotating) connected to lock located on the other side of door (...yeah...)

So here's my idea in a shell:

when button is pressed, the infrared sensors get activated for a period of 8 seconds after it. When the sensors return data, and if our heat signature is found in only one of the 4 sensors for 1 second with 1 second time interval, then the motor rotates once to unlock door by pulling lock when locked, and rotates inversely to lock if entered while unlocked. LCD prints success/faliure and state on pressing button.


  1. The sequence in which the sensors are returned should maybe be incremental in a kind of quaternary system so that the password changes everyday?
  2. the motor is able to detect whether the room has been locked from the inside and display change of state?
  3. Maybe a bluetooth remote to remotely lock room from inside?

Any help is much appreciated. :) Cheers

Interesting idea using IR sensors as a key mechanism. It can definitely be done in my opinion.

I've been trying to figure out something similar in regards to a lock being controlled by a motor. I'm sure its possible, but I haven't thought of or found a sure way of putting it together.

Do you know how the arduino is programmed?

I don't think the programming will be that hard... I do know how to program in Java adequately and based on my skimming the getting started guides, programming won't be too hard to learn...

I have a similar project going on at the moment.

Its using a radio frquency, much like an keyless entry vehicle and keyless start kind of thing, but acting in a home lock system.

Yea the programming aspect is not too difficult at all, and since you have java experience, picking up the programming in c wont be hard at all.

I would recommend looking into the parts you want to use and post em up. Theres more advice to give once you get started

To be honest, I don't have the slightest idea of the parts I will be requiring aside from the most important components... If you want, I'll link you to the parts I plan on buying. I have selected only one site to buy from for ease... anyway;

  1. Arduino Uno
  2. 4 of either either : i. IR Proximity sensor for line sensing... or ii. IR Temperature sensor
  3. LCD 16x2
  4. Large Servo Motor
  5. Wires

I don't know what else to buy, so if you guys could help on that, I would love it.

In terms of controlling a door lock, you might like to consider an electronically controlled door strike (e.g.: 12V) - they can be powered by a 12V supply and could be controlled by a relay activated by the Arduino. You'd need to decide whether you want the lock to fail open (unlocked) or fail closed (locked) in the event of a power failure - this would of course depend on the safety factors for the door in question. If it was an exterior door, you'd want it to fail closed (locked) so that cutting the power does not grant entry to the door, however, you would need to make sure that if anyone was stuck inside, they could override the lock manually to exit the building to avoid safety issues. This would, in my opinion, be easier than trying to get a servo motor to turn a locking mechanism, and not that much more expensive either.

In terms of the button logic, there's plenty of tutorials on how to read a button - e.g.: this one from the Arduino site itself.

Likewise the LCD display.

Not sure about the IR sensor side of things - both of the ones you link above are fairly limited in range (1-3cm for the first and I suspect a similarly short range for the second).