Ks0038 keyestudio Reed Switch Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
Line 57: Line 57:
==Buy from ==
==Buy from ==
'''Official Website'''
'''Official Website'''
http://www.keyestudio.com/keyestudio-reed-switch-module-for-arduino.html
http://www.keyestudio.com/keyestudio-reed-switch-module-for-arduino.html



Revision as of 15:52, 14 November 2017

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. In addition, some reed switches are also equipped with another reed acting as the third normally-closed contact. These reed contacts are encapsulated in a glass tube full of inert gases(such as nitrogen and helium) or in a vacuum glass tube. The reeds encapsulated in the glass tube are placed in parallel with ends overlapped. Certain amount of space or mutual contaction will be reserved so as to constitute the normally-open or normally-closed contacts of the switch.

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.

Reed switch has been widely applied in household appliances, cars, communication, industry, healthcare and security areas. Furthermore, it can also be applied to other sensors and electric devices such as liquidometer, door magnet, reed relay, oil level sensor and proximity sensor(magnetic sensor). It can be used under high-risk environment. 
thumb


Specification

  • Working Voltage: DC 3.3V-5V
  • Working Current: ≥20mA
  • Working Temperature: -10℃—+50℃
  • Detection Distance: ≤10mm
  • IO Interface: 3 wire interface (-/+/S)
  • Size: 30*20mm
  • Weight: 3g

Connection Diagram


thumb

Sample Code

int Led=13;//define LED interface
int buttonpin=3; //define magnetic ring sensor interface
int val;//define digital variable val
void setup()
{
pinMode(Led,OUTPUT);//define LED as output interface
pinMode(buttonpin,INPUT);//define magnetic ring 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 magnetic ring sensor, LED will flash
{
digitalWrite(Led,HIGH);
}
else
{
digitalWrite(Led,LOW);
}

Resources

Video

http://www.keyestudio.com/wp/2016/05/ks0038-keyestudio-reed-switch-sensor/

Datasheet

http://www.keyestudio.com/files/index/download/id/1463651014/

Buy from

Official Website

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

Amazon Store

https://www.amazon.com/Keyestudio-Switch-Module-Arduino-raspberry/dp/B0172VB0QW/ref=sr_1_1?ie=UTF8&qid=1479957435&sr=8-1&keywords=keyestudio+Reed+Switch+Module+for+Arduino