DFRobot_Digital_Vibration_Sensor_(SKU_DFR0027) - jimaobian/DFRobotWiki GitHub Wiki
Introduction
the dfrobot digital vibration sensor is a digital plug and play sensor blocks. it has vibration switch digital input module and dedicated sensor expansion boards with the arduino in combination. it can sense the weak vibration signals, which can be realized with the shock interaction with relevant works. Product Performance:
- The conductive pin will make an instant turn-on (ON) state when touched by the outside force to achieve the proper vibration force, or an appropriate speed from the (partial) energy.
- No direction, any angle may burst.
- The switch is suitable for small-current circuit (secondary circuit) or (IC) of the trigger.
- At room temperature and normal use the next switch service life is up to 10 million times (times/1sec).
Specification
- On-Time: 0.1ms
- Open circuit resistance: 10Mohm
Pin Definition
Relay module pin definition :
:#Input
:#Power
:#GND
Connection Diagram
Sample Code
#define SensorLED 13
#define SensorINPUT 3 //Connect the sensor to digital Pin 3 which is Interrupts 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++;
}
shopping dfrobot digital vibration sensor (sku:dfr0027)
category: Product Manual category: DFR Series category: Sensors category:source category:Diagram