👔Automated Wardrobe Organizer
Build a Smart Closet! Motorized Shelves + Arduino Control
✨Your Smart Closet Awaits!
Tired of hunting for clothes? Build a smart wardrobe organizer with motorized shelves that move up and down with just a button press! Using Arduino, stepper motors, and RFID tags, you'll create a closet that knows what you own, where it is, and automatically brings your clothes to eye level. Welcome to the future of fashion! 👗👕
🎯What Your Smart Wardrobe Can Do:
🛠️Materials You'll Need
🎛️ Arduino UNO
Main controller for your smart closet
⚙️ Stepper Motor
NEMA 17 or similar (3+ shelf levels)
🔧 Motor Driver
A4988 stepper driver module
📡 RFID Reader
RC522 RFID module for clothing tags
🏷️ RFID Tags
50+ RFID cards/stickers for clothes
📺 LCD Display
16x2 LCD with I2C module
💡 LED Strip
WS2812B RGB LED strip (optional)
🌡️ Sensors
DHT22 temperature/humidity sensor
🔋 Power Supply
12V 5A PSU for motor + electronics
🎚️ Buttons & Switches
Buttons for manual shelf control
📦 Wardrobe Frame
Metal closet rod or aluminum pipes
🔌 Wiring & Connectors
Jumper wires, connectors, breadboard
📋Step-by-Step Build Instructions
Plan Your Wardrobe Design
• Sketch your closet layout
• Decide number of shelves (3-5 recommended)
• Measure shelf heights (should be 40-50cm apart)
• Plan cable routing for stepper motor
• Design RFID reader placement
Build the Mechanical Frame
• Use metal closet rod or aluminum pipes
• Create vertical tracks for shelf movement
• Mount stepper motor at top or bottom
• Build shelves with pulley/belt system
• Test smooth movement without power
Install the Stepper Motor & Driver
• Mount NEMA 17 stepper motor securely
• Attach to timing belt or pulley system
• Connect motor to A4988 driver
• Test motor response with 12V power
• Verify smooth shelf movement
Wire the Arduino & Sensors
• Connect A4988 to Arduino pins
• Wire RC522 RFID reader via SPI
• Connect LCD display via I2C
• Add DHT22 temperature sensor
• Test each component individually
Add Smart Features
• Install LED strip under shelves
• Add buttons for manual control
• Set up limit switches for safety
• Install power distribution board
• Organize wiring with cable ties
Upload Arduino Code
• Download Arduino IDE
• Copy complete code from below
• Install required libraries
• Upload to Arduino UNO
• Verify in Serial Monitor
Calibrate Shelf Positions
• Move shelves to identify home position
• Record stepper positions for each shelf
• Update code with calibration values
• Test precision of positioning
• Verify smooth stop at each level
Tag Your Clothes
• Attach RFID tags to clothing items
• Record tag ID and clothing description
• Organize items on shelves
• Update closet inventory in code
• Test RFID scanning with LCD display
Test Smart Features
• Test shelf movement precision
• Verify RFID detection accuracy
• Check temperature/humidity display
• Test LED lighting effects
• Verify all buttons work correctly
Celebrate Your Smart Closet! 🎉
• Press a button - shelves move!
• Scan RFID tag - see your item details
• Enjoy perfectly organized fashion!
• Show friends your smart wardrobe
• Never hunt for clothes again!
Complete Wiring Circuit Diagram
Arduino UNO to All Components
STEPPER MOTOR (NEMA 17) → A4988 DRIVER ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ A4988 Driver to Arduino: STEP Pin → Arduino Pin 3 (PWM) DIR Pin → Arduino Pin 2 ENABLE Pin → Arduino Pin 4 A4988 Power: VCC (12V) → 12V Power Supply GND → Power Supply GND Motor +A, +B → NEMA 17 Stepper Motor -A, -B → NEMA 17 Stepper RFID MODULE (RC522) → SPI ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SDA (CS) → Arduino Pin 10 SCK → Arduino Pin 13 MOSI → Arduino Pin 11 MISO → Arduino Pin 12 IRQ → (not used) GND → Arduino GND VCC → Arduino 3.3V LCD DISPLAY (16x2 I2C) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SDA → Arduino SDA (A4) SCL → Arduino SCL (A5) VCC → Arduino 5V GND → Arduino GND DHT22 TEMPERATURE SENSOR ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DATA → Arduino Pin 5 VCC → Arduino 5V GND → Arduino GND MANUAL BUTTONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ UP Button → Arduino Pin 6 (with 10K resistor to GND) DOWN Button → Arduino Pin 7 (with 10K resistor to GND) SELECT Button → Arduino Pin 8 (with 10K resistor to GND) LIMIT SWITCHES (Home/Top positions) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Home Limit Switch → Arduino Pin 9 Top Limit Switch → Arduino Pin A0 WS2812B RGB LED STRIP (Optional) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DIN → Arduino Pin A1 VCC → 5V Power GND → Power GND POWER DISTRIBUTION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12V Power Supply: 12V → A4988 VCC, Stepper Motor Power GND → All GND connections (common) 5V Regulator (from 12V): 5V → Arduino VIN, LCD, DHT22, LEDs GND → Power GND
💡Wiring Best Practices:
✓ Separate Power Lines: Use separate 12V and 5V lines to avoid voltage conflicts
✓ Shielded Cables: RFID antenna may need shielding to avoid interference
✓ Motor Cables: Keep stepper motor wires away from signal lines
✓ Common Ground: All devices must share the same ground (GND)
✓ Limit Switches: CRITICAL for safety - prevents motor damage
✓ Color Code: Use consistent colors: Red=12V, Black=GND, Others=Signal
💻Complete Arduino Code
Automated Wardrobe Organizer Control Code
// Automated Wardrobe Organizer with Arduino // Smart Closet with Motorized Shelves + RFID Tracking // Complete home automation for your clothes! #include#include #include #include #include // ========== PIN DEFINITIONS ========== const int STEPPER_STEP = 3; // PWM pin for stepper const int STEPPER_DIR = 2; // Direction pin const int STEPPER_ENABLE = 4; // Enable motor const int BUTTON_UP = 6; // Raise shelf const int BUTTON_DOWN = 7; // Lower shelf const int BUTTON_SELECT = 8; // Select shelf const int LIMIT_SWITCH_HOME = 9; const int LIMIT_SWITCH_TOP = A0; const int DHT_PIN = 5; // Temperature sensor const int RFID_CS = 10; // RFID chip select // ========== OBJECT INITIALIZATION ========== LiquidCrystal_I2C lcd(0x27, 16, 2); // LCD at address 0x27 DHT dht(DHT_PIN, DHT22); // Temperature/humidity MFRC522 rfid(RFID_CS, 53); // RFID reader (SPI) // ========== WARDROBE DATA ========== struct Clothing { String rfidTag; String name; String category; // "Shirt", "Pants", "Dress", etc. int shelfLevel; }; Clothing wardrobe[50]; // Store up to 50 clothing items int clothingCount = 0; // ========== SHELF POSITIONS ========== const int SHELF_LEVELS = 4; int shelfPositions[SHELF_LEVELS] = {0, 200, 400, 600}; // Stepper steps int currentPosition = 0; int targetPosition = 0; int currentShelf = 0; // ========== CONFIGURATION ========== const int STEPPER_SPEED = 1000; // microseconds per step bool motorMoving = false; bool stopMotor = false; void setup() { Serial.begin(9600); Serial.println("👔 Smart Wardrobe Starting..."); // Initialize LCD lcd.init(); lcd.backlight(); lcd.print("Smart Wardrobe"); lcd.setCursor(0, 1); lcd.print("Initializing..."); delay(2000); // Initialize sensors dht.begin(); SPI.begin(); rfid.PCD_Init(); // Initialize pins pinMode(STEPPER_STEP, OUTPUT); pinMode(STEPPER_DIR, OUTPUT); pinMode(STEPPER_ENABLE, OUTPUT); pinMode(BUTTON_UP, INPUT_PULLUP); pinMode(BUTTON_DOWN, INPUT_PULLUP); pinMode(BUTTON_SELECT, INPUT_PULLUP); pinMode(LIMIT_SWITCH_HOME, INPUT_PULLUP); pinMode(LIMIT_SWITCH_TOP, INPUT_PULLUP); // Initialize stepper motor digitalWrite(STEPPER_ENABLE, HIGH); // Disabled at start Serial.println("✅ Ready! Press buttons to control shelves"); // Load sample wardrobe data loadWardrobeData(); displayMainMenu(); } void loop() { // Read buttons if (digitalRead(BUTTON_UP) == LOW) { Serial.println("UP button pressed"); moveShelfUp(); delay(500); // Debounce } if (digitalRead(BUTTON_DOWN) == LOW) { Serial.println("DOWN button pressed"); moveShelfDown(); delay(500); } if (digitalRead(BUTTON_SELECT) == LOW) { Serial.println("SELECT button pressed"); selectShelf(); delay(500); } // Check for RFID tags if (rfid.PICC_IsNewCardPresent() && rfid.PICC_ReadCardSerial()) { String tagID = ""; for (byte i = 0; i < rfid.uid.size; i++) { tagID += String(rfid.uid.uidByte[i], HEX); } Serial.print("RFID Tag Found: "); Serial.println(tagID); // Find clothing with this tag findClothingByTag(tagID); rfid.PICC_HaltA(); } // Display current temperature static unsigned long lastTempCheck = 0; if (millis() - lastTempCheck > 10000) { // Check every 10 seconds displayTemperature(); lastTempCheck = millis(); } } // ========== STEPPER MOTOR CONTROL ========== void moveMotorSteps(int steps, bool direction) { // direction: true = forward, false = backward digitalWrite(STEPPER_ENABLE, LOW); // Enable motor digitalWrite(STEPPER_DIR, direction ? HIGH : LOW); motorMoving = true; for (int i = 0; i < steps && !stopMotor; i++) { // Check limit switches if (direction && digitalRead(LIMIT_SWITCH_TOP) == LOW) { Serial.println("⚠️ Top limit reached!"); break; } if (!direction && digitalRead(LIMIT_SWITCH_HOME) == LOW) { Serial.println("⚠️ Home limit reached!"); break; } // Pulse stepper digitalWrite(STEPPER_STEP, HIGH); delayMicroseconds(STEPPER_SPEED / 2); digitalWrite(STEPPER_STEP, LOW); delayMicroseconds(STEPPER_SPEED / 2); if (direction) { currentPosition++; } else { currentPosition--; } } digitalWrite(STEPPER_ENABLE, HIGH); // Disable motor motorMoving = false; stopMotor = false; Serial.print("Position: "); Serial.println(currentPosition); } void moveShelfUp() { Serial.println("Moving shelf UP..."); targetPosition = min(shelfPositions[SHELF_LEVELS - 1], currentPosition + shelfPositions[1]); int stepsToMove = targetPosition - currentPosition; if (stepsToMove > 0) { moveMotorSteps(stepsToMove, true); } } void moveShelfDown() { Serial.println("Moving shelf DOWN..."); targetPosition = max(0, currentPosition - shelfPositions[1]); int stepsToMove = currentPosition - targetPosition; if (stepsToMove > 0) { moveMotorSteps(stepsToMove, false); } } void moveToShelf(int shelfLevel) { // Move to specific shelf level if (shelfLevel < 0 || shelfLevel >= SHELF_LEVELS) return; Serial.print("Moving to shelf level "); Serial.println(shelfLevel); int targetPos = shelfPositions[shelfLevel]; int difference = targetPos - currentPosition; if (difference > 0) { moveMotorSteps(difference, true); } else if (difference < 0) { moveMotorSteps(-difference, false); } currentShelf = shelfLevel; } // ========== WARDROBE MANAGEMENT ========== void loadWardrobeData() { // Sample clothing items wardrobe[0] = {"AB12CD34", "Blue Shirt", "Shirt", 0}; wardrobe[1] = {"EF56GH78", "Black Pants", "Pants", 1}; wardrobe[2] = {"IJ90KL12", "Red Dress", "Dress", 2}; wardrobe[3] = {"MN34OP56", "Casual T-Shirt", "Shirt", 0}; clothingCount = 4; Serial.println("Wardrobe loaded with sample items"); } void findClothingByTag(String tagID) { for (int i = 0; i < clothingCount; i++) { if (wardrobe[i].rfidTag == tagID) { // Found the item! Serial.print("Found: "); Serial.println(wardrobe[i].name); // Move to correct shelf moveToShelf(wardrobe[i].shelfLevel); // Display on LCD displayClothingInfo(i); return; } } Serial.println("❌ Clothing not found in database"); lcd.clear(); lcd.print("Item Not Found"); delay(2000); } void selectShelf() { currentShelf = (currentShelf + 1) % SHELF_LEVELS; moveToShelf(currentShelf); } // ========== DISPLAY FUNCTIONS ========== void displayMainMenu() { lcd.clear(); lcd.print("Smart Wardrobe"); lcd.setCursor(0, 1); lcd.print("Level: "); lcd.print(currentShelf + 1); } void displayClothingInfo(int itemIndex) { lcd.clear(); lcd.print("Item: "); lcd.print(wardrobe[itemIndex].name); lcd.setCursor(0, 1); lcd.print("Category: "); lcd.print(wardrobe[itemIndex].category); delay(3000); displayMainMenu(); } void displayTemperature() { float temp = dht.readTemperature(); float humidity = dht.readHumidity(); if (isnan(temp) || isnan(humidity)) { Serial.println("DHT sensor error"); return; } Serial.print("Temp: "); Serial.print(temp); Serial.print("°C, Humidity: "); Serial.print(humidity); Serial.println("%"); // Optional: Display on LCD // lcd.clear(); // lcd.print("T:"); // lcd.print((int)temp); // lcd.print("C H:"); // lcd.print((int)humidity); // lcd.print("%"); }
📝Understanding the Code:
setup(): Initialize all sensors and motors
loop(): Continuously check buttons and RFID reader
moveMotorSteps(): Control stepper motor rotation
moveShelfUp/Down(): Move to adjacent shelf levels
moveToShelf(): Jump directly to specific shelf
findClothingByTag(): Search wardrobe database by RFID
displayTemperature(): Monitor closet climate
loadWardrobeData(): Initialize clothing inventory
📦Shelf Organization & Positioning
Everyday items you wear most often. This position is at eye level for quick access.
Jeans, casual shirts, comfortable outfits. Easy to reach and easy to move.
Dresses, formal wear, party outfits. Less frequently used but still accessible.
Winter clothes in summer, seasonal items. Auto-bring to eye level when needed!
📊Manual vs Smart Wardrobe Comparison
| Feature | Traditional Closet | Smart Wardrobe |
|---|---|---|
| Finding Clothes | Hunt through piles | Press button - shelf moves! |
| Item Tracking | Remember locations | RFID system knows everything |
| Organization | Manual sorting | Automated categorization |
| Temperature Control | No monitoring | DHT22 shows climate |
| Time Spent | 5-10 minutes | 30 seconds! |
| Wear Frequency | Guesswork | Automatic tracking |
| Cool Factor | Zero | 100%! 🤖 |
🧪Testing Your Smart Wardrobe
🔧Troubleshooting Guide
Common Problems & Solutions
✓ Check power supply (12V) is connected
✓ Verify A4988 driver is enabled
✓ Test motor directly with power
✓ Check Arduino pins 2, 3, 4 connections
✓ Clean and lubricate timing belt
✓ Check stepper microstep settings
✓ Verify power supply voltage (should be 12V)
✓ Adjust STEPPER_SPEED constant in code
✓ Check RC522 SPI connections
✓ Verify antenna cable is connected
✓ Try scanning different RFID tags
✓ Check if tags are initialized properly
✓ Check I2C address (default 0x27)
✓ Verify SDA/SCL connections (A4/A5)
✓ Try adjusting LCD contrast potentiometer
✓ Install LiquidCrystal_I2C library
✓ Check DHT22 power connection
✓ Verify data pin (Pin 5) connection
✓ Install DHT library from Adafruit
✓ Add 4.7k pull-up resistor to data line
✓ Check pull-up resistors (10k recommended)
✓ Verify button wiring to correct pins
✓ Increase debounce delay in code
✓ Test buttons with Serial Monitor
🚀Advanced Upgrades & Features!
Connect via Bluetooth to control from phone
Use ESP32 to control remotely from internet
AI suggests outfits based on weather
Track which clothes you wear most
Alerts for overflowing shelves
Take photos of each clothing item
Color-coded shelves by clothing type
Add heating/cooling for delicate fabrics
⚠️Safety & Important Notes:
✓ Adult Supervision: Always build with adult help
✓ Pinch Points: Motor and belt can pinch fingers - keep hands clear!
✓ Power Off: Always turn off before adjusting mechanical parts
✓ Limit Switches: CRITICAL for safety - always test them
✓ Proper Wiring: Incorrect wiring can damage Arduino or components
✓ Weight Limits: Don't overload shelves with too many clothes
🎓Skills You've Mastered!
✅ Stepper motor control and operation
✅ Arduino PWM (Pulse Width Modulation)
✅ RFID tag reading and database management
✅ I2C communication (LCD & sensors)
✅ Temperature & humidity sensing
✅ Mechanical design and motion systems
✅ Smart home automation basics
✅ Inventory management systems
✅ Safety switch implementation
✅ Real-world home robotics!

Comments
Post a Comment