SW-520D tilt sensor module 3.3-5V
zoom_out_map
chevron_left chevron_right

Product images are for informational purposes only and may vary slightly depending on the batch and supplier. Product specifications and prices may be subject to change without notice. We do our best to provide accurate and complete product specifications, but they may not be completely accurate. If you encounter any such situation, please let us know.

The product is intended for specialists and requires qualified and authorized personnel. The product does not include assembly/use instructions . Putting the product into operation by unqualified persons leads to the loss of the warranty according to the Terms and Conditions on the site.

The specified technical parameters (current, power, etc.) represent maximum allowable values under ideal operating conditions. For safe use and optimal lifespan, it is recommended to operate the product continuously at no more than 50% of the specified maximum values.

Tilt sensor module, SW-520D, 3.3-5V

Quickly detects tilt and vibration in monitoring or alarm projects, provides easy-to-read digital output with Arduino, ESP32 or STM32, operates at 3.3-5V, typically triggers at approximately 15 degrees, includes status LED for visual confirmation and sealed metal ball sensor for rugged use.

Ft369.64 Tax included

Ft305.49 Tax excluded

No reviews yet
1-2 zile
check In Stoc

Shipping by Thursday 27 August

Close
INTERNATIONAL DELIVERY
International fast shipping within EU. Free Shipping for orders above 100 EUR in most EU countries.
FAST DISPATCH 24H
We ship from our stock within 24H
LOYALTY POINTS
You earn points with every order, worth 5%.

This module with the SW-520D sensor with a metal ball is a simple and durable solution for detecting vibrations, movements, or angle changes. It has a digital output easy to read by any microcontroller such as Arduino, ESP32, or STM32, and the typical trigger threshold is around 15°. The module includes a status LED that lights up on trigger for quick visual confirmation. It operates at 3.3 to 5 VDC and provides a stable signal, useful in monitoring projects, shock alarms, or tilt detection.

 

Specifications:

Operating voltage: 3.3 - 5 VDC

Maximum output current: > 15 mA

Sensor type: sealed SW-520D metal ball

Trigger angle: approximately 15°

Resistance in ON state: < 10 Ohms

Resistance in OFF state: > 10 MOhms

Output type: Digital

Operating temperature: 0 - +80°C

Size: 32 x 14 mm

 

Pinout:

Pin number Pin Name Pin Description
1 D0 Digital output
2 GND Ground
3 VCC 3.3-5 VDC

 

Usage:

Power the module at VCC and GND, then connect D0 to a digital pin of the microcontroller.

At rest, when the ball does not make contact, the D0 output is HIGH. When tilted or vibrated strongly enough, the ball makes contact between terminals and the D0 output switches to LOW, and the LED on the module lights up.

For more stable results, you can add a short software delay and use repeated readings to filter out short vibrations.

88145

Produs destinat utilizarii in proiecte electronice, automatizari, prototipare, educatie si cercetare.

Produsul trebuie utilizat numai conform specificatiilor tehnice mentionate in descriere si/sau in documentatia produsului.

Avertismente generale de siguranta:

Nu utilizati produsul la tensiuni, curenti sau temperaturi peste valorile specificate.

Montajul si conectarea trebuie realizate de persoane cu cunostinte tehnice minime in domeniul electric/electronic.

Evitati scurtcircuitele, inversarea polaritatii si conectarea gresita a alimentarii.

Nu lasati produsul alimentat nesupravegheat in timpul testelor.

Produsul nu este jucarie si nu este destinat copiilor.

Pentru modulele electronice, se recomanda utilizarea in carcase, panouri sau montaje protejate, dupa caz.

Identificare produs:

Denumirea produsului, codul/SKU-ul si caracteristicile tehnice sunt mentionate in pagina produsului si/sau pe eticheta ambalajului.

Producator / Importator / Distribuitor:

Sigmanortec S.R.L.

Calea Bucuresti nr. 9, Targu Jiu, Gorj, Romania

E-mail: [email protected]

Website: www.sigmanortec.ro

Persoana responsabila in UE:

Sigmanortec S.R.L.

Calea Bucuresti nr. 9, Targu Jiu, Gorj, Romania

E-mail: [email protected]

Documentatie si siguranta:

Pentru informatii suplimentare, fise tehnice, declaratii de conformitate sau instructiuni, ne puteti contacta la [email protected].

// SW-520D vibration/tilt module with Serial monitoring + software delay (debounce filter)
// D0: HIGH at rest, LOW when triggered

const int PIN_SENSOR = 3;     // D0 connected to digital pin 3
const int PIN_LED    = 13;    // onboard LED

const unsigned long FILTER_MS = 80;   // software delay for filtering
const unsigned long REPORT_MS = 150;  // serial print rate limit

bool stableState = HIGH;              // current filtered state
bool lastRawState = HIGH;             // last raw read
unsigned long lastChangeMs = 0;       // last time raw state changed
unsigned long lastReportMs = 0;       // last time we printed to Serial

void setup() {
  pinMode(PIN_SENSOR, INPUT);
  pinMode(PIN_LED, OUTPUT);

  Serial.begin(115200);
  delay(200);

  Serial.println("SW-520D monitoring started");
  Serial.println("RAW: direct read, STABLE: filtered read, TRIGGER: LOW");
}

void loop() {
  // Raw read
  bool raw = digitalRead(PIN_SENSOR);

  // If raw state changed, start (or restart) the filter timer
  if (raw != lastRawState) {
    lastRawState = raw;
    lastChangeMs = millis();
  }

  // If raw state has been stable long enough, accept it as the new stable state
  if ((millis() - lastChangeMs) >= FILTER_MS && stableState != lastRawState) {
    stableState = lastRawState;

    // Act on stable state change
    if (stableState == LOW) {
      digitalWrite(PIN_LED, HIGH);
      Serial.println("STABLE: LOW  TRIGGER: YES");
    } else {
      digitalWrite(PIN_LED, LOW);
      Serial.println("STABLE: HIGH TRIGGER: NO");
    }
  }

  // Periodic Serial monitoring without spamming
  if (millis() - lastReportMs >= REPORT_MS) {
    lastReportMs = millis();
    Serial.print("RAW: ");
    Serial.print(raw == LOW ? "LOW" : "HIGH");
    Serial.print("  STABLE: ");
    Serial.println(stableState == LOW ? "LOW" : "HIGH");
  }
}