Ks0122 keyestudio EASY plug PIR Motion Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
(8 intermediate revisions by the same user not shown)
Line 27: Line 27:
* Dimensions: 38mm*20mm*18mm
* Dimensions: 38mm*20mm*18mm
* Weight: 5.6g
* Weight: 5.6g
<br>
<br>
==Connect It Up==
==Connect It Up==
Connect the EASY Plug PIR Motion sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
Connect the EASY Plug PIR Motion sensor and LED module to control board using RJ11 cables. Then connect the control board to your PC with a USB cable.
<br>[[File:ks0122.jpg|500px|frameless|thumb]]<br>
<br>[[File:人体灯.jpg|500px|frameless|thumb]]<br>


<br>
<br>
==Upload the Code==
==Test Code==
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload.  
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<pre>
<br>[[File:ks0398 13.1.png|500px|frameless|thumb]]<br>
byte sensorPin = 6;
byte indicator = 13;
void setup()
{
pinMode(sensorPin,INPUT);
pinMode(indicator,OUTPUT);
Serial.begin(9600);
}
void loop()
{
byte state = digitalRead(sensorPin);
digitalWrite(indicator,state);
if(state == 1)Serial.println("Somebody is in this area!");
else if(state == 0)Serial.println("No one!");
delay(500);
}
</pre>


<br>
<br>
==What You Should See==
==What You Should See==
Done uploading the code, open the serial monitor and set the baud rate to 9600. If the sensor detects someone moving nearby, you should see the "Somebody is in this area!" is displayed on the monitor. Otherwise, it will display "No one!".
After uploading the code, slide the potentiometer, the servo motor will rotate to a certain angle.
<br>[[File:ks0122 Result.gif|500px|frameless|thumb]]<br>
<br>[[File:ks0398 13-1.png|500px|frameless|thumb]]<br>
<br>
Done uploading the code, if the sensor detects someone moving nearby, you should see the LED is turned on.
<br>[[File:ks0398 13-3.png|500px|frameless|thumb]]<br>
Open the serial monitor and set the baud rate to 9600, it will print out the data.
<br>[[File:ks0398 13-2.png|500px|frameless|thumb]]<br>
<br>
 
<br>
==Controlling Fan Motor==
'''Hookup Guide'''<br>
<br>[[File:人体电机灯.jpg|500px|frameless|thumb]]<br>
 
<br>
'''Test Code'''<br>
<br>[[File:ks0398 13.2.png|500px|frameless|thumb]]<br>


<br>
<br>
'''What You Should See'''<br>
If the sensor detects someone moving nearby, you should see the LED is turned on, and the fan motor is rotating. Otherwise, LED is turned off and motor stops rotating.
<br>[[File:ks0398 13-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 13-5.png|500px|frameless|thumb]]<br>
<br>
<br>
==Resources ==
==Resources ==
'''PDF'''
'''Download the Arduino information:'''<br>
https://drive.google.com/open?id=1_EXnBPMfjKHLdmLGqJJjqX_041nNH912
https://drive.google.com/open?id=1HoUeqZLyOxS6nmIxfN09AtgajnjPSE5L
 
'''Download the Mixly Code and Datasheet:'''<br>
https://drive.google.com/open?id=1FBzF4Ozko22xGxCgdsu2rQ_9E56_w6_b


<br>
<br>
==Buy from ==
==Buy from ==
'''Official Website'''<br>
*[https://www.keyestudio.com/keyestudio-rj11-easy-plug-pir-motion-sensor-module-for-arduino-steam-p0087-p0087.html  '''Official Website''']
http://www.keyestudio.com/keyestudio-easy-plug-pir-motion-sensor-module-for-arduino.html
 
*[https://www.aliexpress.com/store/product/2016-New-Keyestudio-EASY-plug-PIR-Motion-Sensor-Module-for-Arduino/1452162_32639615024.html?spm=2114.12010612.8148356.23.360d4267C9zQMH    Shop on aliexpress ]




[[category:EASY Plug]]
[[category:EASY Plug]]

Revision as of 11:18, 7 May 2019

EASY plug Flame Sensor Module

Introduction

PIR stands for Pyroelectric Infrared (many times, they are also referred as Passive Infrared sensors). This is because their principle of operation is based on the detection of infrared energy emitted by a moving body.
The PIR sensor can detect infrared signals from a moving person or moving animal, outputting switching signals.

One important thing to mention is that when motion is detected, the output will stay high for 2.3 to 3 seconds after the motion stops.
Regarding the power supply, it can work with voltages of both 3.3V and 5V. The device has a detection range of 7 meters and a detection angle of 100º.
Note: this module should be used together with EASY plug control board.


Specification

  • Connector: Easy plug
  • Input Voltage: 3.3 ~ 5V, Maximum 6V
  • Working Current: 15uA
  • Working Temperature: -20 ~ 85℃
  • Output Voltage: High 3V, Low 0V
  • Output Delay Time (High Level): about 2.3 to 3 Seconds
  • Detection angle: 100°
  • Detection distance: 7 meters
  • Output Indicator LED (When output HIGH, it will be ON)
  • Pin limit current: 100mA


Technical Details

  • Dimensions: 38mm*20mm*18mm
  • Weight: 5.6g


Connect It Up

Connect the EASY Plug PIR Motion sensor and LED module to control board using RJ11 cables. Then connect the control board to your PC with a USB cable.
thumb


Test Code

Below is an example code. Open or drag below code to Mixly Blocks and upload.

thumb


What You Should See

After uploading the code, slide the potentiometer, the servo motor will rotate to a certain angle.
thumb

Done uploading the code, if the sensor detects someone moving nearby, you should see the LED is turned on.
thumb
Open the serial monitor and set the baud rate to 9600, it will print out the data.
thumb


Controlling Fan Motor

Hookup Guide

thumb


Test Code

thumb


What You Should See
If the sensor detects someone moving nearby, you should see the LED is turned on, and the fan motor is rotating. Otherwise, LED is turned off and motor stops rotating.
thumb

thumb



Resources

Download the Arduino information:
https://drive.google.com/open?id=1HoUeqZLyOxS6nmIxfN09AtgajnjPSE5L

Download the Mixly Code and Datasheet:
https://drive.google.com/open?id=1FBzF4Ozko22xGxCgdsu2rQ_9E56_w6_b


Buy from