How to Use Infrared Motion Sensor Module

Photo of an infrared motion sensor module

A sensor that uses infrared to detect whether people or objects are moving. It can also be used as a switch to trigger sounds when someone passes by.

About the Component

Using a sensor capable of receiving infrared at the part marked with a red circle in the photo, it outputs whether there is an obstacle in front of the sensor as a digital signal: High(true) / Low(false).

Photo explaining the sensor position of the infrared motion sensor module

※ The detection distance may be affected, so please use the sensor parallel to the ground when using it.

※ The optimal detection distance is at 25°C, and the detection distance decreases when the temperature exceeds 30°C.

※ Connect the SPACEBLOCK microcontroller board and the infrared motion sensor module, then wait 5-10 seconds before starting the project. If you move immediately after connecting, the detection may not be accurate for the first 5-10 seconds.

Specifications

Voltage電圧3~5V
Output SignalDigital出力信号デジタル
Detection Distance検出距離3~4m
Detection Angle検出角度100°
Temperature Range温度範囲-20~85℃
Sizeサイズ 34 x 20 (mm)

Connection

Connect the infrared motion sensor module to the SPACEBLOCK microcontroller board using jumper wires (male-female) as follows:

  • Connect the S pin of the infrared motion sensor to a digital compatible pin on the SPACEBLOCK
  • Connect the G pin of the infrared motion sensor to the GND pin of the SPACEBLOCK
  • Connect the V pin of the infrared motion sensor to the 5V or 3.3V pin of the SPACEBLOCK
Connection method between SPACEBLOCK microcontroller board and infrared motion sensor module

※ The image shows the signal line connected to pin A0. Digital compatible pins include A0 to A10, A13, A15, B0 to B15, and C14 to C1.

※ 5V, 3.3V, and GND can also be inserted into pins with the same markings on the SPACEBLOCK microcontroller board.

Usage

When something nearby moves, it returns High(true) for about 2 seconds after detection. If there is no movement, it returns Low(false). You can retrieve values from the infrared motion sensor module using the block in the 'Input' category of your project.


For detailed usage of the block, click here.

Digital Reading2