Ks0117 keyestudio EASY plug Vibration Sensor Module: Difference between revisions

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


==Introduction==
==Introduction==
What's the simplest way to check vibration with Arduino? Well, use a vibration sensor from keyestudio. You can directly plug it on our sensor Shield V5, vibrate this sensor, and Arduino can receive a digital signal, making it easy to make computation and programs in Arduino.<br>
What's the simplest way to check vibration with Arduino? Well, use a vibration sensor from keyestudio. <br>
Despite its simplicity, you can make full use of it with creative thinking, step counting, and crash warning light etc.<br>
You can directly connect it to our EASY Plug control board with only one cable. Just vibrate this sensor, Arduino can receive a digital signal. It is easy to count and program in Arduino.<br>
Note: this module needs to be used together with EASY plug control board.<br>
It also comes with a potentiometer for you to adjust the sensitivity.<br>
In spite of simplicity, you can make full use of it with creative thinking, step counting, and crash warning light, etc.<br>
<span style="color: red">'''Note: ''' this module should be used together with EASY plug control board.<br>
<br>


 
==Parameters==
==Specification==
* Interface: Easy plug
* Sensor type: Digital
* Sensor type: Digital
* Supply Voltage: 3.3V to 5V
* Supply Voltage: 3.3V to 5V
* Size: 46.4*16.6mm
* High quality connector
* Weight: 7g
* Adjustable sensitivity via a potentiometer
 


==Connection Diagram ==
<br>
<br>[[File:ks0117-2.png|500px|frameless|thumb]]<br>
==Technical Details==
* Dimensions: 46mm*16.7mm*17.6mm
* Weight: 6.2g
<br>


==Connect It Up==
Connect the EASY Plug vibration sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
<br>[[File:ks0114.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>
#define SensorLED     13
#define SensorLED 13
#define SensorINPUT   7 //Connect the sensor to digital Pin 7 which is Interrupt 1.
#define SensorINPUT 7  //Connect the sensor to digital Pin 7 which is Interrupt 1.
unsigned char state = 0;
unsigned char state = 0;
void setup()
void setup()
{
{
pinMode(SensorLED, OUTPUT);
 pinMode(SensorLED, OUTPUT);
pinMode(SensorINPUT, INPUT);
 pinMode(SensorINPUT, INPUT);
attachInterrupt(1, blink, FALLING);// Trigger the blink function when the falling edge is detected
 attachInterrupt(1, blink, FALLING);// Trigger the blink function when the falling edge is detected
}
 }
void loop()
void loop()
{ if(state!=0)
{  if(state!=0)
    {
     {
      state = 0;
       state = 0;
      digitalWrite(SensorLED,HIGH);
       digitalWrite(SensorLED,HIGH);
      delay(500);
       delay(500);
    }
     }  
    else
     else
      digitalWrite(SensorLED,LOW);
       digitalWrite(SensorLED,LOW);
}
}
void blink()//Interrupts function
void blink()//Interrupts function
{ state++;
{  state++;
}
}
</pre>
</pre>
<br>
==What You Should See==
Done uploading the code, just vibrate the sensor, Arduino can receive a digital signal, and led will be turned on. If isn’t, you are able to adjust the sensitivity by a potentiometer.
<br>[[File:ks0114 Result.png|600px|frameless|thumb]]<br>
<br>


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


'''PDF'''
'''Download the Code:'''<br>
https://drive.google.com/open?id=1Gna-7O3atCG5OTjpQqog0pQtZEGKvH-k


https://drive.google.com/open?id=1ggDlubS52kEVdIDCA5jAXhc0yks437FK
<br>


==Buy from ==
==Buy from ==
'''Official Website'''
*'''Official Website:''' http://www.keyestudio.com/ks0117.html
 
*[https://www.aliexpress.com/store/product/New-Keyestudio-EASY-plug-Vibration-Sensor-module-for-Arduino/1452162_32643679818.html?spm=2114.12010612.8148356.28.14e424eaaJLgrn  Shop on aliexpress ]


http://www.keyestudio.com/keyestudio-easy-plug-vibration-sensor-module-for-arduino.html


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

Revision as of 11:17, 28 November 2018

EASY plug Vibration Sensor Module

Introduction

What's the simplest way to check vibration with Arduino? Well, use a vibration sensor from keyestudio.
You can directly connect it to our EASY Plug control board with only one cable. Just vibrate this sensor, Arduino can receive a digital signal. It is easy to count and program in Arduino.
It also comes with a potentiometer for you to adjust the sensitivity.
In spite of simplicity, you can make full use of it with creative thinking, step counting, and crash warning light, etc.
Note: this module should be used together with EASY plug control board.

Parameters

  • Sensor type: Digital
  • Supply Voltage: 3.3V to 5V
  • High quality connector
  • Adjustable sensitivity via a potentiometer


Technical Details

  • Dimensions: 46mm*16.7mm*17.6mm
  • Weight: 6.2g


Connect It Up

Connect the EASY Plug vibration 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.

#define SensorLED 13
#define SensorINPUT 7  //Connect the sensor to digital Pin 7 which is Interrupt 1.
unsigned char state = 0;
void setup()
{
 pinMode(SensorLED, OUTPUT);
 pinMode(SensorINPUT, INPUT);
 attachInterrupt(1, blink, FALLING);// Trigger the blink function when the falling edge is detected
 }
void loop()
{  if(state!=0)
     {
       state = 0;
       digitalWrite(SensorLED,HIGH);
       delay(500);
     }  
     else
       digitalWrite(SensorLED,LOW);
}
void blink()//Interrupts function
{  state++;
}


What You Should See

Done uploading the code, just vibrate the sensor, Arduino can receive a digital signal, and led will be turned on. If isn’t, you are able to adjust the sensitivity by a potentiometer.
thumb


Resources

Download the PDF:
https://drive.google.com/open?id=1ggDlubS52kEVdIDCA5jAXhc0yks437FK

Download the Code:
https://drive.google.com/open?id=1Gna-7O3atCG5OTjpQqog0pQtZEGKvH-k


Buy from