Ks0118 keyestudio EASY plug Reed Switch Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==EASY plug Reed Switch Module ==
[[image:ks0118图.jpg|thumb|600px|right|Keyestudio EASY plug Reed Switch Module]]
<br>[[File:ks0118-1.png|500px|frameless|thumb]]<br>


==Introduction==
==Introduction==
Reed Switch is a special switch and a main component for reed relay and proximity switch. Reed switch is usually comprised of two soft magnetic material and metal reed contacts which will disconnect itself when there is no magnetic. <br>
This is a small device called a reed switch on the module. <br>
Reed switch can be used as sensor for count, limit and other purposes. For instance, a kind of bike-kilometer is constituted by sticking magnetic to the tire and mounting reed switch aside. We can mount reed switch on the door for alarming purpose or as switches.<br>
When the device is exposed to a magnetic field, the two ferrous materials inside the switch pull together and the switch closes. <br>
Note: this module needs to be used together with EASY plug control board.<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>
<span style="color: red">'''Note: ''' this sensor needs to be used together with EASY plug control board.<br>
<br>


 
==Features ==
==Specification==
* Connector: Easy plug
* Interface: Easy plug
* Working voltage: DC 3.3V-5V
* Working voltage: DC 3.3V-5V
* Working current: ≥20mA
* Working current: ≥20mA
* Working temperature: -10℃—+50℃
* Working temperature: -10℃ to+50℃
* Detection distance: ≤10mm
* Detection distance: ≤10mm
* Size: 39*20mm
<br>
* Weight: 5g
 
 


==Connection Diagram ==
==Technical Details==
<br>[[File:ks0118-2.png|500px|frameless|thumb]]<br>
* Dimensions: 39mm*20mm*18mm
* Weight: 4.6g


<br>
==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.
<br>[[File:ks0118.jpg|500px|frameless|thumb]]<br>


==Sample Code==
<br>
==Upload the Code==
Copy and paste below code to[ http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE ]and upload.
<pre>
<pre>
int Led=13;//define LED interface
int Led=13;//define LED interface
Line 35: Line 40:
void loop()
void loop()
{
{
val=digitalRead(buttonpin);// read and assign the value of digital interface 3 to val  
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
if(val==HIGH)//When a signal is detected by reed switch sensor, LED will flash
{
{
Line 46: Line 51:
}
}
</pre>
</pre>
<br>
==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.
<br>[[File:ks0118 Result.jpg|500px|frameless|thumb]]<br>


<br>
==Resources ==
==Resources ==
 
'''PDF'''<br>
'''PDF'''
 
https://drive.google.com/open?id=1UAujQHnyqXk3Ie6ypzHywBe0B1U6xuPq
https://drive.google.com/open?id=1UAujQHnyqXk3Ie6ypzHywBe0B1U6xuPq


<br>
==Buy from ==
==Buy from ==
'''Official Website'''
'''Official Website'''<br>
http://www.keyestudio.com/keyestudio-easy-plug-reed-switch-module-for-arduino-starter.html


http://www.keyestudio.com/keyestudio-easy-plug-reed-switch-module-for-arduino-starter.html


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

Revision as of 10:37, 16 November 2018

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.
Note: this sensor needs to be used together with EASY plug control board.

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 to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb


Upload the Code

Copy and paste below code to[ http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE ]and upload.

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);
}
}


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.
thumb


Resources

PDF
https://drive.google.com/open?id=1UAujQHnyqXk3Ie6ypzHywBe0B1U6xuPq


Buy from

Official Website
http://www.keyestudio.com/keyestudio-easy-plug-reed-switch-module-for-arduino-starter.html