No special products at this time.

Viewed products

Hit/Knock Vibration sensor module


New product

KWD 1.250

Hit/TAP/Knock Vibration Sensor Module

More details

  • Send to a friend

    Send to a friend

    Hit/Knock Vibration sensor module

    Hit/Knock Vibration sensor module

    Hit/TAP/Knock Vibration Sensor Module

    Recipient :

    * Required fields

      or  Cancel

  • Print

product description

The vibration sensor consists of a spring connected to one contact and a pin inside the spring connected to the other contact. Vibration of the spring will cause the spring to come into contact with the pin, closing the switch circuit briefly.
The surface mount resistor (103 = 10K ohms) pulls the signal pin up to +5V. When the contacts close, the signal pin is pulled to ground.

Example Code

int Led = 13 ; // define LED Interface
int Shock = 3 // define the percussion Sensor Interface
int val ; // define numeric variables val
void setup ()
  pinMode (Led, OUTPUT) ; // define LED as output interface
  pinMode (Shock, INPUT) ; // define knock sensor output interface
void loop ()
  val = digitalRead (Shock) ; // read digital interface is assigned a value of 3 val
  if (val == HIGH) // When the percussion when the sensor detects a signal, LED flashes
    digitalWrite (Led, LOW);
    digitalWrite (Led, HIGH);

Related products