Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
BETTESWORTHConstruction
Arduino Uno

Automatic Clothesline Retrieval System Using Arduino Uno: A Safer, More Reliable Design

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

An Arduino Uno can automate a retractable clothesline by combining a rain sensor, light sensor, motor driver, and a motorized mechanical system that moves laundry beneath a roof or into a protected position. The original Arduino Project Hub project, published on December 21, 2021, is a useful prototype reference. For a practical outdoor installation, however, timed motor movement should be upgraded with limit switches, correctly sized power supplies, overload protection, manual controls, and a defined fault state.

The most important design decision comes before selecting the Arduino: determine whether the motor will turn a spool, pull a cable through pulleys, move a rack along rails, or drive a linear actuator. That mechanism establishes the required torque, travel, speed, motor current, and safety hardware.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the system does

An automatic clothesline retrieval system protects laundry when nobody is available to bring it indoors. Sensors monitor environmental conditions, and the Arduino decides whether the line should remain extended or move to a sheltered position.

“Retrieval” may mean pulling a rack beneath a roof, retracting a pulley-mounted line, winding cable onto a drum, moving a rail-mounted frame, or operating a linear actuator. In every case, the controller should separate three functions:

Popular on Amazon
Retractable Clothesline - Heavy Duty Indoor & Outdoor Clothes Line, 45 Feet | Portable PVC Retracting Wall Mount Laundry Line | For Outside & Inside Hanging Wet & Dry Clothing | Easy Installation (Grey)
  • Light And Compact – Lightweight Retractable Washing Line portable clothing line for your family. Now you can dry laundry indoors and outdoors. Excellent for Hotels, Patio, Balcony, Bathroom, Shower, Deck, Camping and more. Load up to 30 Lbs. Extendable up to 45 feet retractable hanging line.
  • Easy To Use – Mount our heavy duty retracting single line in seconds. Pull rope to any length that you want using the Lock Button. Retract the line after use to save space. You won’t have to drag heavy laundry ever again!
  • Top Quality – Sturdy, durable, and rust resistant. Our Retractable Laundry Hanger is Fully Assembled and ready to use. Beautiful closed outer case made from heat and crack resistant plastic. Keep your Tetractable cloths dryer protected for Years!
  • ✅ Versatile – Have fun drying Baby, Kids, and Adults clothes and sheets without having to pay massive electric bills. Use it while you travel. Our Retractable Clothesline is not just for you, it’s for your Family!
  • ✅ Feel Satisfied - Your satisfaction is our top priority, We'll make sure that your laundry day experience is full of fun and relaxation
  1. Request: rain, darkness, a manual command, or a scheduled event indicates that the line should move.
  2. Motion: the motor driver powers the motor in the required direction.
  3. Confirmation: a physical limit switch or position sensor confirms that the destination has been reached.

Rain protection and drying optimization are different goals. A rain sensor can detect water on its plate, and an LDR can estimate brightness, but neither one proves that clothes are dry.

The original Arduino Uno project

The original project lists an Arduino Uno Rev3, two 12 V DC motors, a rain sensor, two LDRs, two 10 kΩ resistors, a custom PCB, an LED, jumper wires, soldering equipment, and a 9 V battery with clip. Its published pin assignments are:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Function Pin
LED/state indicator D13
LDR analog input A1
Rain sensor digital output D2
Rain sensor analog output A0
Motor A enable/PWM D9
Motor A direction D8, D7
Motor B enable/PWM D3
Motor B direction D5, D4

The code uses a PWM value of 125, approximately 49% of the Uno’s 8-bit PWM range, and relies on delays of about 400 milliseconds, two seconds, and five seconds in different routines. The project page does not clearly identify the final motor-driver board.

This approach demonstrates the concept but should be treated as a prototype rather than a complete, unattended outdoor appliance. A delay assumes that the mechanism always travels at the same speed. Battery voltage, clothing load, wind, friction, cable winding, and obstructions can all change the travel time.

How the improved system should be organized

A dependable design has five layers:

  1. Environmental sensing: rain and optional light sensors collect readings.
  2. Decision logic: the Arduino applies calibrated thresholds, confirmation times, and hysteresis.
  3. Motor control: an H-bridge switches the motor’s higher-current supply and reverses direction.
  4. Mechanical transmission: a spool, pulley, belt, lead screw, rack, or actuator moves the clothesline.
  5. Position and safety feedback: limit switches, timeouts, current protection, and manual stops prevent uncontrolled operation.

A useful software state model is UNKNOWN, OUTSIDE, MOVING_IN, INSIDE, MOVING_OUT, and FAULT. The LED should indicate this explicit state; it should not be used as a substitute for knowing the mechanism’s actual position.

Also popular on Amazon
Retractable Clothesline - Indoor & Outdoor Wall Mounted Laundry Drying Line
  • NON-SAGGING & EXTRA TAUT – Built with GorillaGrip line tightener, GorillaLine Max keeps your clothesline firm and secure with no sagging, even when drying heavy wet towels, sheets, and laundry indoors or outdoors.
  • EASY TO INSTALL – Retractable clothesline installs in minutes. All hardware included for laundry room, balcony, or RV.
  • SPACE SAVING – One-touch retractable clothesline keeps small spaces tidy. Perfect for apartments, bathrooms, and RVs.
  • EASY TO USE – Heavy duty clothesline extends 16.4 ft for drying towels, linens, delicates, and baby clothes.
  • SAVE MONEY – Air dry laundry on your retractable clothesline to cut energy bills and protect fabrics.

Arduino Uno capabilities

The Uno R3 uses an ATmega328P and provides 5 V operation, 14 digital I/O pins, six PWM-capable outputs, six analog inputs, a 16 MHz clock, 32 KB of flash, 2 KB of SRAM, and 1 KB of EEPROM. Arduino lists 7–12 V as the recommended external input range and 20 mA as the recommended current per I/O pin. See the official Uno R3 documentation and Uno product specifications.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

These resources are sufficient for a basic two-sensor, two-direction controller. They are not sufficient to power the motors directly. Arduino pins should provide logic signals only; motor current must come through a correctly rated driver and separate motor supply.

Recommended hardware

Control and sensing

  • Arduino Uno R3 or a compatible Uno-class board
  • Weather-resistant rain sensor, preferably with a replaceable or more durable sensing surface
  • Optional LDR with a voltage-divider resistor, or a digital ambient-light sensor
  • Two mechanical limit switches: fully retracted and fully extended
  • Manual retract and extend buttons
  • Emergency-stop switch or accessible power disconnect

Motor and mechanical parts

  • Geared DC motor, linear actuator, or other actuator selected from torque, travel, speed, stall-current, and duty-cycle requirements
  • Dual H-bridge or appropriately sized single motor driver
  • Spool, pulleys, cable, guide rails, belt, coupling, or lead screw as required by the mechanism
  • Guarding around moving parts and a torque-limited coupling or slip mechanism where practical

Power and protection

  • Separate regulated 5 V logic supply and motor supply matched to the motor
  • Fuse or resettable overcurrent protection on the motor supply
  • Bulk capacitors near the motor driver
  • Flyback or transient suppression appropriate to the selected driver
  • Weatherproof enclosure, cable glands, strain relief, and outdoor-rated connectors

The parts list raises a power question: it names 12 V motors but also a 9 V battery. The available project material does not establish that this battery can provide adequate motor voltage, startup current, runtime, or stall protection. Verify the motor’s measured current and the battery’s discharge capability before using that arrangement.

Why a motor driver is essential

DC motors draw much more current at startup and during a stall than an Arduino I/O pin can safely deliver. An H-bridge provides the higher-current switching, reverses motor polarity, and may provide PWM speed control, braking, current sensing, or overload protection.

Arduino’s Motor Shield Rev3 uses an L298P dual H-bridge and is specified for 5–12 V operation, with listed current limits of up to 2 A per channel and 4 A total under its stated conditions. It requires external motor power. The L298P is an older bipolar design with appreciable voltage loss and heat generation, so a modern MOSFET-based driver may be a better choice for a battery-powered or heavily loaded mechanism.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Also popular on Amazon
Retractable Clothesline - Indoor Outdoor Wall Mounted Clothes Line
  • EASY TO INSTALL – Retractable clothesline installs in minutes. All hardware included for laundry room, balcony, or RV.
  • SPACE SAVING – One-touch retractable clothesline keeps small spaces tidy. Perfect for apartments, bathrooms, and RVs.
  • EASY TO USE – Heavy duty clothesline extends 14.1 ft for drying towels, linens, delicates, and baby clothes.
  • SAVE MONEY – Air dry laundry on your retractable clothesline to cut energy bills and protect fabrics.
  • INDOOR OUTDOOR – Wall mounted clothesline for wet towels, bed sheets, cloth diapers, and gym clothes.

Suggested improved pin map

Function Pin
Rain digital output D2
Retracted limit switch D4
Extended limit switch D5
Motor direction A D7
Motor direction B D8
Motor PWM/enable D9
Manual retract button D10
Manual extend button D11
Status LED D13
Rain analog output A0
LDR or light sensor A1

With INPUT_PULLUP, each limit switch can connect its input to ground when active. Confirm the polarity of the actual sensor module: rain boards do not all assert their digital output HIGH when wet.

Control sequence

At startup

  1. Set all motor outputs LOW and stop the motor.
  2. Read both limit switches.
  3. If only the retracted switch is active, set the position to INSIDE.
  4. If only the extended switch is active, set it to OUTSIDE.
  5. If neither switch is active, classify the position as intermediate and use a controlled homing routine or require manual recovery.
  6. If both switches are active, stop and report a fault because the wiring or mechanism is suspect.

When rain is detected

  1. Confirm the wet condition with several samples instead of reacting to one reading.
  2. Stop any outward movement.
  3. Move inward at a conservative speed.
  4. Stop immediately when the retracted limit switch activates.
  5. If the switch does not activate before a configurable maximum travel time, stop and enter FAULT.

When rain clears or darkness changes

Do not extend as soon as the rain plate appears dry. Moisture may remain on the plate, and a brief dry interval may be followed by another shower. Use a configurable dry confirmation period. For light detection, use hysteresis:

Retract when light < DARK_THRESHOLD
Allow extension only when light > LIGHT_THRESHOLD

The exact thresholds and delays must be calibrated at the installation site rather than copied as universal values.

Illustrative safety-oriented code structure

The following sketch shows the essential endpoint and timeout logic. It is not a verified drop-in program: motor direction, rain-output polarity, driver wiring, switch behavior, debouncing, dry-delay logic, manual controls, and fault reset behavior must be confirmed for the actual hardware.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
enum Position { UNKNOWN, OUTSIDE, INSIDE, MOVING_IN, MOVING_OUT, FAULT };
Position position = UNKNOWN;

const byte rainDigitalPin = 2;
const byte insideLimitPin = 4;
const byte outsideLimitPin = 5;
const byte motorIn1 = 7;
const byte motorIn2 = 8;
const byte motorPwm = 9;
const int motorSpeed = 125;
const unsigned long maximumTravelTime = 30000UL;

void stopMotor() {
  analogWrite(motorPwm, 0);
  digitalWrite(motorIn1, LOW);
  digitalWrite(motorIn2, LOW);
}

void moveInside() {
  digitalWrite(motorIn1, LOW);
  digitalWrite(motorIn2, HIGH);
  analogWrite(motorPwm, motorSpeed);
}

bool insideLimitActive() { return digitalRead(insideLimitPin) == LOW; }
bool outsideLimitActive() { return digitalRead(outsideLimitPin) == LOW; }

void setup() {
  pinMode(rainDigitalPin, INPUT);
  pinMode(insideLimitPin, INPUT_PULLUP);
  pinMode(outsideLimitPin, INPUT_PULLUP);
  pinMode(motorIn1, OUTPUT);
  pinMode(motorIn2, OUTPUT);
  pinMode(motorPwm, OUTPUT);
  stopMotor();

  if (insideLimitActive() && !outsideLimitActive()) position = INSIDE;
  else if (outsideLimitActive() && !insideLimitActive()) position = OUTSIDE;
  else if (insideLimitActive() && outsideLimitActive()) position = FAULT;
}

void loop() {
  bool rainDetected = digitalRead(rainDigitalPin) == HIGH;
  if (position == FAULT) { stopMotor(); return; }

  if (rainDetected && position != INSIDE) {
    unsigned long start = millis();
    position = MOVING_IN;
    moveInside();
    while (!insideLimitActive()) {
      if (millis() - start > maximumTravelTime) {
        stopMotor();
        position = FAULT;
        return;
      }
    }
    stopMotor();
    position = INSIDE;
  }
  delay(100);
}

A final controller should replace blocking loops and delays with a non-blocking millis()-based state machine. It should debounce switches, average sensor readings, implement dry and light hysteresis, support outward travel, provide manual override, log diagnostics over Serial, and offer a deliberate fault-reset procedure.

Also popular on Amazon
Clatoon Retractable Clothesline 9.0 Feets Adjustable, 304 Stainless Steel | Clothes Line Dryer with Heavy Duty Stainless Steel Rope String for Hanging Drying Bathroom, Laundry, Hotel, Indoor & Outdoor
  • Retractable: The heavy duty clothesline is auto retractable, the adjustable stainless steel line can extends up to 9.0 feets(about 2.7 m). The lock button can be used to lock any length within 9.0 feets. Note: Please tighten the nut after you pull the clothesline out. Based on the length, please roughly determine whether it meets the space you want to use
  • Save Space: The clothes line is very small, use it when you need it and easily put back into the shell when you are not using it, which is convenient and does not take up space. Please note that this retractable clothesline requires wall drilling to install
  • Widespread Use: The retractable clothesline is widely used for hanging wet bathing suits, clothes, delicates and some others that can't be machine dried. Great addition to any home, hotel, indoors & outdoors, laundry, balcony, shower room, bathroom and boat
  • Time-Proof: The surface of the clothesline’s main body and the steel wire are made of 304 stainless steel, which is more resistant to rust and brings more long-term company
  • High Weight Capacity: The clothes line retracting indoor is composed of thick steel wire rope with strong bearing force. Holds a maximum weight of 33 lbs when mounted

Sensor calibration and outdoor placement

Rain sensor

Common resistive rain modules are inexpensive but can corrode. Dirt, mineral deposits, condensation, splash, and prolonged moisture can all change their readings. Mount the sensing surface where it receives rain but is shielded from direct sun and mechanical spray. A small hood can reduce false triggers while still allowing rainfall to reach the plate.

For greater durability, consider a capacitive rain sensor, a replaceable water-drop detector, a covered drip sensor, or a commercial weather sensor. None of these predicts future rainfall; they only provide the information their sensing method is designed to measure.

Light sensor

An LDR’s readings depend on its resistance, divider resistor, mounting angle, shadows, artificial light, season, and cloud cover. Record the actual analog values in daylight and darkness, then set separate trigger and reset thresholds. If drying performance matters, add temperature and humidity measurements or use a weather service; an LDR alone is only a rough light detector.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Mechanical options

Mechanism Strengths Limitations
Geared DC motor and spool Simple forward/reverse control and useful low-speed torque Cable can wind unevenly; requires endpoint and jam protection
Pulley-driven line Can distribute force over a longer run Slippage, tension, and alignment affect repeatability
Rail-mounted rack Clear linear movement Needs rigid rails, guides, and obstruction protection
Lead screw or linear actuator Direct movement; some actuators include limit switches Higher cost and constraints on force, stroke, speed, and duty cycle
Stepper motor Controlled incremental movement Can lose steps under overload and still benefits from physical limits

Servo motors are generally better suited to small rotating mechanisms than long-travel, heavily loaded clotheslines.

Failure modes that matter outdoors

Sensor failures

  • Condensation falsely triggers rain protection.
  • The rain plate remains wet after a shower.
  • Corrosion changes the threshold.
  • Building shadows or artificial lighting confuse the LDR.
  • Long sensor cables pick up motor noise.

Use averaging, confirmation intervals, hysteresis, calibrated thresholds, separated wiring, and a dry-delay before extension.

Also popular on Amazon
Sale
Household Essentials Steel and Aluminum 5‑Line Retractable Wall‑Mounted Dryer Slim Space‑Saving Laundry Rack, White Finish
  • Steel and Aluminum 5‑Line Retractable Wall‑Mounted Dryer Slim Space‑Saving Laundry Rack, White Finish
  • A retractable wall‑mounted dryer with slim rectangular frame and five drying lines
  • Perfect for Modern, Minimalist, or Industrial interiors, adding sleek functionality to laundry spaces
  • Use it to air‑dry clothing, linens, or delicates while maximizing utility room or bathroom space
  • Made of durable steel with lightweight aluminum accents for stability and long‑lasting use

Mechanical failures

  • A garment catches on the frame.
  • The line jams, slips, or tangles.
  • Wind increases the load.
  • The gearbox stalls or strips.
  • The motor reaches a hard stop before a timed delay expires.

Use limit switches, a maximum travel timeout, current monitoring, guarded moving parts, a slip or torque-limited coupling, slow starts and stops, and an accessible emergency stop.

Electrical and software failures

  • Motor startup resets the Arduino.
  • The driver overheats or the battery voltage collapses.
  • Moisture reaches the PCB or connectors.
  • A failed sensor leaves the motor running.
  • A power interruption leaves the position unknown.
  • Long blocking delays prevent a timely response.

Separate logic and motor power paths, use a common ground where the driver is non-isolated, add appropriate suppression and bulk capacitance, fuse the motor supply, seal the enclosure, and stop on timeout or contradictory switch readings.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Programming and commissioning

For an Uno R3, install the Arduino IDE, connect the board with a data-capable USB cable, then select Tools → Board → Arduino AVR Boards → Arduino Uno. Menu wording can vary with IDE version and installed board packages. Select the correct serial port, compile, upload, and open Serial Monitor at the sketch’s baud rate, such as 9600 baud.

Commission the system in stages:

  1. Read rain and light sensors without connecting the motor.
  2. Test the driver’s direction and enable signals with motors disconnected.
  3. Run the motors unloaded.
  4. Test the mechanism without clothing.
  5. Test with a light load, then the intended load.
  6. Simulate rain and verify immediate inward movement.
  7. Verify that both limit switches stop motion.
  8. Test a jam, a missing limit signal, and a power interruption.
  9. Repeat many cycles before considering unattended operation.
  10. Protect the electronics from outdoor moisture; the exposed rain sensor is not a reason to expose the controller.

Is an Arduino Uno the right controller?

The Uno is adequate for a local prototype with a few sensors, switches, and a basic H-bridge. An ESP32 may be more appropriate when remote notifications or network forecasts are required. A commercial linear-actuator controller can be preferable when the mechanism already uses an actuator with integrated limits and current protection. A simple relay controller may suit a low-duty-cycle, one-direction arrangement, but it still needs endpoint and overload protection.

The Arduino board is only one part of the system. The motor, driver, actuator, mechanical transmission, power supply, enclosure, wiring, and safety hardware may cost more and determine reliability more strongly than the microcontroller.

Verdict

The Arduino Uno Rev3 is a capable controller for an automatic clothesline retrieval prototype. The original rain-and-light project provides a useful starting point, including its component list, pin map, and basic motor logic. For a serious outdoor build, do not rely on timed movement or the LED state alone. Add two physical limit switches, a properly rated H-bridge, separate and fused motor power, manual override, weather protection, sensor hysteresis, travel timeout, and a fault state before allowing the mechanism to operate unattended.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

Bestseller No. 2
Retractable Clothesline - Indoor & Outdoor Wall Mounted Laundry Drying Line
Retractable Clothesline - Indoor & Outdoor Wall Mounted Laundry Drying Line
CLOTHES LINE – Retracts instantly to hide away for a clean, minimalist look.; RUST PROOF - Designed with high-quality materials to prevent corrosion.
$34.99
Bestseller No. 3
Retractable Clothesline - Indoor Outdoor Wall Mounted Clothes Line
Retractable Clothesline - Indoor Outdoor Wall Mounted Clothes Line
CLOTHES LINE – Retracts instantly to hide away for a clean, minimalist look.; RUST PROOF - Designed with high-quality materials to prevent corrosion.
$30.99
SaleBestseller No. 5
Household Essentials Steel and Aluminum 5‑Line Retractable Wall‑Mounted Dryer Slim Space‑Saving Laundry Rack, White Finish
Household Essentials Steel and Aluminum 5‑Line Retractable Wall‑Mounted Dryer Slim Space‑Saving Laundry Rack, White Finish
A retractable wall‑mounted dryer with slim rectangular frame and five drying lines; 8" L x 36.5" W x 6.5" H
$79.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.