Using a Scrap Ordinary House Alarm PIR With Arduino




Introduction: Using a Scrap Ordinary House Alarm PIR With Arduino

If you are like me and don't like to throw away junk electronic items, you may have an old PIR sensor from an ordinary house alarm at the bottom of your junk box.

You can easily hook it up to your arduino to detect movement by simply making use of the LED on the PIR which turns on when movement was detected.

They usually run with a 12v power source.

Check the next step to see how its connected..

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Connecting the PIR to Your Arduino.

In my case I'm making use of 2 different power sources.

The Arduino is connected to my PC via USB (Not Shown in the Picture) and the PIR is connected to a 12V Power source.

This means that both the Arduino and PIR's GND needs to be joined, otherwise the Arduino will not detect an input from the PIR. (Joining the GND allows the little amount of voltage from the PIR to run via the input pin to GND)

But to simply it , Its better to use the same power source which will be less confusing.

I'm basically powering both the arduino and PIR and then simply connect the LED on the PIR, with a wire which I have soldered to the back of the PIR sensor, the LED then connects to PIN 8 on the arduino (Be sure to put a resistor in between the PIR's LED and the Arduino's Digital Pin 8)

Step 2: Creating the Code.

The Arduino code is simple and easy to understand.

int PIRInput = 8;
int ledPin = 13;
int PIRState; void setup()
pinMode(ledPin, OUTPUT);
pinMode(PIRInput, INPUT);
void loop()
PIRState = digitalRead(PIRInput);
if (PIRState==HIGH)
digitalWrite(ledPin, LOW);
digitalWrite(ledPin, HIGH);

How it works.

Once the PIR detect's movement, it will turn on its own on board LED which has enough power for the Arduino's digital read feature to detect voltage.

Once the Arduino has detected an incomming signal it simply turns on its own internal built in LED on pin 13.

Off-coarse now you can change the code to do what ever you want it to do.

Step 3: Watch the Video for Better Clarity.

Watch a demonstration of this video.

Hope you enjoyed my instructable.

Step 4:

Coded Creations

Participated in the
Coded Creations

Be the First to Share


    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest
    • Fix It Contest

      Fix It Contest

    2 Discussions


    3 years ago

    hello, greetings from Chile.

    my question it`s about how many ohm`s the resistor must have?


    4 years ago

    I buy up cheap wireless PIRs when systems go obsolete, & they run off ~3V dc, so you could try those instead. Should make your life simpler.