Infrared Human Body Motion Sensor(HC-SR501) JP: 두 판 사이의 차이

아두위키 : Arduwiki
(새 문서: {{#seo:|title=ArduWiki: Arduino Infrared Human Detection Motion Sensor (HC-SR501) Guide|title_mode=append|keywords=Arduino, Information Science, Maker Learning, Performance Evaluation, Infrared Human Detection Motion Sensor (HC-SR501), Arduino Projects, Capstone Projects, Arduino Example Code|description=Introduces how to control the Infrared Human Detection Motion Sensor (HC-SR501) with Arduino (basic information, circuit, example code). Can be used in Information Science and M...)
 
잔글편집 요약 없음
 
1번째 줄: 1번째 줄:
{{#seo:|title=ArduWiki: Arduino Infrared Human Detection Motion Sensor (HC-SR501) Guide|title_mode=append|keywords=Arduino, Information Science, Maker Learning, Performance Evaluation, Infrared Human Detection Motion Sensor (HC-SR501), Arduino Projects, Capstone Projects, Arduino Example Code|description=Introduces how to control the Infrared Human Detection Motion Sensor (HC-SR501) with Arduino (basic information, circuit, example code). Can be used in Information Science and Maker classes.}}
{{#seo:|title=アルドゥウィキ:アルドゥイーノ赤外線人体検知モーションセンサー(HC-SR501)ガイド|title_mode=append|keywords=アルドゥイーノ, 情報科学, メーカー学習, パフォーマンス評価, 赤外線人体検知モーションセンサー(HC-SR501), アルドゥイーノプロジェクト, キャップストーンプロジェクト, アルドゥイーノサンプルコード|description=アルドゥイーノで赤外線人体検知モーションセンサー(HC-SR501)を制御する方法(基本情報、回路、サンプルコード)を紹介します。情報科学とメーカー授業で活用できます。}}[[파일:모션감지대표이미지.jpg|가운데|class=coders100]]
[[File:모션감지대표이미지.jpg|center|class=coders100]]
Infrared PIR Sensor, a Passive Infrared Sensor.


It detects objects within its range that emit infrared radiation.
赤外線PIRセンサー、受動赤外線センサーです。


It can detect the faint infrared radiation emitted by humans, and allows for adjustments in detection distance and delay time.
センサー範囲内の赤外線を発する物体を検知します。


== '''Specifications''' ==
人間が放出する微弱な赤外線を検知し、検知距離、遅延時間を調整できます。


* Operating Voltage: 4.5V ~ 20V
* Quiescent Current: 50uA
* Detection Angle: 110 degrees
* Delay Time: 3 seconds ~ 300 seconds
* Detection Distance: 3m ~ 7m


== '''Required Hardware''' ==
== '''仕様''' ==
* 動作電圧:4.5V 〜 20V
* 待機電流:50uA
* 動作角度:110度
* 遅延時間:3秒 〜 300秒
* 検知距離:3m 〜 7m


* Infrared Human Body Motion Sensor
 
== '''必要なハードウェア''' ==
* 赤外線人体検知モーションセンサー
* Arduino
* Arduino


== '''Connection''' ==
The following is the circuit used in the example code.


If using the Infrared Human Body Motion Sensor by itself, an LED is not necessary.
== '''接続''' ==
以下の例示コードで使用した回路です。


Instead of an LED, other modules can be applied and utilized.
赤外線人体検知モーションセンサーを単独で使用する場合、LEDは不要です。
 
LED の代わりに他のモジュールを応用して活用可能です。
{| class="wikitable"
{| class="wikitable"
| colspan="2" rowspan="1" |Human Detection Sensor
| colspan="2" rowspan="1" |Human Detection Sensor
59번째 줄: 60번째 줄:
[[File:모션감지 회로.png|center|class=coders100]]
[[File:모션감지 회로.png|center|class=coders100]]


== '''Example Code''' ==
== '''サンプルコード''' ==
This is an example that uses the Infrared Human Body Motion Sensor to light up an LED.<syntaxhighlight lang="c++" line="1">
赤外線人体検知モーションセンサーを活用してLEDを点灯させる例です。<syntaxhighlight lang="c++" line="1">
#define PIR 7    //Define motion sensor pin
#define PIR 7    //モーションセンサーのピン指定
#define LED 8    //Define LED pin for verification
#define LED 8    //Define LED pin for verification
int state = 0;    //Variable for storing state
int state = 0;    //Variable for storing state
71번째 줄: 72번째 줄:
}
}


void loop(){      //Code to light up the LED when motion is detected
void loop(){      //モーション検知時にLEDが点灯するコード
//  state = digitalRead(PIR);
//  state = digitalRead(PIR);
   if(digitalRead(PIR))
   if(digitalRead(PIR))
83번째 줄: 84번째 줄:
</syntaxhighlight>
</syntaxhighlight>


=== Execution Result ===
 
=== 実行結果 ===
[[File:모션감지 테스트.png|center|class=coders100]]
[[File:모션감지 테스트.png|center|class=coders100]]

2025년 3월 21일 (금) 15:20 기준 최신판

赤外線PIRセンサー、受動赤外線センサーです。

センサー範囲内の赤外線を発する物体を検知します。

人間が放出する微弱な赤外線を検知し、検知距離、遅延時間を調整できます。


仕様

  • 動作電圧:4.5V 〜 20V
  • 待機電流:50uA
  • 動作角度:110度
  • 遅延時間:3秒 〜 300秒
  • 検知距離:3m 〜 7m


必要なハードウェア

  • 赤外線人体検知モーションセンサー
  • Arduino


接続

以下の例示コードで使用した回路です。

赤外線人体検知モーションセンサーを単独で使用する場合、LEDは不要です。

LED の代わりに他のモジュールを応用して活用可能です。

Human Detection Sensor Resistor LED Arduino
VCC 5V
OUT D7
GND - GND
Connection +
Connection D8

サンプルコード

赤外線人体検知モーションセンサーを活用してLEDを点灯させる例です。

#define PIR 7     //モーションセンサーのピン指定
#define LED 8     //Define LED pin for verification
int state = 0;     //Variable for storing state
void setup()
{
  pinMode(PIR, INPUT);
  pinMode(LED, OUTPUT);
  digitalWrite(LED, LOW);
}

void loop(){      //モーション検知時にLEDが点灯するコード
//  state = digitalRead(PIR);
  if(digitalRead(PIR))
  {
    digitalWrite(LED, HIGH);
    delay(1000);
  }
  digitalWrite(LED,LOW);
}


実行結果