⊞ Desktop C:\Projects\ExhaustFan\case-study.exe

Arduino · sensing · physical prototyping

Automated Exhaust Fan

My bathroom had no ventilation, so moisture built up and mould was a risk. I built a low-cost Arduino system that watches humidity and temperature, switches on a fan and sounds an alert when levels get too high, and shows live readings on an LCD.

Type
Arduino physical computing project
Hardware
Arduino Uno, DHT11, MOSFET, 12V fan, I²C LCD, piezo buzzer
Code
C++ (Arduino), SimpleDHT, LiquidCrystal_I2C
Purpose
Bathroom humidity & temperature control
Cardboard and clay model of a bathroom with the fan, breadboard and Arduino on the left wall and a blue LCD showing readings on the back wall
40°Ctemperature threshold that switches the fan on
2alert tones: 100 Hz for low, 2000 Hz for high severity
12Vexhaust fan switched through a MOSFET
💧 01_problem.txt
01

A damp bathroom

My bathroom lacked ventilation, which led to moisture build-up and a risk of mould. The exhaust fans I could buy were either manual or expensive.

Goal: a low-cost, automated system that would:

  • Detect spikes in humidity and temperature.
  • Switch on an exhaust fan and sound an alert.
  • Show the readings in real time.
SENSE

DHT11

Measures humidity and temperature.

ACT

MOSFET + fan

Switches the fan on when readings are too high.

SHOW

I²C LCD

Displays live temperature and humidity.

ALERT

Piezo buzzer

Two alert levels: low and high severity.

🔌 02_prototyping/
02

Research and prototyping

Learning from existing work

I adapted LIMPINGLIM's Humidity-Controlled Fan from Arduino Project Hub and expanded it with an LCD display (following SunFounder tutorials) and a buzzer (from what I'd done in class). I combined online resources with my own additions.

Hardware hurdles

Problem: the original schematic used an Arduino Nano, but I had an Uno. Solution: I redesigned the circuit:

  • Moved the DHT11 to pin 2.
  • Used the breadboard to distribute 5V.
  • Added a MOSFET to control the 12V fan.
Bench test on a desk: Arduino, breadboard, LCD and fan wired together next to a laptop
Bench testing the full circuit with the fan connected

Test 3: the fan switching on under temperature control.

⚙️ 03_fan_control.ino
03

Iterating on the code

LCD

I²C address conflicts

The LCD wouldn't show anything at first. I fixed it by testing both 0x27 and 0x3F and using the LiquidCrystal_I2C library.

SENSOR

Unreliable readings

The DHT11 readings were unreliable at first, so I switched to the SimpleDHT library, which made them stable.

Final logic

void loop() {
  byte temp, humidity;
  dht11.read(pinDHT11, &temp, &humidity, NULL);

  lcd.print("Temp:"); lcd.print((int)temp);
  lcd.print("Hum:"); lcd.print((int)humidity);

  if (temp > 40) {
    digitalWrite(Fan, HIGH);
    tone(buzzer, 2000); // High-pitched alert
  }
}
📦 04_assembly/
04

Physical assembly

Design goals

  • A minimal housing with the wires hidden.
  • The sensor placed near the shower so readings are accurate.

Process

  • Mock-up: a cardboard prototype.
  • Final build: an air-dry clay "bathroom" facade, with the components mounted on foam board.
Top-down view of the fan, relay, breadboard, Arduino and LCD mounted on a board
Components mounted on the board
✅ 05_testing.log
05

Testing and validation

TestHow
Fan activationUsed a hairdryer to simulate temperature spikes
Buzzer tonesTested frequencies: 100 Hz for low alerts, 2000 Hz for high alerts
LCD readabilityChecked under different lighting conditions

Unexpected issue: debris from the clay got into the sensor and interfered with the readings. Cleaning the sensor fixed it.

▶ demo.mp4

See it running

A demonstration of the working system.

📝 06_reflection.md
06

What I learned

This project turned a personal annoyance into something that works: the system now runs in my bathroom. It improved my circuit design (MOSFETs, I²C), sensor integration (DHT11 calibration) and rapid prototyping (clay and cardboard).

ADAPTABILITY

Nano to Uno

Switching boards meant rethinking the wiring.

DEBUGGING

Serial Monitor

It was essential for tracking down sensor errors.

FEEDBACK

Class critiques

Feedback from class is why I added the LCD, which wasn't in the original plan.

Future improvements

  • Visual alerts: an RGB LED to show humidity levels at a glance.
  • Energy efficiency: replace the 12V fan with a 5V USB fan.
  • Cloud logging: send data to an IoT service (e.g. Blynk) to see long-term trends.

Stack

Arduino UnoDHT11I²C LCDMOSFETC++PWM controlPiezo buzzerCircuit designUser-centred design