Arduino and SW-420 Vibration Sensor

posted in: Arduino | 25

In this Arduino Tutorial SW-420 vibration sensor was used. It can detect vibrations from various sources.

Download # Arduino Code (*.ino file)

or

Upload Arduino code directly to your Microcontroller from website


If you want to integrate Arduino IDE into your website (as above) sign up here: codebender

[kad_youtube url=”https://www.youtube.com/embed/235BLk7vk00″]

25 Responses

  1. Caryn

    Hi, thousand thanks for your code! i tried several not working but this works so perfectly!
    Btw, I will need to interface with two sensor, I dont know how to change the code to measure for two, could you please help me please?

    Thank you so much in advance..Have a great day!

    Sincerely,
    Caryn

    • admin

      I’m glad it works. The code is not complicated at all in order to add additional sensor, try to sort it out by yourself.

      • Caryn

        may I know what am I measuring in the code? is it vibration amplitude or vibration time ?

    • admin

      The same way as nano, just connect to a proper pins, which is also written in the code itself.

  2. Souvik

    HI, I had a quick question, according to my understanding, this is a digital sensor, in the sense that, the output from it is going to be only 0 or 1 based on the set threshold, (which you set by turning the potentiometer screw on board). How come your measurement output is showing values greater than 1?

    • pallavi

      Because it is not the value of input pin. if we print the value at input pin then and only then it will be in 0 or 1.

  3. nanik alviandari

    thankyou so much. it works on my Arduino Uno with SW-18051P NO Vibration Sensor Module Arduino 🙂

  4. gail

    can you please suggest me which vibration sensor to use on car window to detect any vibration on window for my project vehicle antitheft system and which will be integrated to arduino uno

  5. LJK

    Hi, what if I want to put more than 1 vibration sensor, may I know how’s the coding may look like?

  6. muna

    i would like put 8 sensor and how can i control these through arduino and and every sensor output must be display at computer individually and separately.so plz tell me if it is possible .

  7. Art

    What does 1000 mean? Is it 1000mm, 1000um or something else

  8. Hanis

    Nice example. Just want to know can i remove red LED on the pcb board? I need to reduce power consumption since I’m running on battery.

  9. Mukesh

    what is the maximum amplitude of vibration and it would be grateful if the unit of measurement is known.

  10. lalit shendre

    hey admin can you help me to construct a code for my project ?
    sensing and supressing vibration of cantilever beam and displaying same on computer screen or DSO
    it consist of a cantilever beam A Sensor actuator pair an arduino

Leave a Reply