Arduino-Detecting Vibration
A Piezo sensor, also known as a knock sensor, produces a voltage in response to physical stress. The more it is stressed, the higher the voltage. The Piezo is polarized and the positive side (usually a red wire or a wire marked with a “+”) is connected to the analog input; the negative wire (usually black or marked with a “-”) is connected to ground. A high-value resistor (1 megohm) is connected across the sensor.
The voltage is detected by Arduino analogRead to turn on an LED. The THRESHOLD value determines the level from the sensor that will turn on the LED, and you can decrease or increase this value to
make the sketch more or less sensitive. Piezo sensors can be bought in plastic cases or as bare metal disks
A Piezo sensor, also known as a knock sensor, produces a voltage in response to physical stress. The more it is stressed, the higher the voltage. The Piezo is polarized and the positive side (usually a red wire or a wire marked with a “+”) is connected to the analog input; the negative wire (usually black or marked with a “-”) is connected to ground. A high-value resistor (1 megohm) is connected across the sensor.
The voltage is detected by Arduino analogRead to turn on an LED. The THRESHOLD value determines the level from the sensor that will turn on the LED, and you can decrease or increase this value to
make the sketch more or less sensitive. Piezo sensors can be bought in plastic cases or as bare metal disks
