Ks0110 keyestudio EASY plug Hall Magnetic Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==EASY plug Hall Magnetic Sensor ==
[[image:KS0110图.jpg|thumb|600px|right|Keyestudio White LED Module]]
<br>[[File:ks0110-1.png|500px|frameless|thumb]]<br>
 


==Introduction==
==Introduction==
This is a Magnetic Induction Sensor. It senses the magnetic materials within a detection range up to 75px. The detection range and the strength of the magnetic field are proportional. The output is digital on/off. This sensor uses the SFE Reed Switch - Magnetic Field Sensor.<br>
The Hall sensor is based on Hall Effect. It can detect whether there is a magnetic object nearby or not. And it correctly tells you through digital output. <br>
Note: this module needs to be used together with EASY plug control board.<br>
This sensor uses the SFE Reed Switch - Magnetic Field Sensor.<br>
 
It can sense the magnetic materials within a detection range up to 75px. <br>
The detection range and the strength of magnetic field are proportional.  
It is useful for non-contact/waterproof type switches, position sensors, rotary/shaft encoders.<br>
<span style="color: red">'''Note: ''' </span> this sensor needs to be used together with EASY plug control board..<br>


==Specification==
<br>
==Features==
* Connector: Easy plug
* Sensing magnetic materials
* Sensing magnetic materials
* Detection range: up to 75px
* Detection range: up to 75px
* Output: digital on/off
* Output: Digital ON/OFF
* Detection range and magnetic field strength are proportional
* Detection range and magnetic field strength are proportional
* Size: 42.3*20mm
<br>
* Weight: 5g
 


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


==Connect It Up==
Connect the EASY Plug Hall Magnetic sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
<br>[[File:ks0110.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. <br>
<pre>
<pre>
int ledPin = 13;               // choose the pin for the LED
int ledPin = 13;// choose the pin for the LED
int inputPin = 11;               // Connect sensor to input pin 11
int inputPin = 9;// Connect sensor to input pin 9
int val = 0;                   // variable for reading the pin status
int val = 0;// variable for reading the pin status
void setup() {
void setup() {
pinMode(ledPin, OUTPUT);     // declare LED as output
pinMode(ledPin, OUTPUT);// declare LED as output
pinMode(inputPin, INPUT);     // declare pushbutton as input
pinMode(inputPin, INPUT);// declare push button as input
}
}
void loop(){
void loop(){
val = digitalRead(inputPin); // read input value
val = digitalRead(inputPin);// read input value
if (val == HIGH) {           // check if the input is HIGH
if (val == HIGH) { // check if the input is HIGH
  digitalWrite(ledPin, LOW); // turn LED OFF
digitalWrite(ledPin, LOW);// turn LED OFF
} else {
} else {
  digitalWrite(ledPin, HIGH); // turn LED ON
digitalWrite(ledPin, HIGH);// turn LED ON
}
}
}
}
</pre>
</pre>


<br>
==What You Should See==
When a magnet is approaching to the sensor, the LED will be turned on. Otherwise, the LED is off.
<br>[[File:ks0110 Result.jpg|500px|frameless|thumb]]<br>
<br>
==Resources ==
==Resources ==
 
'''PDF'''<br>
'''PDF'''
 
https://drive.google.com/open?id=100ur6ksO4Turkl6qHkmHb2atWy35kv7k
https://drive.google.com/open?id=100ur6ksO4Turkl6qHkmHb2atWy35kv7k


<br>
==Buy from ==
==Buy from ==
'''Official Website'''
'''Official Website'''<br>
 
http://www.keyestudio.com/keyestudio-easy-plug-hall-magnetic-sensor-module-for-arduino.html
http://www.keyestudio.com/keyestudio-easy-plug-hall-magnetic-sensor-module-for-arduino.html




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

Revision as of 09:53, 16 November 2018

File:KS0110图.jpg
Keyestudio White LED Module


Introduction

The Hall sensor is based on Hall Effect. It can detect whether there is a magnetic object nearby or not. And it correctly tells you through digital output.
This sensor uses the SFE Reed Switch - Magnetic Field Sensor.
It can sense the magnetic materials within a detection range up to 75px.
The detection range and the strength of magnetic field are proportional. It is useful for non-contact/waterproof type switches, position sensors, rotary/shaft encoders.
Note: this sensor needs to be used together with EASY plug control board..


Features

  • Connector: Easy plug
  • Sensing magnetic materials
  • Detection range: up to 75px
  • Output: Digital ON/OFF
  • Detection range and magnetic field strength are proportional


Technical Details

  • Dimensions: 41mm*20mm*18mm
  • Weight: 4.4g


Connect It Up

Connect the EASY Plug Hall Magnetic sensor 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 Arduino IDE and upload.

int ledPin = 13;// choose the pin for the LED
int inputPin = 9;// Connect sensor to input pin 9
int val = 0;// variable for reading the pin status
void setup() {
pinMode(ledPin, OUTPUT);// declare LED as output
pinMode(inputPin, INPUT);// declare push button as input
}
void loop(){
val = digitalRead(inputPin);// read input value
if (val == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, LOW);// turn LED OFF
} else {
digitalWrite(ledPin, HIGH);// turn LED ON
}
}


What You Should See

When a magnet is approaching to the sensor, the LED will be turned on. Otherwise, the LED is off.
thumb


Resources

PDF
https://drive.google.com/open?id=100ur6ksO4Turkl6qHkmHb2atWy35kv7k


Buy from

Official Website
http://www.keyestudio.com/keyestudio-easy-plug-hall-magnetic-sensor-module-for-arduino.html