Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›Vibration and Tilt Switch Components

Component guide · Beginner · 4 min read

Vibration and Tilt Switch Components

SW-18010P, SW-18015P and SW-58010P Spring Switches, SW-200D Ball Tilt Switches, XKB, Shou Han, Hanxia, ROCPU and Saiya SMD Vibration Sensors

By Geekobot Learning Team · Updated 29 Oct 2026

On this page
Short answerWhat the Spring vibration switches and ball tilt switch components (SW-18010P, SW-200D) isSpring vibration switches and ball tilt switch components (SW-18010P, SW-200D) pinoutWiring the Spring vibration switches and ball tilt switch components (SW-18010P, SW-200D)Example codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

These are the bare switches used inside vibration and tilt modules. Spring types like the SW-18010P have a coil spring around a pin: any shake makes them touch for a moment, from any direction. Ball types like the SW-200D close when upright and open when tilted. Wire one between a pin and ground with a pull-up, and use an interrupt to catch the short pulses.

Key specs at a glance

Spring type
SW-18010P, SW-18015P, SW-58010P: normally open, closes briefly on vibration
Ball type
SW-200D, SW-520D style: closed upright, open when tilted
Mounting
Through-hole plug-in or SMD
Rating
Signal level only, a few mA
Life
Up to about 1 million cycles on some parts
Direction
Spring types are non-directional

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1Shou Han SW-18010P Vibration Sensor 1M Cycles Plugin₹23
  • Option 2Shou Han SW-58010P Vibration Sensor 1M Cycles Plugin ROHS₹17
  • Option 3Shou Han SW-200D 053 Plugin Vibration Sensor +40℃~+81℃₹13
  • Option 4Hanxia HX SW-200 053 DIP Vibration Sensor – 12V, +40℃ to +80℃₹8
  • Option 5Hanxia HX SW-200D 053 DIP Vibration Sensor +40℃~+80℃₹10
  • Option 6ROCPU TPSW-105A-B Vibration Switch 100K Cycles 120℃ Plugin ROHS₹7
01

What the Spring vibration switches and ball tilt switch components (SW-18010P, SW-200D) is

Vibration and tilt switch components, such as SW-18010P spring switches and ball tilt switches, close a contact when shaken or tilted, for alarms and wake-up triggers.

Use spring switches to wake a sleeping microcontroller when a bag, door, bike or machine is moved: the pulse triggers an interrupt and the board wakes up. Use ball tilt switches for orientation alarms and toys.

Pulses from spring switches are very short, often under a millisecond, so polling in loop() can miss them. Attach an interrupt, or add a small capacitor to stretch the pulse. Never pass load current through these switches.

02

Spring vibration switches and ball tilt switch components (SW-18010P, SW-200D) pinout

The pins on the Spring vibration switches and ball tilt switch components (SW-18010P, SW-200D) and what each one does.

PinFunction
Pin 1To the input pin
Pin 2To ground
BodyCan be the spring contact on some parts
OrientationMatters for ball types only
PolarityNone
PinFunction
Pin 1
To the input pin
Pin 2
To ground
Body
Can be the spring contact on some parts
Orientation
Matters for ball types only
Polarity
None
03

Wiring the Spring vibration switches and ball tilt switch components (SW-18010P, SW-200D)

These switches carry signal current only. Use a transistor or relay to drive anything else.

Spring vibration switches and ball tilt switch components (SW-18010P, SW-200D) pinConnectionNote
Pin 1D2 with INPUT_PULLUPInterrupt pin
Pin 2GNDCommon ground
Optional100 nF from D2 to GNDStretches short pulses
Pin 1
Connection:
D2 with INPUT_PULLUP
Note:
Interrupt pin
Pin 2
Connection:
GND
Note:
Common ground
Optional
Connection:
100 nF from D2 to GND
Note:
Stretches short pulses
04

Example code

On an ESP32, use the same pin as an external wake-up source to wake from deep sleep on movement.

Count vibration pulses with an interrupt · Arduino C++Verify & upload in Electrolark
const int VIB = 2;
volatile unsigned int hits = 0;

void onHit() { hits++; }

void setup() {
  Serial.begin(9600);
  pinMode(VIB, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(VIB), onHit, FALLING);
}

void loop() {
  noInterrupts();
  unsigned int n = hits;
  hits = 0;
  interrupts();
  if (n > 0) {
    Serial.print("Vibration pulses: ");
    Serial.println(n);
  }
  delay(500);
}
05

Setup and tuning

Wiring

one lead to a digital pin with INPUT_PULLUP, the other to GND.

Interrupts

use a pin interrupt to catch short vibration pulses.

Sensitivity

choose spring stiffness for sensitivity; it is not adjustable.

Debounce

count pulses in a time window to avoid false triggers.

Low power

use them to wake a sleeping microcontroller.

06

What you need

Shop this list19 of 20 found in our store · ₹301

  • Shou Han SW-18010P Vibration Sensor 1M Cycles Plugin: the part this guide coversShou Han SW-18010P Vibration Sensor 1M Cycles Plugin₹23
  • Shou Han SW-58010P Vibration Sensor 1M Cycles Plugin ROHS: another version this guide coversShou Han SW-58010P Vibration Sensor 1M Cycles Plugin ROHS₹17
  • Shou Han SW-200D 053 Plugin Vibration Sensor +40℃~+81℃: another version this guide coversShou Han SW-200D 053 Plugin Vibration Sensor +40℃~+81℃₹13
  • Hanxia HX SW-200 053 DIP Vibration Sensor – 12V, +40℃ to +80℃: another version this guide coversHanxia HX SW-200 053 DIP Vibration Sensor – 12V, +40℃ to +80℃₹8
  • Hanxia HX SW-200D 053 DIP Vibration Sensor +40℃~+80℃: another version this guide coversHanxia HX SW-200D 053 DIP Vibration Sensor +40℃~+80℃₹10
  • ROCPU TPSW-105A-B Vibration Switch 100K Cycles 120℃ Plugin ROHS: another version this guide coversROCPU TPSW-105A-B Vibration Switch 100K Cycles 120℃ Plugin ROHS₹7
  • Saiya Sensor SWS-0608-05 SMD Vibration Sensor 1M Cycles 250℃ ROHS: another version this guide coversSaiya Sensor SWS-0608-05 SMD Vibration Sensor 1M Cycles 250℃ ROHS₹22
  • XKB Connection SW-105AC-10G Plugin Vibration Sensor – 10° Tilt Angle: another version this guide coversXKB Connection SW-105AC-10G Plugin Vibration Sensor – 10° Tilt Angle₹9
  • XKB Connection SW-168DZW-9G Double Ball Tilt/Vibration Sensor: another version this guide coversXKB Connection SW-168DZW-9G Double Ball Tilt/Vibration Sensor₹22
  • XKB Connection SW-18015PZR-10G12B3 Plugin Vibration Sensor – ROHS Compliant: another version this guide coversXKB Connection SW-18015PZR-10G12B3 Plugin Vibration Sensor – ROHS Compliant₹7
  • XKB Connection SW-200CS-19G10G Plugin Vibration Sensor: another version this guide coversXKB Connection SW-200CS-19G10G Plugin Vibration Sensor₹10
  • XKB Connection SW-200DAC-10G1 Single-Ball Tilt Switch – 10° Activation Angle: another version this guide coversXKB Connection SW-200DAC-10G1 Single-Ball Tilt Switch – 10° Activation Angle₹9
  • XKB Connection SW-200DW-17T3G Vibration Sensor – Dual-Pass Tilt Switch, Gold-Plated Pins: another version this guide coversXKB Connection SW-200DW-17T3G Vibration Sensor – Dual-Pass Tilt Switch, Gold-Plated Pins₹19
  • XKB Connection SW-200DW-7T5G Plugin Vibration Sensor – Tilt Switch: another version this guide coversXKB Connection SW-200DW-7T5G Plugin Vibration Sensor – Tilt Switch₹20
  • XKB Connection SW-200M-20T10G2 Plugin Vibration Sensor: another version this guide coversXKB Connection SW-200M-20T10G2 Plugin Vibration Sensor₹22
  • XKB Connection SW-58010PZD-7N11S1 Plugin Vibration Sensor – Nickel-Plated Brass Housing: another version this guide coversXKB Connection SW-58010PZD-7N11S1 Plugin Vibration Sensor – Nickel-Plated Brass Housing₹8
  • XKB Connection SW-58015PD-10B3 Plugin Vibration Sensor: another version this guide coversXKB Connection SW-58015PD-10B3 Plugin Vibration Sensor₹9
  • XKB Connection SW-58025PD-10B5 Plugin Vibration Sensor: another version this guide coversXKB Connection SW-58025PD-10B5 Plugin Vibration Sensor₹17
  • Uno R3 development board: the controller used in the wiring tableFind this part
  • Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
07

Alternatives and when to choose them

  • ✓SW-420 vibration sensor: ready module with comparator.
  • ✓Tilt switch modules: ready boards.
  • ✓Piezo sensors and discs: measure vibration strength.
08

Common mistakes to avoid

  • !Polling instead of interrupts.
  • !No pull-up.
  • !No filtering.
  • !Expecting vibration level measurement.
09

Frequently asked questions

How do I detect vibration with a spring switch?

Use an interrupt on the pin and count pulses.

Can I adjust the sensitivity?

Not on the switch; choose a different model or filter in code.

Why do I get random triggers?

Small knocks; require several pulses within a short time.

Can it wake up an ESP32?

Yes. Connect it to an RTC GPIO and use it as an external wake-up source.

Is it a replacement for an accelerometer?

No. It only switches on or off and cannot measure how strong the vibration is.

Parts for this guide

  • Shou Han SW-18010P Vibration Sensor 1M Cycles Plugin
    ₹23View
  • Shou Han SW-58010P Vibration Sensor 1M Cycles Plugin ROHS
    ₹17View
  • Shou Han SW-200D 053 Plugin Vibration Sensor +40℃~+81℃
    ₹13View
  • Hanxia HX SW-200 053 DIP Vibration Sensor – 12V, +40℃ to +80℃
    ₹8View
  • Hanxia HX SW-200D 053 DIP Vibration Sensor +40℃~+80℃
    ₹10View
  • ROCPU TPSW-105A-B Vibration Switch 100K Cycles 120℃ Plugin ROHS
    ₹7View
  • Saiya Sensor SWS-0608-05 SMD Vibration Sensor 1M Cycles 250℃ ROHS
    ₹22View
  • XKB Connection SW-105AC-10G Plugin Vibration Sensor – 10° Tilt Angle
    ₹9View
  • XKB Connection SW-168DZW-9G Double Ball Tilt/Vibration Sensor
    ₹22View
  • XKB Connection SW-18015PZR-10G12B3 Plugin Vibration Sensor – ROHS Compliant
    ₹7View
  • XKB Connection SW-200CS-19G10G Plugin Vibration Sensor
    ₹10View
  • XKB Connection SW-200DAC-10G1 Single-Ball Tilt Switch – 10° Activation Angle
    ₹9View
  • XKB Connection SW-200DW-17T3G Vibration Sensor – Dual-Pass Tilt Switch, Gold-Plated Pins
    ₹19View
  • XKB Connection SW-200DW-7T5G Plugin Vibration Sensor – Tilt Switch
    ₹20View
  • XKB Connection SW-200M-20T10G2 Plugin Vibration Sensor
    ₹22View
  • XKB Connection SW-58010PZD-7N11S1 Plugin Vibration Sensor – Nickel-Plated Brass Housing
    ₹8View
  • XKB Connection SW-58015PD-10B3 Plugin Vibration Sensor
    ₹9View
  • XKB Connection SW-58025PD-10B5 Plugin Vibration Sensor
    ₹17View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
  • Solderless Breadboard
    ₹68View
Shop Tilt, Inclinometer & Vibration Sensors

Keep learning

Component guideBeginnerSW-420 vibration sensorThe SW-420 module detects vibration and knocks using a normally-closed spring switch and an LM393 comparator.3 min read · SensorsComponent guideBeginnerTilt Switch ModulesA tilt switch has a small metal ball (or a drop of mercury) that closes a contact when the module is upright and opens it when tipped.4 min read · SensorsComponent guideIntermediatePiezo Sensors and DiscsA piezo sensor creates a voltage when it is bent, knocked or vibrated.3 min read · Sensors

Sources

  • Vibration switch maker data sheets

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the Spring vibration switches and ball tilt switch components (SW-18010P, SW-200D) isSpring vibration switches and ball tilt switch components (SW-18010P, SW-200D) pinoutWiring the Spring vibration switches and ball tilt switch components (SW-18010P, SW-200D)Example codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide8 items · ₹121

Shou Han SW-18010P Vibration Sensor 1M Cycles Plugin · Saiya Sensor SWS-0608-05 SMD Vibration Sensor 1M Cycles 250℃ ROHS · XKB Connection SW-105AC-10G Plugin Vibration Sensor – 10° Tilt Angle · XKB Connection SW-168DZW-9G Double Ball Tilt/Vibration Sensor · XKB Connection SW-18015PZR-10G12B3 Plugin Vibration Sensor – ROHS Compliant · XKB Connection SW-200CS-19G10G Plugin Vibration Sensor · XKB Connection SW-200DAC-10G1 Single-Ball Tilt Switch – 10° Activation Angle · XKB Connection SW-200DW-17T3G Vibration Sensor – Dual-Pass Tilt Switch, Gold-Plated Pins

Run itChange the inputs and watch the output

Counts switch pulses in each half second and prints only when there were any.

Serial monitor9600 baud
 

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question