PIR เซนเซอร์ตรวจจับความเคลื่อนไหว Motion Sensor Module
ตรวจจับความเคลื่อนไหวจากความร้อน
เมื่อมีคนเดินผ่านก็จะจับค่าความร้อนที่เปลี่ยนแปลง แล้วส่งค่าสัญญาณมีไฟ
ออกมา ในกรณีที่ไม่มีการเปลี่ยนแปลงส่งค่าไม่มีไฟ ออกมา
เราสามารถนำค่านี้ไปสั่งควบคุม Arduino ได้
สามารถปรับเวลาหน่วงเวลาในการตรวจจับครั้งต่อไปได้
ปรับระยะทางการตรวจจับได้ 3-7 เมตร มีช่องให้ต่อ LDR เพิ่ม
เพื่อให้ทำงานตรวจจับแค่ตอนกลางคืน
รายละเอียด PIR เซนเซอร์ตรวจจับความเคลื่อนไหว Motion Sensor Module
ตัวอย่างโคด Code Arduino PIR Motion Sensor Module

int ledPin= 13;
int inputPin= 3;
void setup(){
pinMode(ledPin, OUTPUT);
pinMode(inputPin, INPUT);
}
void loop(){
int value= digitalRead(inputPin);
if (value == HIGH)
{
digitalWrite(ledPin, HIGH);
delay(1000) ;
}
else
{
digitalWrite(ledPin, LOW);
}
}








รายละเอียด PIR เซนเซอร์ตรวจจับความเคลื่อนไหว Motion Sensor Module
- Dimension: 3.2cm x 2.4cm x 1.8cm (approx)
- Infrared sensor with control circuit board
- The sensitivity and holding time can be adjusted
- Working Voltage Range: DC 3V- 5V
- Current drain:<60uA
- Voltage Output: High/Low level signal:3.3V TTL output
- Detection distance: 3--7M(can be adjusted)
- Detection range: <140°
- Delay time: 5-200S(can be adjusted, default 5s +-3%)
- Blockade time: 2.5 S (default)
- Trigger: L: Non-repeatable trigger H: Repeat Trigger (default)
- Work temperature:-20-+80°C
- Trigger Method: L unrepeatable trigger / H repeatable trigger
ตัวอย่างโคด Code Arduino PIR Motion Sensor Module

int ledPin= 13;
int inputPin= 3;
void setup(){
pinMode(ledPin, OUTPUT);
pinMode(inputPin, INPUT);
}
void loop(){
int value= digitalRead(inputPin);
if (value == HIGH)
{
digitalWrite(ledPin, HIGH);
delay(1000) ;
}
else
{
digitalWrite(ledPin, LOW);
}
}











ไม่มีความคิดเห็น:
แสดงความคิดเห็น