Projects / Monsoon clothes drying rack fan

Monsoon clothes drying rack fan

Beginner1.3 hGuided buildReviewed

Build it step by step

0 of 6 done
  1. NANOAHT20SHT3128.9°C

    Wire the fan driver

    Put the 10 kΩ pull-down on the gate and the diode across the fan first.

  2. NANOAHT20SHT3128.9°C

    Test the fan

    Temporarily set START_DIFF to -100 and check the fan spins from D9.

  3. NANOAHT20SHT3128.9°C

    Place the sensors

    Fix the AHT20 under the rack in the airflow and the SHT31 on a nearby wall away from it.

  4. NANOAHT20SHT3129.0°C

    Set the limits

    Put START_DIFF back to 5 and check the readings are sensible.

  5. NANOAHT20SHT3129.0°C

    Load the rack

    Hang damp clothes and watch the fan start.

  6. NANOAHT20SHT3129.0°C

    Run to dry

    Check it stops when the rack and room readings match.

In short

How do you build a monsoon clothes drying rack fan?

A humidity sensor under a drying rack runs a fan until the air around the clothes is as dry as the room, saving hours in the rainy season. You need Arduino Nano, AHT20 temperature and humidity sensor, SHT31 temperature and humidity sensor, MOSFET IRLZ44N, Resistor 10 kΩ, Schottky Diode 1N5819, 12 V DC fan 80 mm, 12 V 2 A DC adapter and SSD1306 OLED Display. It takes 6 steps and about 75 minutes.

Level
Beginner
Time
About 75 min
Parts
9

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
12 V adapter +Fan red wire and Nano VINSupply
12 V adapter -Nano GND, MOSFET source and sensors GNDCommon ground
Fan black wireMOSFET drainSwitched side
Schottky 1N5819Cathode to 12 V +, anode to MOSFET drainFan flyback diode
Nano D9MOSFET gate and 10 kΩ to GNDFan control
AHT20 (under the rack) SDA, SCLNano A4, A5I2C address 0x38
SHT31 (room air) SDA, SCLNano A4, A5I2C address 0x44
OLED SDA, SCLNano A4, A5I2C
Sensors and OLED VCCNano 5VPower

Code

Arduino IDE, board "Arduino Nano" (processor ATmega328P, or ATmega328P (Old Bootloader) for clones). Install "Adafruit AHTX0", "Adafruit SHT31 Library" and "U8g2". The Nano's VIN accepts up to 12 V but its linear regulator warms, which is fine for this light load; keep the Nano in open air. Run only a 12 V fan, and keep clothes and wet fabric away from the electronics so nothing gets splashed.

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

#include <Adafruit_AHTX0.h>
#include <Adafruit_SHT31.h>
#include <U8x8lib.h>

Adafruit_AHTX0 rack;
Adafruit_SHT31 room;
U8X8_SSD1306_128X64_NONAME_HW_I2C oled(U8X8_PIN_NONE);
const byte FAN = 9;
const float START_DIFF = 5.0, STOP_DIFF = 1.5;            // percentage points of humidity
const unsigned long MAX_RUN = 3UL * 3600UL * 1000UL;      // 3 hour limit
bool running = false;
unsigned long startedAt = 0, ranMs = 0;

void setup() {
  pinMode(FAN, OUTPUT);
  rack.begin();
  room.begin(0x44);
  oled.begin();
  oled.setFont(u8x8_font_chroma48medium8_r);
}

void loop() {
  sensors_event_t h, t;
  rack.getEvent(&h, &t);
  float rackRH = h.relative_humidity, roomRH = room.readHumidity();
  float diff = rackRH - roomRH;

  if (!running && diff > START_DIFF) { running = true; startedAt = millis(); }
  if (running && (diff < STOP_DIFF || millis() - startedAt > MAX_RUN)) { running = false; ranMs += millis() - startedAt; }
  digitalWrite(FAN, running);

  unsigned long mins = (ranMs + (running ? millis() - startedAt : 0)) / 60000UL;
  char b[17];
  snprintf(b, sizeof b, "Rack %2d Room %2d", (int)rackRH, (int)roomRH); oled.drawString(0, 1, b);
  snprintf(b, sizeof b, "Fan %s", running ? "ON " : "OFF"); oled.drawString(0, 3, b);
  snprintf(b, sizeof b, "Ran %lu min   ", mins); oled.drawString(0, 5, b);
  delay(5000);
}

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Empty rackFan stays off
Wet clothes hungRack humidity rises and the fan starts
Clothes dryFan stops when the difference is under about 1.5 points
Wet all dayFan stops after 3 hours

If it does not work

Fan always on

The MOSFET gate pull-down is missing or the sensors disagree. Compare them in open air.

Fan never starts

Check the I2C addresses and the 12 V supply.

Display blank

Check I2C wiring.

Nano resets when the fan starts

Add a 470 µF capacitor on 12 V near the fan.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the monsoon clothes drying rack fan?

Arduino Nano, AHT20 temperature and humidity sensor, SHT31 temperature and humidity sensor, MOSFET IRLZ44N, Resistor 10 kΩ, Schottky Diode 1N5819, 12 V DC fan 80 mm, 12 V 2 A DC adapter and SSD1306 OLED Display.

How long does the monsoon clothes drying rack fan take to build?

About 75 minutes for a beginner maker, in 6 steps.

How do I know the monsoon clothes drying rack fan works?

Empty rack: Fan stays off. Wet clothes hung: Rack humidity rises and the fan starts. Clothes dry: Fan stops when the difference is under about 1.5 points.

Fan always on: what should I check?

The MOSFET gate pull-down is missing or the sensors disagree. Compare them in open air.

Fan never starts: what should I check?

Check the I2C addresses and the 12 V supply.

Display blank: what should I check?

Check I2C wiring.

Nano resets when the fan starts: what should I check?

Add a 470 µF capacitor on 12 V near the fan.