Automatic Clothes Folding Robot

Automatic Clothes Folding Robot | Fun Kids Robotics Project 🤖

Automatic Clothes Folding Robot

A Super Cool Robotics Project for Young Engineers! 🚀

⏱️ 2–3 Hours 🎓 Ages 10+ 💰 Under $50 🔧 Beginner Friendly ⭐ STEM Project

🎉 What Will You Build?

Imagine a robot that folds your clothes automatically — no more messy piles! That's exactly what we're going to build today. This project teaches you real engineering, coding, and electronics skills that actual engineers use every day!

🤖

Robotics

Learn how robots move and work in the real world

💻

Coding

Write real Arduino code that controls your robot

Electronics

Build actual circuits with motors and sensors

🔬

Engineering

Design and build a mechanical folding system

⚙️ How Does It Work?

Here's the magic behind your clothes folding robot!

👕

Place Clothes

You lay a shirt or cloth flat on the folding platform

📡

Sensor Detects

The IR sensor detects the cloth and signals the Arduino

🦾

Arms Fold

Three servo motors rotate the folding arms in sequence

Done!

Your cloth is neatly folded and ready to put away!

🛒 What You Need

Get all these things ready before you start building! Ask a grown-up to help you get the electronics parts.

🎛️ Arduino Uno Board
⚙️ Servo Motor SG90 × 3
🔋 9V Battery + Clip
📦 Thick Cardboard
🔴 IR Sensor Module
🔵 LED × 3 (Red+Green)
♻️ Resistors 220Ω × 3
🧶 Jumper Wires × 20
🔲 Breadboard
🖨️ USB Cable (for Arduino)
🔫 Hot Glue Gun
✂️ Scissors + Ruler

⚡ Circuit Diagram

Connect all your components exactly like this. Ask an adult to double-check your wiring before turning it on!

🔌 Wiring Connection Table

Component Pin/Wire Arduino Pin Notes
Servo Motor 1 (Left Arm) Signal PIN 9 Orange wire to pin, Red to 5V, Brown to GND
Servo Motor 2 (Right Arm) Signal PIN 10 Orange wire to pin, Red to 5V, Brown to GND
Servo Motor 3 (Top Flap) Signal PIN 11 Orange wire to pin, Red to 5V, Brown to GND
IR Sensor OUT PIN 7 VCC to 5V, GND to GND
Red LED (Busy) Anode (+) PIN 4 220Ω resistor on cathode to GND
Green LED (Done) Anode (+) PIN 5 220Ω resistor on cathode to GND
Power VIN / GND VIN + GND 9V battery to VIN and GND
ARDUINO UNO the robot's BRAIN 🧠 ~9 ~10 ~11 GND 5V 7 4 5 SERVO 1 Left Arm 🦾 Pin 9 SERVO 2 Right Arm 🦾 Pin 10 SERVO 3 Top Flap 🔽 Pin 11 IR SENSOR Detects Cloth 👕 Pin 7 RED LED Busy Light 🔴 Pin 4 GREEN LED Done Light ✅ Pin 5 9V BATTERY 🔋 — — — Wire connections (dashed for clarity) Servo 1 Servo 2 Servo 3 IR Sensor

🔧 Step-by-Step Instructions

Follow each step carefully. Take your time — great robots aren't built in a rush!

1

🗂️ Gather All Your Materials

Before you start, collect everything you need and lay it out on a clean table. Make sure you have an adult nearby to help with the hot glue gun and electronics.

💡 Pro Tip: Take a photo of your components so you know what everything looks like before you connect them!
2

📐 Build the Folding Frame

Cut cardboard into these pieces:

  • 1 large base plate: 35cm × 30cm (for the main folding surface)
  • 2 side arms: 15cm × 8cm each (the folding wings)
  • 1 top flap: 20cm × 8cm (folds the top down)
  • 4 small support blocks: 5cm × 5cm × 5cm

Use hot glue to reinforce all the edges. The frame needs to be sturdy!

💡 Pro Tip: Use corrugated cardboard (the kind with layers) — it's much stronger than thin cardboard!
3

⚙️ Attach the Servo Motors

Now we attach the servo motors to make the folding arms move:

  • Glue Servo 1 to the LEFT edge of the base — it will push the left arm up
  • Glue Servo 2 to the RIGHT edge of the base — for the right arm
  • Glue Servo 3 at the TOP center — it controls the top flap
  • Attach the cardboard arms to each servo horn with a small screw or glue
  • Test that each arm can swing fully without hitting each other
💡 Pro Tip: Make sure all servo horns start in the 0° position before attaching the cardboard arms!
4

⚡ Wire the Circuit

Time for electronics! Follow the circuit table above carefully:

  • Connect all three servo signal wires to Arduino pins 9, 10, 11
  • Connect all servo red wires to the 5V rail on your breadboard
  • Connect all servo brown/black wires to the GND rail
  • Wire the IR sensor OUT pin to Arduino pin 7
  • Add the LEDs with 220Ω resistors to pins 4 and 5
  • Connect the 9V battery to Arduino VIN and GND
💡 Pro Tip: Use red wires for power (+) and black wires for ground (-) — this is the standard that all engineers follow!
5

💻 Upload the Arduino Code

Open the Arduino IDE on your computer, copy the code below, and upload it to your Arduino. Make sure you select "Arduino Uno" as your board type in the Tools menu.

💡 Pro Tip: Don't have Arduino IDE? Download it free at arduino.cc — it's the same software professional engineers use!
6

🧪 Test and Calibrate

Before testing with real clothes, test with a piece of paper first:

  • Place the paper flat on the platform
  • Wave your hand in front of the IR sensor to trigger it
  • Watch all three arms fold in sequence
  • If the timing seems off, adjust the delay() values in the code
  • If arms hit each other, adjust the servo angles
💡 Pro Tip: Different clothes need different timing. A thick sweater needs slower folds than a thin T-shirt!
7

🎉 Show It Off!

Your robot is ready! Try it with different types of clothes and show your family and friends. You can even decorate your robot with stickers and paint to give it a personality!

💡 Challenge: Can you add a buzzer that beeps when folding is done? Or a timer to see how fast your robot folds?

💻 The Arduino Code

Copy this code exactly into your Arduino IDE. The comments (lines starting with //) explain what each part does — they're like a story about what the robot is thinking!

clothes_folder_robot.ino
// ============================================
//   🤖 AUTOMATIC CLOTHES FOLDING ROBOT
//   Written for Arduino Uno
//   Great STEM project for kids! 🚀
// ============================================

#include <Servo.h>   // This library makes servos easy to control!

// --- Create our three servo motor objects ---
Servo leftArm;    // Controls the left folding arm
Servo rightArm;   // Controls the right folding arm
Servo topFlap;    // Controls the top folding flap

// --- Pin numbers (which holes on Arduino) ---
const int LEFT_SERVO_PIN  = 9;
const int RIGHT_SERVO_PIN = 10;
const int TOP_SERVO_PIN   = 11;
const int IR_SENSOR_PIN   = 7;
const int RED_LED_PIN     = 4;   // Lights up when robot is busy
const int GREEN_LED_PIN   = 5;   // Lights up when folding is done!

// --- Servo angle positions (in degrees 0-180) ---
const int ARM_OPEN      = 0;    // Arm is lying flat (open position)
const int ARM_FOLD      = 90;   // Arm is folded up (folding position)
const int FLAP_OPEN     = 0;    // Top flap is open
const int FLAP_FOLD     = 85;   // Top flap folds down

// ============================================
//  SETUP - Runs ONCE when Arduino turns on
// ============================================
void setup() {
  // Tell Arduino which pins are inputs and outputs
  pinMode(IR_SENSOR_PIN, INPUT);
  pinMode(RED_LED_PIN,   OUTPUT);
  pinMode(GREEN_LED_PIN, OUTPUT);

  // Connect each servo to its pin
  leftArm.attach(LEFT_SERVO_PIN);
  rightArm.attach(RIGHT_SERVO_PIN);
  topFlap.attach(TOP_SERVO_PIN);

  // Move all arms to starting (open) position
  resetArms();

  // Start the Serial Monitor so we can see messages
  Serial.begin(9600);
  Serial.println("🤖 Clothes Folding Robot is READY!");

  // Blink both LEDs 3 times to say "Hello I'm on!"
  for (int i = 0; i < 3; i++) {
    digitalWrite(GREEN_LED_PIN, HIGH);
    delay(200);
    digitalWrite(GREEN_LED_PIN, LOW);
    delay(200);
  }
}

// ============================================
//  LOOP - Runs FOREVER, checking for clothes
// ============================================
void loop() {
  // Read the IR sensor (LOW means cloth detected!)
  int clothDetected = digitalRead(IR_SENSOR_PIN);

  if (clothDetected == LOW) {
    // YAY! We found a cloth to fold!
    Serial.println("👕 Cloth detected! Starting to fold...");
    delay(500);   // Small pause to make sure cloth is settled

    foldClothes();   // Run the main folding function!
  }

  // Keep checking every 100 milliseconds
  delay(100);
}

// ============================================
//  FOLD CLOTHES - The main folding sequence!
// ============================================
void foldClothes() {
  // Turn on red LED: "I'm busy folding!"
  digitalWrite(RED_LED_PIN,   HIGH);
  digitalWrite(GREEN_LED_PIN, LOW);
  Serial.println("🔴 Folding in progress...");

  // --- STEP 1: Fold the LEFT arm ---
  Serial.println("  ➡️  Folding left arm...");
  sweepServo(leftArm, ARM_OPEN, ARM_FOLD, 15);
  delay(600);   // Wait for cloth to settle

  // --- STEP 2: Fold the RIGHT arm ---
  Serial.println("  ⬅️  Folding right arm...");
  sweepServo(rightArm, ARM_OPEN, ARM_FOLD, 15);
  delay(600);

  // --- STEP 3: Fold the TOP flap down ---
  Serial.println("  ⬇️  Folding top flap...");
  sweepServo(topFlap, FLAP_OPEN, FLAP_FOLD, 12);
  delay(800);   // Extra time for top fold

  // --- STEP 4: Hold for a moment ---
  Serial.println("  ✋ Holding fold position...");
  delay(1500);

  // --- STEP 5: Reset all arms back to open ---
  Serial.println("  🔄 Opening arms back up...");
  sweepServo(topFlap,  FLAP_FOLD, FLAP_OPEN, 12);
  delay(400);
  sweepServo(rightArm, ARM_FOLD, ARM_OPEN, 15);
  delay(300);
  sweepServo(leftArm,  ARM_FOLD, ARM_OPEN, 15);

  // Turn on green LED: "All done, great job!"
  digitalWrite(RED_LED_PIN,   LOW);
  digitalWrite(GREEN_LED_PIN, HIGH);
  Serial.println("✅ Folding complete! Shirt is ready! 🎉");

  delay(2000);   // Keep green light on for 2 seconds
  digitalWrite(GREEN_LED_PIN, LOW);
}

// ============================================
//  SWEEP - Smoothly moves a servo from A to B
//  Makes movement smooth, not jerky!
// ============================================
void sweepServo(Servo &motor, int startAngle, int endAngle, int speedDelay) {
  if (startAngle < endAngle) {
    // Moving forward (0 → 90 → 180)
    for (int angle = startAngle; angle <= endAngle; angle++) {
      motor.write(angle);
      delay(speedDelay);
    }
  } else {
    // Moving backward (180 → 90 → 0)
    for (int angle = startAngle; angle >= endAngle; angle--) {
      motor.write(angle);
      delay(speedDelay);
    }
  }
}

// ============================================
//  RESET ARMS - Put all arms back to start
// ============================================
void resetArms() {
  leftArm.write(ARM_OPEN);
  rightArm.write(ARM_OPEN);
  topFlap.write(FLAP_OPEN);
  Serial.println("🔄 All arms reset to open position");
}

🛡️ Safety First!

Safety is the most important part of any engineering project. Real engineers follow these rules every single day!

👩‍👦

Get Adult Help

Always have a parent or teacher nearby when working with electronics and hot glue

🔌

No Power While Wiring

Always disconnect the battery before adding or changing any wires in your circuit

🌊

Keep Away From Water

Electronics and water don't mix! Work on a dry surface and keep drinks far away

🔥

Hot Glue Safety

Hot glue can burn! Let an adult operate the glue gun or supervise closely

🔍

Double-Check Wiring

Before turning on power, ask an adult to check your circuit connections

🏃

Keep Clear When Running

Stay back from the moving arms when the robot is folding — servo motors are strong!

❓ Frequently Asked Questions

Got questions? We've got answers! Here are the most common things young engineers ask about this project.

My servo motor isn't moving. What do I do?

First, check that the signal wire (orange) is connected to the correct Arduino pin (9, 10, or 11). Then check that the red wire goes to 5V and the brown/black wire goes to GND. If it still doesn't work, try a different servo motor — sometimes they can be faulty.

The IR sensor triggers by itself even without clothes. Help!

The IR sensor is very sensitive to light! Try moving your robot away from direct sunlight or bright lamps. You can also adjust the small blue potentiometer screw on the sensor to change its sensitivity — turn it slowly and test.

My Arduino code won't upload. What's wrong?

Make sure you have selected the right board (Tools → Board → Arduino Uno) and the correct port (Tools → Port → the one showing your Arduino). Also check that your USB cable actually supports data transfer — some USB cables only charge and can't send data!

The folding arms hit each other and jam! How do I fix it?

You need to adjust the arm angles in the code. Try changing the ARM_FOLD value from 90 to 75 or 80 degrees. Also add a slightly longer delay() between each arm folding so they don't try to move at the same time.

Can I make this robot fold bigger clothes like jeans?

Yes! You'll need to make the cardboard frame bigger and use stronger servo motors (try the MG996R servo — it's much more powerful). You may also need a separate 5V power supply instead of the Arduino's 5V pin, which can only power small servos.

What STEM skills am I learning with this project?

So many! You're learning mechanical engineering (building the frame), electrical engineering (wiring the circuit), computer science (writing Arduino code), physics (understanding how servo motors work using PWM signals), and even design thinking (testing and improving your robot).

🚀 Level Up Challenges!

Made your robot and it works great? Here are some awesome upgrades to try!

🔊

Add Sound!

Add a buzzer to play a happy song when folding is done

📟

LCD Display

Add a small LCD screen to show "Folding…" and "Done!"

📱

Bluetooth Control

Add a HC-05 Bluetooth module to control it from your phone

🔢

Fold Counter

Keep track of how many items your robot has folded today

🤖 Happy Building, Young Engineer!

You've just built a real working robot! Every professional engineer started exactly where you are right now — curious, creative, and not afraid to try new things.

⭐ Share Your Robot! 🔧 Keep Experimenting! 🚀 You're a Real Engineer!

Tags: Arduino Robot Project | Servo Motor Kids | Clothes Folding Machine | STEM Robotics | Kids Electronics | Beginner Arduino | School Science Project

© 2026 Kids Robotics Lab · Educational Content · Always build with adult supervision 🔒

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