Detection of Sudden Movements With SW520D & Arduino Board




About: Project Manager ,Networking and Telecommunication Engineer

One way to detect anomalies is to monitor the brutal vibrations that will be seen at a point of the circuit's environment . I made this small circuit when i was working in a project about detecting the cuts of cables and there's no way to develop another logic to detect that (the voltage of the cables was 2000V).

So after searching a little i found the SW520D,a vibration sensor component, coupled with a set of resistors and capacitors to adjust the vibration threshold desired,i could fix all the problem.

Step 1: Logic of Working

Knowing that consumption is a constraint on the field, this component consumes anything

It is its major advantage .In fact, it is a special switch which the opening and closing of the contact are sudden movements. Inside there are two bubbles that realize the contact between the two pins of the component

I used this scheme (Figure 3) to take advantage of these two modes of operation and at the same time to adjust the sensitivity of the sensor.

After some measurements and tests I set the values of the two components of setting R = 10kOhm and C = 100nF.

In the static case (incident) switch is in the ON state, the test port will bring 0V (= GND)

In case of vibrations in a split second we'll have an open circuit at the test pin (OFF state) .So the value of the Pin is high (4 xxV), which will be visible by the Arduino, and to visualize this state I used a red LED that flashes and a buzzer (Alarm).

Step 2: The Circuit

This's the circuit which i used ,you can check the code to identify each PIN with which component

Step 3: Code

Step 4: Experience

I made the video in French but never mind it's just for testing the capture of vibrations



    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Fandom Contest

      Fandom Contest
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    4 Discussions


    2 years ago

    The cap could filter out some noise when the switch is open. But why use the arduino? A simple timer (4093 or 555 based) is enough.

    1 reply
    Mohammed BENHADINEBenadski

    Reply 2 years ago

    Hi,,yes you are right but this circuit was designed to capture sudden movements then format an packet (with some addresses and Data field) and transmit it through an RF infrastructure .I didn't add the transmission part to the code,but i used Arduino to do other works in parallel this why bro.thanks ;)


    2 years ago

    could you tell me what the function of the capacitor in this circuit is?

    1 reply
    Mohammed BENHADINEnemob

    Reply 2 years ago

    The maximum current that all outputs combined can receive must not exceed 400mA,,the function is protecting the arduino because we can put any voltage source (more than 5V ),,do u see another function?