Ks0118 keyestudio EASY plug Reed Switch Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 6: Line 6:
When the magnetic field is removed, the reeds separate and the switch opens. This makes for a great non-contact switch. <br>
When the magnetic field is removed, the reeds separate and the switch opens. This makes for a great non-contact switch. <br>
You can mount reed switch on the door for alarming purpose or as switches.<br>
You can mount reed switch on the door for alarming purpose or as switches.<br>
<span style="color: red">'''Note: ''' this sensor needs to be used together with EASY plug control board.<br>
This sensor needs to be used together with EASY plug control board.<br>
 
 
<span style=color:red> '''Special Note:''' <br>
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface. <br> If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module. </span><br>
 
<br>
<br>


Line 23: Line 28:
<br>
<br>
==Connect It Up ==
==Connect It Up ==
Connect the EASY Plug reed switch module to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
Connect the EASY Plug Reed switch module and LED module to control board using RJ11 cables. Then connect the control board to your PC with a USB cable.
<br>[[File:ks0118.jpg|500px|frameless|thumb]]<br>
<br>[[File:干簧管灯.jpg|600px|frameless|thumb]]<br>


<br>
<br>
==Upload the Code==
==Upload the 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:ks0397 8.png|600px|frameless|thumb]]<br>
int Led=13;//define LED interface
 
int buttonpin=8; //define reed switch sensor interface
int val;//define digital variable val
void setup()
{
pinMode(Led,OUTPUT);//define LED as output interface
pinMode(buttonpin,INPUT);//define reed switch sensor as output interface
}
void loop()
{
val=digitalRead(buttonpin);// read and assign the value of digital interface 3 to val if(val==HIGH)//When a signal is detected by reed switch sensor, LED will flash
if(val==HIGH)//When a signal is detected by reed switch sensor, LED will flash
{
digitalWrite(Led,HIGH);
}
else
{
digitalWrite(Led,LOW);
}
}
</pre>
<br>
<br>
==What You Should See==
==What You Should See==
If you put some magnetic beads around the reed module, once the reed module detects the magnetic field, LED will turn on.
If you put a magnetic bead close to the reed module, once the reed module detects the magnetic field, LED will turn on.
<br>[[File:ks0118 Result.jpg|500px|frameless|thumb]]<br>
<br>[[File:ks0397 8-1.png|600px|frameless|thumb]]<br>
<br>[[File:ks0397 8-2.png|600px|frameless|thumb]]<br>


<br>
<br>
<br>
==Resources ==
==Resources ==
'''Download the PDF:'''<br>
 
https://drive.google.com/open?id=1UAujQHnyqXk3Ie6ypzHywBe0B1U6xuPq
https://fs.keyestudio.com/KS0118


<br>
<br>


==Buy from ==
==Buy from ==
*'''Official Website:''' http://www.keyestudio.com/ks0118.html
*[https://www.keyestudio.com/new-keyestudio-rj11-easy-plug-reed-switch-module-for-arduino-starter-steam-p0073-p0073.html '''Official Website''' ]


*[https://www.aliexpress.com/store/product/New-Keyestudio-EASY-plug-Reed-Switch-Module-for-Arduino-Starter/1452162_32641713194.html?spm=2114.12010612.8148356.61.5169484ed3ISvq  Shop on aliexpress ]
*[https://www.aliexpress.com/store/product/New-Keyestudio-EASY-plug-Reed-Switch-Module-for-Arduino-Starter/1452162_32641713194.html?spm=2114.12010612.8148356.61.5169484ed3ISvq  Shop on aliexpress ]

Latest revision as of 16:19, 7 January 2021

Keyestudio EASY plug Reed Switch Module

Introduction

This is a small device called a reed switch on the module.
When the device is exposed to a magnetic field, the two ferrous materials inside the switch pull together and the switch closes.
When the magnetic field is removed, the reeds separate and the switch opens. This makes for a great non-contact switch.
You can mount reed switch on the door for alarming purpose or as switches.
This sensor needs to be used together with EASY plug control board.


Special Note:
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface.
If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module.


Features

  • Connector: Easy plug
  • Working voltage: DC 3.3V-5V
  • Working current: ≥20mA
  • Working temperature: -10℃ to+50℃
  • Detection distance: ≤10mm


Technical Details

  • Dimensions: 39mm*20mm*18mm
  • Weight: 4.6g


Connect It Up

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


Upload the Code

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

thumb


What You Should See

If you put a magnetic bead close to the reed module, once the reed module detects the magnetic field, LED will turn on.
thumb

thumb



Resources

https://fs.keyestudio.com/KS0118


Buy from