Monsoon clothes drying rack fan
Build it step by step
0 of 6 doneWire the fan driver
Put the 10 kΩ pull-down on the gate and the diode across the fan first.
Test the fan
Temporarily set START_DIFF to -100 and check the fan spins from D9.
Place the sensors
Fix the AHT20 under the rack in the airflow and the SHT31 on a nearby wall away from it.
Set the limits
Put START_DIFF back to 5 and check the readings are sensible.
Load the rack
Hang damp clothes and watch the fan start.
Run to dry
Check it stops when the rack and room readings match.
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
- Development BoardsBuyArduino Nano × 1
- SensorsBuy
- SensorsBuy
- SemiconductorsBuyMOSFET IRLZ44N × 1
- PassivesBuyResistor 10 kΩ × 1
- SemiconductorsBuy
- Motors & ActuatorsBuy
- PowerBuy
- DisplaysBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| 12 V adapter + | Fan red wire and Nano VIN | Supply |
| 12 V adapter - | Nano GND, MOSFET source and sensors GND | Common ground |
| Fan black wire | MOSFET drain | Switched side |
| Schottky 1N5819 | Cathode to 12 V +, anode to MOSFET drain | Fan flyback diode |
| Nano D9 | MOSFET gate and 10 kΩ to GND | Fan control |
| AHT20 (under the rack) SDA, SCL | Nano A4, A5 | I2C address 0x38 |
| SHT31 (room air) SDA, SCL | Nano A4, A5 | I2C address 0x44 |
| OLED SDA, SCL | Nano A4, A5 | I2C |
| Sensors and OLED VCC | Nano 5V | Power |
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.
| Check | Expected |
|---|---|
| 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 |
| Wet all day | Fan 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 →
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.
