You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB
Markdown

5 years ago
# PIR Sensor (Interface to ESP8266)
* Schematic
5 years ago
+ ![](./Pirschematic.png)
5 years ago
+ ![](./pir-pcb-800x564.jpg)
* [Reference](https://www.tweaking4all.com/hardware/pir-sensor/)
+ Initial Warm Up : 30 to 60 seconds to stabilize
+ Delay Time : (2s - 200s) Determines how long the PIR will keep the Output “High” (ON) after detecting motion.
+ Sensitivity : Set the sensing “range”. 3 - 6 meter
+ Retrigger Jumper
- L : non-retriggering. Output ON and OFF upon detection
- H (Default) : retriggering. Output remains ON upon detection
5 years ago
* [Datasheet](./BISS0001-SilvanChip.pdf)
5 years ago
* [ESP8266](./esp8266.md)
+ GPIO12 : PIR Out
+ VCC : 3.3 / 5V
+ GND : GND
* Sample Arduino Code
```arduino
int inPin = 12;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(inPin, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int val = digitalRead(inPin);
Serial.print("*Detected = "); Serial.println(val);
Sleep(500);
}
```