Smart Laundry Monitoring System

Smart Laundry Monitoring System | Arduino Robotics Project for Kids | MakeMindz
👕

Smart Laundry Monitoring System

Build a robot that tells you when your clothes are done washing — no more soggy laundry forgotten inside the machine!

🧒 Ages 10–16 ⏱️ 2–3 Hours 💰 Under ₹700 🟢 Beginner Friendly 🏆 STEM Project

🎯 What Will We Build?

Have you ever forgotten wet clothes sitting inside the washing machine for hours? Icky, right! 🤢 In this project, you'll build a Smart Laundry Monitoring System — a cool gadget that sits on your washing machine, feels its vibrations, and alerts you when the wash cycle is over!

You'll use an Arduino Uno, a vibration sensor, a buzzer, and two LEDs to create a smart alert system. When the machine is washing, a green LED blinks. When it stops (laundry done!), a red LED lights up and the buzzer beeps — time to grab your fresh clothes! 🎉

🤩
Cool Science Alert! Washing machines shake and vibrate while spinning clothes. Our vibration sensor (SW-420) detects these tiny shakes — just like how you can feel a phone buzzing in your pocket. When shaking stops, the laundry is done!

🧠 What You'll Learn

📡
Vibration Sensing
Using the SW-420 sensor module
💡
LED Control
Blinking & status signals with code
🔔
Buzzer Alerts
Making sound notifications
⏱️
Timing Logic
Using millis() for smart timers
🔌
Circuit Building
Safe breadboard wiring
💻
Arduino Coding
Writing real C++ robotics code

🛒 Parts List & Cost

🛍️
Where to Buy in India All parts available on Robocraze, Robu.in, Amazon India, or your local electronics shop. Estimated total: ₹600–₹700
🎛️
Arduino Uno R3
Qty: 1 · The brain!
₹380
📳
SW-420 Vibration Sensor
Qty: 1 · Detects machine shaking
₹35
🟢
Green LED
Qty: 1 · "Washing in progress"
₹5
🔴
Red LED
Qty: 1 · "Laundry done!"
₹5
🔔
Active Buzzer (5V)
Qty: 1 · Sound alert
₹25
220Ω Resistors
Qty: 2 · Protect LEDs
₹5
🟦
Breadboard (Half)
Qty: 1 · No soldering needed!
₹50
🌈
Jumper Wires (M-M)
Qty: 15 · Colour-coded
₹50
🔋
USB Cable / 9V Battery
Qty: 1 · Power source
₹80

⚙️ How Does It Work?

Follow the signal from shaky machine all the way to your alert — it's like a relay race for electricity!

🌀
Washing Machine Vibrates
📳
SW-420 Detects Vibration
🎛️
Arduino Reads Signal
🟢
Green LED Blinks (Washing)
🛑
No Vibration? Cycle Done!
🔔🔴
Buzzer + Red LED Alert!
💡
Why do we wait before alerting? The machine sometimes pauses between wash and rinse cycles. Our code uses a 30-second timer — only if the machine stays quiet for 30 seconds do we call it "done." Smart, right?

🔌 Circuit Diagram

Smart Laundry Monitoring System — Circuit Diagram ARDUINO UNO GND 5V D2 D7 D8 D9 GND 5V GND (Power Rail) 5V (Power Rail) Vibration Sensor OUT Green LED + Red LED + Buzzer + SW-420 Vibration Sensor VCC OUT GND LED GREEN 220Ω LED RED 220Ω BUZZ ER Active 5V (+ to D9, − to GND) LEGEND Sensor signal Power (5V) Ground LED/Buzzer

📋 Pin Connection Table

ComponentComponent PinArduino PinWire Colour
SW-420 Vibration SensorVCC5V🔴 Red
SW-420 Vibration SensorGNDGND⚫ Black
SW-420 Vibration SensorOUTD2🟡 Yellow
Green LED (+ long leg)Anode (+)D7 via 220Ω🟢 Green
Green LED (– short leg)Cathode (–)GND⚫ Black
Red LED (+ long leg)Anode (+)D8 via 220Ω🔴 Red
Red LED (– short leg)Cathode (–)GND⚫ Black
Active Buzzer+ (positive)D9🟣 Purple
Active Buzzer– (negative)GND⚫ Black

🔧 Step-by-Step Build Guide

1
⚡ Set Up Your Breadboard Power Rails

Place your breadboard on a flat surface. Connect the 5V pin of your Arduino to the red (+) power rail on the breadboard using a red jumper wire. Connect the GND pin to the blue (−) rail with a black wire. This gives power to all your components easily!

💡
The long line running along the breadboard's edge is the power rail — everything connected there shares the same power!
2
📳 Place the SW-420 Vibration Sensor

Push the SW-420 module's 3 pins into the breadboard. Connect:

  • VCC → red (+) power rail
  • GND → blue (−) power rail
  • OUT → Arduino digital pin D2

The little blue potentiometer screw on the sensor adjusts sensitivity — leave it in the middle for now.

3
🟢 Wire the Green LED

LEDs have two legs — the longer leg (+) is the anode and the shorter leg (–) is the cathode. Insert the green LED into the breadboard. Connect:

  • Long leg (+) → one end of a 220Ω resistor → Arduino D7
  • Short leg (–) → blue GND rail
⚠️
Always use a resistor! Without it, too much current flows and the LED will burn out instantly. Think of a resistor as a tiny speed bump for electricity!
4
🔴 Wire the Red LED

Repeat the same process for the red LED:

  • Long leg (+) → 220Ω resistor → Arduino D8
  • Short leg (–) → GND rail

Place it a few rows away from the green LED so wires don't tangle.

5
🔔 Connect the Active Buzzer

An active buzzer has a built-in oscillator — it just needs power to beep! Look for the + marking on top:

  • Positive (+) pin → Arduino D9
  • Negative (–) pin → GND rail
🎵
Active vs Passive Buzzer: Active buzzers make sound on their own when powered. Passive buzzers need a specific frequency signal from your code. We use active — simpler and loud!
6
🔌 Connect Arduino to Computer

Plug your Arduino into your computer using the USB cable. Open the Arduino IDE (download free from arduino.cc). Go to Tools → Board → Arduino Uno and select the correct Port. You're ready to code!

7
💻 Upload the Code

Copy the full Arduino sketch from the code section below. Paste it into the Arduino IDE. Click the Upload (→) button. Wait for "Done uploading" to appear. Your circuit is now alive! 🎉

8
🧪 Test It!

Tap or shake the vibration sensor gently — the green LED should blink! Stop tapping and wait 30 seconds — the red LED lights up and the buzzer beeps! Place the device on top of a washing machine during a cycle to see the real magic!

🔧
If it's too sensitive or not sensitive enough, use a small screwdriver to turn the blue potentiometer screw on the SW-420 sensor.

💻 Full Arduino Code

Copy this sketch into your Arduino IDE and upload it. Every line has a comment explaining what it does — great for learning!

smart_laundry_monitor.ino Arduino C++
// ============================================================
//  Smart Laundry Monitoring System
//  MakeMindz.com — Build Cool Robots!
//  Detects washing machine vibration and alerts when done.
// ============================================================

// ── PIN DEFINITIONS ──────────────────────────────────────────
const int VIBRATION_PIN = 2;   // SW-420 OUT → D2
const int GREEN_LED    = 7;   // Green LED → D7
const int RED_LED      = 8;   // Red LED → D8
const int BUZZER       = 9;   // Buzzer → D9

// ── TIMING SETTINGS ──────────────────────────────────────────
// How long (ms) of silence = laundry done
const unsigned long SILENCE_THRESHOLD = 30000; // 30 seconds

// How long the buzzer beeps when alerting
const unsigned long BUZZER_DURATION  = 3000;  // 3 seconds

// ── STATE VARIABLES ──────────────────────────────────────────
bool machineWasRunning = false;   // Was the machine ever detected?
bool alertGiven       = false;   // Did we already alert the user?
unsigned long lastVibrateTime = 0; // When was the last vibration?
unsigned long alertStartTime  = 0; // When did the alert start?

// ── SETUP: runs ONCE when Arduino powers on ───────────────────
void setup() {
  pinMode(VIBRATION_PIN, INPUT);   // Sensor sends data IN
  pinMode(GREEN_LED,    OUTPUT);   // LED goes OUT
  pinMode(RED_LED,      OUTPUT);   // LED goes OUT
  pinMode(BUZZER,       OUTPUT);   // Buzzer goes OUT

  Serial.begin(9600); // Start serial monitor for debugging
  Serial.println("MakeMindz Laundry Monitor Ready! 🧺");

  // Quick startup blink to confirm circuit is working
  startupBlink();
}

// ── LOOP: runs FOREVER ────────────────────────────────────────
void loop() {
  int vibration = digitalRead(VIBRATION_PIN); // Read sensor (0 or 1)
  unsigned long now = millis();                // Current time in ms

  // ── VIBRATION DETECTED (machine is running) ───────────────
  if (vibration == LOW) {          // SW-420 gives LOW when vibrating
    lastVibrateTime  = now;         // Reset the silence timer
    machineWasRunning = true;      // Machine has run at least once
    alertGiven       = false;      // Reset alert for next cycle

    // Blink green LED to show washing in progress
    digitalWrite(GREEN_LED, HIGH);
    delay(200);
    digitalWrite(GREEN_LED, LOW);
    delay(200);

    digitalWrite(RED_LED, LOW);    // Keep red LED off
    digitalWrite(BUZZER,   LOW);    // Buzzer off

    Serial.println("🌀 Washing in progress...");
  }

  // ── NO VIBRATION ─────────────────────────────────────────
  else {
    digitalWrite(GREEN_LED, LOW);  // Green LED off

    // Check if machine was running and silence has lasted 30s
    if (machineWasRunning
        && !alertGiven
        && (now - lastVibrateTime >= SILENCE_THRESHOLD)) {

      // ── LAUNDRY DONE! Alert! ─────────────────────────────
      Serial.println("✅ LAUNDRY DONE! Go get your clothes!");

      alertGiven = true;            // Don't alert again until next cycle
      alertStartTime = now;

      digitalWrite(RED_LED, HIGH);   // Red LED on
      digitalWrite(BUZZER,   HIGH);   // Buzzer on
    }

    // Turn off buzzer after BUZZER_DURATION, keep red LED on
    if (alertGiven && (now - alertStartTime >= BUZZER_DURATION)) {
      digitalWrite(BUZZER, LOW);      // Stop buzzing after 3 seconds
      // Red LED stays on until machine is used again
    }
  }
}

// ── STARTUP BLINK: flashes both LEDs 3 times ─────────────────
void startupBlink() {
  for (int i = 0; i < 3; i++) {
    digitalWrite(GREEN_LED, HIGH);
    digitalWrite(RED_LED,   HIGH);
    delay(200);
    digitalWrite(GREEN_LED, LOW);
    digitalWrite(RED_LED,   LOW);
    delay(200);
  }
  Serial.println("✅ System Ready!");
}
🧑‍💻
Open Serial Monitor! In Arduino IDE, press Ctrl + Shift + M (or Tools → Serial Monitor). Set baud rate to 9600. You'll see messages like "🌀 Washing in progress..." and "✅ LAUNDRY DONE!" printed in real time!

🧩 Code Explained (Simply!)

📌
Pin Numbers & Settings

At the top we tell Arduino which pins each component is connected to. We also set SILENCE_THRESHOLD = 30000 — that's 30,000 milliseconds = 30 seconds of silence before we call laundry "done".

🔁
Why millis() Instead of delay()?

delay(30000) would freeze the Arduino for 30 seconds — it couldn't check the sensor during that time! Instead, we use millis() which is like a stopwatch. We record WHEN the last vibration happened and keep checking if 30 seconds have passed. The Arduino stays responsive the whole time!

Why Is Vibration LOW?

The SW-420 sends a LOW (0V) signal when it detects movement. This might seem backwards! It's called "active low" logic — very common in electronics. Our code checks for vibration == LOW to detect the machine running.

🧠 Quick Quiz — Test Yourself!

❓ Why do we use a 220Ω resistor with the LEDs?

❓ What does the SW-420 sensor detect?

🏆 Upgrade Challenges

Finished the basic build? Try these fun upgrades to level up your project!

🟢 Easy
Custom Beep Pattern
Change the buzzer code to beep 3 short times instead of one long beep. Hint: use a for loop with digitalWrite(BUZZER, HIGH/LOW).
🟢 Easy
Adjust the Timer
Change SILENCE_THRESHOLD from 30 seconds to 10 seconds and test it. What happens if you set it too low?
🟡 Medium
Add an LCD Display
Connect an I2C 16×2 LCD to show "Washing..." or "Done! Get clothes!" messages. Use the LiquidCrystal_I2C library.
🟡 Medium
Count Wash Cycles
Add a counter variable that increases each time a full wash cycle is detected. Print "Cycle #3 complete!" on the Serial Monitor.
🔴 Hard
WiFi Notification
Swap Arduino Uno for an ESP8266/ESP32 and send a message to your phone via Telegram Bot or a simple web server when laundry is done!
🔴 Hard
OLED + Battery Pack
Add an SSD1306 OLED display showing a washing machine animation. Power it with a 9V battery pack for fully wireless use!

🛠️ Troubleshooting Guide

Green LED never blinks even when I shake the sensor

Check your wiring! Make sure the sensor's OUT pin goes to D2. Open the Serial Monitor — do you see any messages? If not, the sensor may not be getting power. Check VCC and GND connections.

LED is always on (not blinking)

The sensor sensitivity might be too high. Use a small screwdriver to turn the blue potentiometer on the SW-420 module clockwise to reduce sensitivity.

Buzzer doesn't make any sound

Make sure you're using an active buzzer (not passive). Check if the + and – pins are correct. Test by writing a quick code: digitalWrite(9, HIGH); delay(1000); digitalWrite(9, LOW);

Alert fires immediately, not after 30 seconds

Make sure SILENCE_THRESHOLD is set to 30000 (not 300 or 30). Also check that lastVibrateTime is being updated correctly when vibration is detected.

🔬 Science Corner — Real World Connections

🏭
Factory Machines
Engineers use vibration sensors to monitor huge machines in factories, detecting problems before they break down!
🌍
Earthquake Detection
Seismographs work exactly like our project — detecting vibrations in the ground. Our SW-420 is basically a mini seismograph!
🚗
Car Alarms
Car security systems use vibration sensors — if someone bumps your car, the alarm goes off. You just built something similar!
📱
Your Smartphone
Your phone has an accelerometer (like a fancy vibration sensor) that detects when you flip it for auto-rotate or count your steps!

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
Young inventors love it!
🖨️
3D Print
All parts
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course