Smart Wardrobe Bot: A Robot Closet That Finds Your Shirt! | MakeMindz

Smart Wardrobe Bot: A Robot Closet That Finds Your Shirt! | MakeMindz
ROBOTICS PROJECT FOR KIDS

What if your wardrobe could find your shirt for you? 🧥

Meet the Smart Wardrobe Bot — scan a tag, and the right shelf glows and slides open all by itself, showing off exactly the shirt you're looking for!

🧠 What Are We Building?

The Smart Wardrobe Bot is a mini smart closet that knows exactly where your clothes are. Every shirt gets a tiny RFID tag sewn or clipped onto its collar. When you scan a tag near the wardrobe's reader, the robot checks which shirt it is, lights up an LED right where that shirt sits, shows its name on a tiny OLED screen, and — for the big reveal — a motorized shelf slides out automatically to present it to you!

This project introduces real robotics ideas like RFID identification, motor control with limit switches, addressable LEDs, and small displays — all wrapped inside the coolest closet on the block.

🧰 Components Required

Everything you need, with approximate India pricing

ComponentQuantityApprox. Price (INR)
Arduino Uno R31₹550
MFRC522 RFID Reader Module + 3 RFID Tags1 set₹180
L298N Motor Driver Module1₹120
12V DC Geared Motor (with pulley/rack)1₹250
WS2812 Addressable Mini LED Strip (8 LEDs)1₹150
0.96" OLED Display (I2C, SSD1306)1₹220
Micro Limit Switch2₹30
Push Button1₹10
Buzzer (5V)1₹20
Breadboard1₹90
Jumper Wires (M-M, M-F)1 set₹99
12V Power Adapter / Battery Pack (for motor)1₹150
Nylon String or Drawer Slide Rail1₹150
Cardboard / Thin Plywood (mini wardrobe model)1 set₹300

💡 Source electronics from Robocraze, Flyrobo, or Robu.in. Wood/cardboard and drawer rails are available at any hardware or craft store.

🔌 Circuit Diagram

How everything connects to the Arduino Uno

Arduino Uno MFRC522 RFID SDA D10 SCK D13 MOSI D11 MISO D12 RST D9 L298N Motor Driver IN1 D5 IN2 D6 ENA D3 Limit Switches OPEN D7 CLOSE D8 Push Button Signal → D2 WS2812 LED Strip Data → D4 OLED SSD1306 SDA A4 · SCL A5 Buzzer Signal → A0 12V DC Motor via L298N OUT1/OUT2 Motor + Motor Driver run on separate 12V supply; share common GND with Arduino RFID reader runs on 3.3V — never connect it to 5V!

📌 Pin Connection Table

ComponentPin on ComponentArduino Pin
MFRC522 RFID ReaderSDA (SS)D10
MFRC522 RFID ReaderSCKD13
MFRC522 RFID ReaderMOSID11
MFRC522 RFID ReaderMISOD12
MFRC522 RFID ReaderRSTD9
MFRC522 RFID ReaderVCC3.3V (NOT 5V)
L298N Motor DriverIN1D5
L298N Motor DriverIN2D6
L298N Motor DriverENAD3 (PWM)
Limit Switch (Open)SignalD7
Limit Switch (Close)SignalD8
WS2812 LED StripData InD4
Push ButtonOne legD2 (other leg to GND)
Buzzer+A0
OLED SSD1306SDA / SCLA4 / A5

🛠️ Step-by-Step Build Guide

1

Build the Mini Wardrobe Frame

Cut a small wardrobe body from cardboard or thin plywood, about the size of a shoebox stood upright. Install a simple drawer slide rail so one shelf can move smoothly in and out.

2

Tag the Shirts

Stick or sew one RFID tag onto the inside collar of each shirt. Note down which tag belongs to which shirt — you'll need this for the code.

3

Mount the Motor & Slide Mechanism

Attach the DC geared motor to the drawer rail using a pulley and nylon string (or a rack-and-pinion strip). Fix the two limit switches at the fully-open and fully-closed ends of the rail.

4

Add the LED Strip & OLED

Run the WS2812 LED strip along the top of the shelf, with one LED positioned above each shirt. Mount the OLED screen on the front panel where it's easy to read.

5

Wire the Circuit

Connect the RFID reader, motor driver, limit switches, LED strip, OLED, button, and buzzer to the Arduino exactly as shown in the circuit diagram and pin table above. Keep the RFID reader on 3.3V only!

6

Upload the Code

Install the MFRC522, Adafruit_NeoPixel, Adafruit_GFX, and Adafruit_SSD1306 libraries in the Arduino IDE. Update the code with your own tag UIDs, then upload the sketch below.

7

Scan & Reveal!

Hold a tagged shirt's collar near the RFID reader. Watch the OLED show its name, the matching LED glow, and the shelf slide open automatically to reveal it! Press the button anytime to close the shelf.

💻 Arduino Code

Upload this sketch using the Arduino IDE (after installing the required libraries)

// Smart Wardrobe Bot - MakeMindz Robotics Project
#include <SPI.h>
#include <MFRC522.h>
#include <Adafruit_NeoPixel.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define RST_PIN   9
#define SS_PIN    10
#define LED_PIN   4
#define NUM_LEDS  3
#define BUZZER    A0
#define BUTTON    2
#define IN1       5
#define IN2       6
#define ENA       3
#define OPEN_SW   7
#define CLOSE_SW  8

MFRC522 rfid(SS_PIN, RST_PIN);
Adafruit_NeoPixel strip(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
Adafruit_SSD1306 display(128, 64, &Wire, -1);

// Replace these with YOUR tag UIDs (check Serial Monitor to find them)
byte shirtTags[3][4] = {
  {0x12, 0x34, 0x56, 0x78},  // Blue Shirt
  {0x9A, 0xBC, 0xDE, 0xF0},  // Red Shirt
  {0x11, 0x22, 0x33, 0x44}   // Green Shirt
};
String shirtNames[3] = {"Blue Shirt", "Red Shirt", "Green Shirt"};

void setup() {
  Serial.begin(9600);
  SPI.begin();
  rfid.PCD_Init();

  strip.begin();
  strip.show();

  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.clearDisplay();
  showMessage("Scan a Shirt!");

  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(ENA, OUTPUT);
  pinMode(OPEN_SW, INPUT_PULLUP);
  pinMode(CLOSE_SW, INPUT_PULLUP);
  pinMode(BUTTON, INPUT_PULLUP);
  pinMode(BUZZER, OUTPUT);
}

void loop() {
  if (digitalRead(BUTTON) == LOW) {
    closeShelf();
  }

  if (!rfid.PICC_IsNewCardPresent() || !rfid.PICC_ReadCardSerial()) return;

  int match = -1;
  for (int i = 0; i < 3; i++) {
    if (compareUID(rfid.uid.uidByte, shirtTags[i])) {
      match = i;
      break;
    }
  }

  if (match >= 0) {
    showMessage("Found: " + shirtNames[match]);
    highlightLED(match);
    tone(BUZZER, 1200, 300);
    openShelf();
  } else {
    showMessage("Unknown Item");
  }

  rfid.PICC_HaltA();
}

bool compareUID(byte* uid, byte* known) {
  for (int i = 0; i < 4; i++) {
    if (uid[i] != known[i]) return false;
  }
  return true;
}

void highlightLED(int index) {
  strip.clear();
  strip.setPixelColor(index, strip.Color(0, 255, 200));
  strip.show();
}

void showMessage(String msg) {
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0, 25);
  display.println(msg);
  display.display();
}

void openShelf() {
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  analogWrite(ENA, 180);
  while (digitalRead(OPEN_SW) == HIGH) { // keep moving until switch triggers
    delay(10);
  }
  stopMotor();
}

void closeShelf() {
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  analogWrite(ENA, 180);
  while (digitalRead(CLOSE_SW) == HIGH) {
    delay(10);
  }
  stopMotor();
  strip.clear();
  strip.show();
  showMessage("Scan a Shirt!");
}

void stopMotor() {
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, LOW);
  analogWrite(ENA, 0);
}

⚙️ How It Works

When you hold a tagged shirt near the RFID reader, the Arduino reads its unique ID and compares it against the list of known shirts. If it finds a match, it shows the shirt's name on the OLED screen, lights up the matching LED, plays a happy beep, and drives the DC motor forward until the open limit switch is triggered — sliding the shelf out automatically. Press the button whenever you're done, and the motor reverses until the close limit switch stops it, tucking the shelf neatly back in.

❓ Frequently Asked Questions

How do I find my RFID tag's unique ID? +

Upload the standard MFRC522 "DumpInfo" example sketch, open the Serial Monitor, and scan each tag. It will print the UID bytes you need to enter into the code.

Can I use voice control instead of a button? +

Yes! Swap the push button for a small voice recognition module (like an Elechouse VR3) connected over serial. Train it to recognize a word like "close", and call the closeShelf() function when that command is detected.

Why does the RFID reader need 3.3V instead of 5V? +

The MFRC522 module's chip is only rated for 3.3V logic. Connecting it to 5V can permanently damage the reader, so always use the Arduino's 3.3V pin for power.

What if the shelf doesn't stop at the right spot? +

Double-check that your limit switches are positioned exactly at the fully-open and fully-closed points, and that they're wired with INPUT_PULLUP so they read LOW when pressed.

Can I add more than 3 shirts? +

Absolutely! Just add more UID entries to the shirtTags array, more names to shirtNames, and more LEDs to your strip — updating NUM_LEDS to match.

🚀 Upgrade Ideas

🗣️ Full Voice Assistant

Add a voice module so you can simply say a shirt's name — "Find my blue shirt!" — and skip the RFID scan entirely.

📱 Mobile App Control

Add an HC-05 Bluetooth module so you can open your wardrobe and see which shirt is where, right from your phone.

🧺 Laundry Reminder

Track how many times a shirt is scanned, and show a friendly OLED reminder like "Time for a wash!" after several wears.

🪞 Multi-Shelf Version

Add a second motor and limit switch pair to control multiple shelves — one for shirts, one for pants!

Educational Robotics & Coding for Young Innovators

📍 Chennai, India

✉️ hello@makemindz.in

© 2026 MakeMindz. All rights reserved.

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