Wish List 0

Human Body Infrared Sensor Pir Module D203S Sensor Pyroelectric Sensor Switch Black Lens

Rs. 148.00 Rs. 169.00

-Model BLACK
-Power supply DC5V
-Size Ф11.8MM
-Focal length 5MM
-Thickness 0.6MM
-Material science HDPE
-Reaction angle 120 degrees
-Response distance 5
SPECIFICATIONS:
Encapsulation Type      TO-5
IR Receiving Electrode  2×1mm, 2 elements
Window Size             3×4mm
Spectral Response       5—14μm
Transmittance           ≥75%
Output Signal[Vp-p]     ≥3500mV
Sensitivity             ≥3300V/W
Detectivity (D*)        ≥1.4 ×108 cmHz1/2/W
Noise[Vp-p]             <70mV
Output Balance          <10%
Offset Voltage          0.3~1.2V
Supply Voltage          3—15V DC
Operating Temperature   -30—70ºC
Shipment Weight         0.01 kg
Shipment Dimensions     5 × 3 × 1 cm

OVERVIEW:

-Low consumption

-Custom design is available

-Higher in cost-performance

-Field of View: XX: 138º & YY: 125º

PACKAGE INCLUDES:

1 PCS x Human Body Infrared Sensor Pir Module D203S Sensor Pyroelectric Sensor Switch Black Lens


//SOURCE CODE TAKEN FORM LINK

//https://github.com/zerblatt007/PIRMotionDetector/blob/master/MotionSensor2.ino

* Teensy Analog Input Motion detector using PIR SD203S and LM358

   After uploading this to your board, use Serial Monitor

   to view the message.  When Serial is selected from the

   Tools > USB Type menu, the correct serial port must be

   selected from the Tools > Serial Port AFTER Teensy is

   running this code.  Teensy only becomes a serial device

   while this code is running!  For non-Serial types,

   the Serial port is emulated, so no port needs to be

   selected.

   Roger Storvik 2012

   This code is in the public domain.

*/


#define onTime 10;       // Number of cycles to count down to switch off

const byte motionDelta = 30;  // Sensitivity 

const int readDelay = 1000;

unsigned int val, lastVal, diff;

byte latch = 0;


// Start a new countdown if more motion or continue if not

void countDown(boolean motion) {

  if (motion) {

    latch = onTime;

    Serial.println("Motion! Starting countdown..");

  }

  else if (latch > 0) {

    latch--;

    Serial.print(latch);

    Serial.println(" more to deactivate");

  }

  

  if (latch <= 0) {

    digitalWrite(PIN_D6, LOW);

  }

  else {

    digitalWrite(PIN_D6, HIGH);

  }

}


void setup() {                

  Serial.begin(38400);

  pinMode(PIN_D6, OUTPUT);

  digitalWrite(PIN_D6, LOW);

}


void loop() {

  lastVal = val;        // Store the previous value

  val = analogRead(0);  // Read analog value

  

  // We do not want negative results

  if (val > lastVal) {

    diff = val - lastVal;

  } 

  else {

    diff = lastVal - val;

  }

  

  // Debug printout

  Serial.print("val, lastVal, diff: ");

  Serial.print(val);

  Serial.print(" - ");

  Serial.print(lastVal);

  Serial.print(" - ");

  Serial.println(diff);


  // Start a new countdown if more motion or timeout if not

  if (diff > motionDelta) { 

    countDown(true);

  }

  else {

    countDown(false);

  }

  

  // Delay between actions 

  delay(readDelay);

}


© 2021 GitHub, Inc.

15 days

Write a review

Please login or register to review