There aren’t a lot of examples out there for using Sparkfun’s SEN-08630 PIR Motion Sensor. PIR stands for Passive Infra Red. The device comes with a 3 wire harness and is simple to use, albeit not entirely reliable. 
On a breadboard, connect the red and brown wires to V+ and V- on the Arduino. Place a 20k resistor between the signal wire (black) and V+. The Sensor uses open collector, so a pull up resistor is required. Connect the junction of the black alarm wire and resistor to Analog pin 0 on the Arduino. That’s it, it’s wired.
The Sensor requires a 3 -4 second reset/calibration period and if you don’t include it, once the alarm is triggered it will stay triggered until its power is removed.
Here is the Arduino sketch that I used with my circuit. While it isn’t immediate to react, it will and then settle down for the next reading.
// arduino sketch to control and process a PIR sensor.
//In this case it simply lights an LED to show triggering.
int alarmPin = 0; // asign pins – alarm
int ledPin = 13; // and led pinvoid setup () {
Serial.begin (9600); // setup serialpinMode(ledPin, OUTPUT); // Set LED pin as an Output
pinMode(alarmPin, INPUT); // Set Alarm pin and an Input
}void loop (){
int alarmValue = 0; // zero the alarmPin
Serial.print(“IR = “); // print the header
alarmValue = analogRead(alarmPin); // read the sensor
Serial.println(alarmValue); // print the value
if (alarmValue < 100){ // check value output
digitalWrite(ledPin,HIGH); // yes? light up LED
delay(1000); // glow for a second
digitalWrite(ledPin,LOW); // shut off LED
}
delay(4000); // allow PIR to reset to environment
} // loop back for next reading
This is a simple circuit, actually. But I was only able to locate a single incidence on the web –and it was wrong. Without the 4 second breather to allow the PIR to reset, their example once triggered would stay that way. My modification gives opportunity for a reset so the next reading would be accurate.
It is recommended that at least a pair of these sensors be used, in fact 3 provide the best results. All two or three may be connected to the same Arduino Analog input pin. Checking or agreement of the sensors will produce fairly accurate results.
Personally, I prefer using the Shape series of IR sensors.