Detect Vibrations Using a Piezoelectric Shock Tap Sensor Module

About: Arduino fan!

In this tutorial we will learn how to detect shock vibrations using a simple Piezoelectric sensor Vibration module and Visuino.

Watch a demonstration video.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: What You Will Need

  1. Arduino UNO (or any other Arduino)
  2. Piezoelectric shock Vibration module
  3. OLED display
  4. Jumper wires
  5. Breadboard
  6. Visuino program: Download Visuino

Step 2: The Circuit

Connect Arduino positive pin [5v] to breadboard red line pin [positive]

Connect Arduino positive pin [GND] to breadboard blue line pin [negative]

Connect Piezo module pin [V] to breadboard positive pin [red line]

Connect Piezo module pin [G] to breadboard negative pin [blue line]

Connect Piezo module pin [DO] to arduino digital pin [7]

Connect OLED pin [VCC] to breadboard positive pin [red line]

Connect OLED pin [GND] to breadboard negative pin [blue line]

Connect OLED pin [SDA] to Arduino pin [SDA]

Connect OLED pin [SCL] to Arduino pin [SCL]

Step 3: Start Visuino, and Select the Arduino UNO Board Type

To start programming the Arduino, you will need to have the Arduino IDE installed from here: https://www.arduino.cc/.

Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work! If you have not done follow the steps in this Instructable to setup the Arduino IDE to program Arduino UNO! The Visuino: https://www.visuino.eu also needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

Step 4: In Visuino Add Components and Connect Them

Add Components
  1. Add "text value" component
    Select "TextValue1" component and in the properties window set "Value" to "VIBRATION DETECTED"
  2. Add "Delay" component
    In properties window set "Interval (uS)" to 2000000
  3. Add "SSD1306/SH1106 OLED Display (I2C)" component

    Double click on "DisplayOLED1" component and in the elements window drag "Text Field" to the left and drag "Fill Screen" to the left
    Select on the left "Text Field1" and in the properties window set "Size" to 1, "x" to 0, "y" to 50

Connect components

  1. Connect Arduino digital pin out [7] to "Text Value1" component pin [clock]
  2. Connect Arduino digital pin out [7] to "Delay" component pin [start]
  3. Connect "Text Value1" component pin [Out] to "DisplayOLED1" > "Text Field1" pin [In]
  4. Connect "Delay1" pin [Out] to "DisplayOLED1" > "Fill Screen1" pin [Clock]
  5. Connect "DisplayOLED1" pin [Out] to Arduino I2C pin [In]

Step 5: Generate, Compile, and Upload the Arduino Code

In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE

In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)

Step 6: Play

If you power the Arduino UNO module, and shake the piezo sensor you should see a message written on the OLED display.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it here.You can download and open it in Visuino: https://www.visuino.eu

Be the First to Share

    Recommendations

    • Instrument Contest

      Instrument Contest
    • Make it Glow Contest

      Make it Glow Contest
    • STEM Contest

      STEM Contest

    Discussions