IR (Infrared) Security Alarm System





Introduction: IR (Infrared) Security Alarm System

About: Hello, We are an electronics learning startup based out of Arizona, US. The mission of the company is to promote Technology literacy in our beautiful world. The idea is to make learning more fun, intuitive a...

In this project, you will build transmitter and receiver circuits using an IR LED and a photo-diode. The circuit is based on obstacle detection when a person or thing comes in between the transmitter and receiver. The alarm gets triggered and beeps continuously till the time the circuit is reset.

Step 1:

Step 2:

Step 3:

Step 4:

Step 5:

Step 6:

Step 7:

Step 8:

Step 9:

Step 10:

Step 11:

Step 12:

Step 13:

Step 14:

Step 15:

Step 16:

Step 17:

Step 18:

Step 19:

Step 20:

Step 21:

Step 22:

Step 23:

Step 24:

Step 25:

Step 26:

Step 27:

Step 28:

Step 29:

Step 30:

Step 31:

Step 32:

Step 33:

Step 34:

Step 35:

Step 36:

Step 37:

Step 38:

Step 39:

Step 40:


Hope you liked this project. I have an exciting news to share with you. To promote technology literacy in our beautiful world and make high quality learning material available for students, learners, makers, teachers, enthusiasts and schools, we have released a new video series- the $2 Makers Club on Vimeo. There are more than 50+ such projects there.

The mission of $2 club is to provide access to high quality learning material including DIY projects, videos, manuals and building instructions to people around the world, at a super affordable price- $2/year. So, anyone now can start learning, doing, understanding and building electronics at the convenience of their homes.

When you join the club, you get access to the professionally produced episodes- 59 of them. Check all the 59 episodes that we have produced here:

We look forward to you as one of core members of the club.

Thank you,


Gurpawan Founder/Maker at Heart $2 Makers Club

Step 41:

Step 42:

Step 43:

If you are interested in accessing free learning videos of electronic components, you can go to the following link:

Click here

Step 44:

Step 45:

Step 46:

Step 47:

Step 48:

Step 49:

Step 50:

Step 51:

Step 52:

Step 53:

Step 54:

Step 55:

Step 56:

Step 57:

Step 58:

Step 59:

Step 60:

Step 61:

Step 62:

Step 63:



    • Make it Move Contest

      Make it Move Contest
    • Woodworking Contest

      Woodworking Contest
    • Microcontroller Contest

      Microcontroller Contest

    We have a be nice policy.
    Please be positive and constructive.


    4 Questions

    I have purchased one of your DIY KITS. I have made sure all connections are perfect but yet, the buzzer in the transmitter circuit starts buzzing just as I connect the battery to the transmitter circuit.
    could you suggest me what could be done to rectify this error for the proper working of the circuit.
    Hoping for a quick reply.

    Thanks, mandlabs for your prompt reply.
    I will get back to you once I apply your suggestions to my project.
    If it doesn't work I will send the pictures of my circuit to you soon.
    Hope to stay in constant touch with your team since I have to get my circuit working within the coming Sunday evening.
    As I have to submit my project on Monday.
    Thanks Again

    2 more answers


    We were waiting for your reply. We have not got the opportunity to review your circuit. We anticipate a few potential mistakes. We are giving you a few pointers. #See pointer 5. You will need to check them all one by one:

    1. The stripped portions of wires that go inside the breadboard must be at least 1 cm in length. Check all the wires and their lengths and ensure that the tip of the stripped end touches the inside metal strip.

    2. The positive terminal of the photo-diode in the receiver circuit must be connected to ground.

    3. Check whether the negative terminal of the buzzer and the green wire going to the NO terminal of the relay are connected in the same column.

    4. Ensure that the relay is tightly fitted onto the breadboard. Take your battery. Connect its two terminals to the supply terminals of the relay (the two opposite terminals). See the top side of the relay. There are three legs. The middle terminal is the common terminal (COM) and side terminals are the supply terminals. You should hear a click sound. Please note the battery voltage should be more than 9V in any case. Check the voltage using your multimeter (tutorial included in the video)

    5. In case your buzzer starts beeping. Here is what you need to do next:
    5.1 Bring both the circuits completely closer to each other. Ensure that both the LEDs face each other. Try to adjust the line of sight LEDs so that the buzzer gets Off. This is a trial and error method.

    5.2 Then slowly introduce any obstacle to check whether your circuit works fine. Since the distance b/w the LEDs will be quite less, you can even introduce a black paper/scale/ etc.

    5.2 Once you reach there, keep the transmitter circuit fixed and slowly move the receiver circuit keeping the line of sight intact. There comes a point when buzzer will start producing a meagre beep sound. That is the point at where you need to stop.

    5. Ensure that the transistor used is an NPN transistor (547B). This number is imprinted on the flat surface of the transistor.

    Please follow these recommendations. One more thing- don't give up too soon! One last thing, if your circuit still does not work, we will be happy to send you a free pair of powerful IR LED and photodiode.


    Thanks for reaching out to us. Lets solve your problem. Could you please send us high quality pictures of your assembled circuit from top and side angles at This is the best way to get technical support. Our engineers will review your circuit and give suggestions. We are eagerly waiting for your reply. Regards, support team, Mand Labs

    Why to use npn transistor?

    why is a battery not connected to a circiut?

    what is breadboard


    Can anyone tell me which type of relay used here.

    2 replies

    It is a 9V SPDT relay

    Hi pankajp, this is an SPDT relay -12 V

    Dear Ajith,

    You can modify the project to your needs. If you can replace the normal IR LED and photo-diode with more powerful IR LED and receiver, you will have a no-zone line of sight that can be installed in places where no movement is a requirement.

    Thank you so much ! Yes, the circuit instructions were built with the intention that beginners could build it. We are a kit manufacturers/maker company. We are glad to get your response.

    We are not sure why you said "batteries not connected to a circuit"? W/o the batteries, the circuit won't work. We use a 9V supply to power both the transmitter and receiver circuits.

    You can use either an NPN or a PNP. Using NPNs are more convenient for switching purpose. Hope this helps.

    Hi DanieL291,

    thanks for the comment. We are not sure from where you could get a photodiode? you might wanna check out adafruit or spark fun in US. Happy to answer any more queries, if you have any. BTW, we are soon coming up with our Indiegogo campaign:

    let us keep talking,

    What switch are you using?

    will u plz send this video to my mail id

    1 reply

    dear yhip'sanz :we do not have a video. You can download the step by step guide. thanks

    The title of this instructable should not contain the word "security". Detecting and defeating this system is very easy for a minimally serious attacker.

    Security would be achieved if a microcontroller was installed in the transmitter and receiver circuits. The microcontrollers should be synchronized to both run the same pseudo-random number generator algorithm, generating a few numbers per second. When the number generated is above a certain threshold, the transmitter should light up, and the receiver should expect to receive; if that doesn't happen, the alarm should be triggered. When the number generated is below the threshold, the transmitter should not light up, and the receiver should expect to not receive; if that happens, then the alarm should be triggered. Emission/reception or lack thereof should last until a new random number is generated.

    That is a basic idea; some other issues would need to be addressed, for example: Seeding of the random number generator, choosing an appropriate threshold, initial synchronization, corrections and resynchronization to minimize the impact of clock drift in long duty cycles, adjusting for the delay/switching time of the photodiode, and probably more.

    1 reply

    Dear Vandalf,

    Thanks for your awesome inputs and ideas. We just designed this project to help people learn 'how an IR and photodiode works'. It is a project, not a product. The idea here was to help people learn not design a perfect system to catch attackers. We really welcome your ideas to work on a micro-controller based project. Why don't you implement your idea and make it happen? We can really make a good project instruction (we engage professional photographers to click each step). BTW, this project is a part of the DIY Makers Learning Kit that we are soon launching on Indiegogo: Thank you

    Thanks for the detailed Instructable including all of the theory and explanation of how/why the circuit operates.

    I do have one random question...

    I realize the answer to this depends on several internal and external variables but overall, if any possible response-time limiting factors were made ideal: Is this circuit's response time fast enough to trigger when an object moving at very high speeds (say, a bullet fired from a rifle) passes through the transmitting line of sight/light? Do you happen to definitively know, or maybe even have some math to calculate/predict response-time limitations, perhaps how long (micro-seconds/nano-seconds) the path of light must be blocked to allow the rise/fall/mechanisms of action to occur?

    Again, thank you for the Instructable and thank you in advance for any additional info/thoughts relating to response time you may be able to provide.

    1 reply

    Dear DrummRBoy,

    It is a very good question. Honestly, we didn't think that far with this project. I think this would next level for this project. It will definitely involve some mathematical analysis. We really welcome the opportunity for any maker to work on this. This project is actually a part of our DIY Makers Kit that we are soon launching on Indiegogo. Here is the link:

    Looking forward,