PIR KEEPS BLINKING AND WON'T STOP!

HEEELLLPPP!

I am using a PIR Module. However, the output (LED 13) will NOT STOP BLINKING. It just BLINKS AND BLINKS, without any regard for ACTUAL MOTION! ITS DRIVING ME INSANE! I have tried multible PIR’S and NONE work!

Here is Wiring:

PIR VCC> Arduino 3.3V
PIR GND> Arduino GND
PIR Signal Wire> Arduino Digital Pin 3

Here is my code I am running

/* 
 * //////////////////////////////////////////////////
 * //making sense of the Parallax PIR sensor's output
 * //////////////////////////////////////////////////
 *
 * Switches a LED according to the state of the sensors output pin.
 * Determines the beginning and end of continuous motion sequences.
 *
 * @author: Kristian Gohlke / krigoo (_) gmail (_) com / http://krx.at
 * @date:   3. September 2006 
 *
 * kr1 (cleft) 2006 
 * released under a creative commons "Attribution-NonCommercial-ShareAlike 2.0" license
 * http://creativecommons.org/licenses/by-nc-sa/2.0/de/
 *
 *
 * The Parallax PIR Sensor is an easy to use digital infrared motion sensor module. 
 * (http://www.parallax.com/detail.asp?product_id=555-28027)
 *
 * The sensor's output pin goes to HIGH if motion is present.
 * However, even if motion is present it goes to LOW from time to time, 
 * which might give the impression no motion is present. 
 * This program deals with this issue by ignoring LOW-phases shorter than a given time, 
 * assuming continuous motion is present during these phases.
 *  
 */

/////////////////////////////
//VARS
//the time we give the sensor to calibrate (10-60 secs according to the datasheet)
int calibrationTime = 30;        

//the time when the sensor outputs a low impulse
long unsigned int lowIn;         

//the amount of milliseconds the sensor has to be low 
//before we assume all motion has stopped
long unsigned int pause = 5000;  

boolean lockLow = true;
boolean takeLowTime;  

int pirPin = 3;    //the digital pin connected to the PIR sensor's output
int ledPin = 13;


/////////////////////////////
//SETUP
void setup(){
  Serial.begin(9600);
  pinMode(pirPin, INPUT);
  pinMode(ledPin, OUTPUT);
  digitalWrite(pirPin, LOW);

  //give the sensor some time to calibrate
  Serial.print("calibrating sensor ");
    for(int i = 0; i < calibrationTime; i++){
      Serial.print(".");
      delay(1000);
      }
    Serial.println(" done");
    Serial.println("SENSOR ACTIVE");
    delay(50);
  }

////////////////////////////
//LOOP
void loop(){

     if(digitalRead(pirPin) == HIGH){
       digitalWrite(ledPin, HIGH);   //the led visualizes the sensors output pin state
       if(lockLow){  
         //makes sure we wait for a transition to LOW before any further output is made:
         lockLow = false;            
         Serial.println("---");
         Serial.print("motion detected at ");
         Serial.print(millis()/1000);
         Serial.println(" sec"); 
         delay(50);
         }         
         takeLowTime = true;
       }

     if(digitalRead(pirPin) == LOW){       
       digitalWrite(ledPin, LOW);  //the led visualizes the sensors output pin state

       if(takeLowTime){
        lowIn = millis();          //save the time of the transition from high to LOW
        takeLowTime = false;       //make sure this is only done at the start of a LOW phase
        }
       //if the sensor is low for more than the given pause, 
       //we assume that no more motion is going to happen
       if(!lockLow && millis() - lowIn > pause){  
           //makes sure this block of code is only executed again after 
           //a new motion sequence has been detected
           lockLow = true;                        
           Serial.print("motion ended at ");      //output
           Serial.print((millis() - pause)/1000);
           Serial.println(" sec");
           delay(50);
           }
       }
  }

Please HELP ME! :o

Is it your code?

aarg: Is it your code?

'I don't KNOW! WHAT COULD POSSIBLY BE WRONG??? Should the PIR be on 5V rather than 3.3V?

What does the PIR spec say? You didn’t write that code, right? What happens when you write a simple test sketch that just echos the state of the PIR pin to a LED?

aarg:
What does the PIR spec say?

Where can I find a spec?

Wait, I found this on the Amazon shopping page

Condition:100% brand new with good quality
Product Type: HC–SR501 Body Sensor Module
Operating voltage range: DC 4.5-20V
Quiescent Current: <50uA Trigger: L can not be repeated trigger/H can be repeated trigger(Default repeated trigger)
Delay time: 5-200S(adjustable) the range is (0.xx second to tens of second)
Block time: 2.5S(default)Can be made a range(0.xx to tens of seconds
Board Dimensions: 32mm*24mm
Angle Sensor: <100 ° cone angle Lens size sensor:Diameter:23mm(Default)
Applications:
*Security Products
*the human body sensors toys
*the human body sensor lighting industrial automation and control, etc
Use:It can automatically and quickly open various types of incandescent, fluorescent lamps, buzzer, automatic doors, electric fans,automatic washing machine and dryer Machines and other devices,is a hightech products. Especially suitable for enterprises, hotels, shopping malls, warehouses and family aisles, corridors and other sensitive Sense of region, or for the security zone automatic lighting, lighting and alarm systems
Shipping from China 10-16 business days

WesleyRTech: Where can I find a spec?

Wait, I found this on the Amazon shopping page

Condition:100% brand new with good quality Product Type: HC--SR501 Body Sensor Module Operating voltage range: DC 4.5-20V

Is that the same page you ordered it from, or just one you randomly found? By the way, note the operating voltage spec.

aarg: Is that the same page you ordered it from, or just one you randomly found? By the way, note the operating voltage spec.

Yes, that is the one! I see. So, use 5V!

WesleyRTech: Yes, that is the one! I see. So, use 5V!

Use 5V... Right?

WesleyRTech: Use 5V... Right?

Well, 5 seems to be between 4.5 and 20, as far as I can see...

aarg: Well, 5 seems to be between 4.5 and 20, as far as I can see...

Yup! I'll try it out ASAP!

Got it working! Thanks! Hey do you know how to decrease delay on a PIR?

Delay time: 5-200S(adjustable) the range is (0.xx second to tens of second)

isn't there a potentiometer on the board? I don't know because you didn't provide a link.

aarg:
isn’t there a potentiometer on the board? I don’t know because you didn’t provide a link.

Yup… Got It. Thanks.