Skip to content

asathiskumar98-byte/Raspberry-Pi-Pico-W-SW-420-Vibration-Sensor-MicroPython-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🌍 Raspberry Pi Pico W – SW-420 Vibration Sensor (MicroPython)

This project reads analog vibration levels from an SW-420 sensor using the ADC on Raspberry Pi Pico W.


βš™οΈ Hardware Setup

SW-420 Pin Pico W Pin Description
VCC 3.3V Power
GND GND Ground
AO GPIO26 (ADC0) Analog signal
DO (optional) GPIO16 Digital signal (threshold output)

🧠 Working Principle

The SW-420 sensor detects vibrations or knocks using a spring-based mechanism.
The onboard comparator circuit can also generate digital threshold signals.

The analog output (AO) gives continuous vibration intensity, read via ADC0.


πŸš€ Run the Code

  1. Open Thonny IDE
  2. Connect Pico W
  3. Save code as main.py
  4. Tap or shake the sensor β€” view analog readings in the shell

πŸ’‘ Try These Next

  • Blink LED when vibration > 30,000
  • Send vibration alerts over Wi-Fi
  • Plot vibration levels on SSD1306 OLED

About

This project reads analog vibration levels from an **SW-420 sensor** using the **ADC** on Raspberry Pi Pico W.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages