Humidity activated bathroom fan

Updated 3/10/2013 - Version 1.82 - Firmware version 2.3

This project was started because the apartment I recently moved in, that I share with two good friends, has no window in the bathroom. This causes the room to get filled with steam avery time someone takes even the briefest shower.

The device consists of a DHT11 Humidity/Temperature sensor, a 12V high-flux fan and a bright 12V warning LED, hooked up to an ATmel328 microcontroller, on which the Arduino bootloader was installed. This allows for easy firmware upgrade, performed simply by plugging a USB connector to pins 1-4, plus the optional self-reset pin.

Whenever the room humidity reaches a customizable threshold (50% by default), the device flashes the bright LED for a minute, to prompt the user to open the door of the room. After that delay, one of the two Darlington transistor boards kicks in and switches the fan on, causing the air within the room to circulate, until the humidity is restored below the threshold. The whole process takes ~20minutes.

The device was slightly overengineered to offer plug-and-play multi-display debug interfaces (using an I2C display board I made, see pictures).

The schematic for the whole circuitry looks like this:

The firmware to operate the device can be downloaded from here as an Arduino IDE project:

Download Firmware 2.3

The case for the device is an old bathroom perfume dispencer I had lying around, and it offers reasonable protection to the electronics.
All the electronics are built so that each individual part can be reused without desoldering.

There are three main parts to the system: (1) Power supply board, with variable input voltage 6-19Volts and regulated dual output 5V and 12V (2) Microcontroller board, wired to all the sensors and output peripherals (3) Two single-darlington transistor boards, to operate the inductive fan load and the LED using the uController pins.

Issues: when the device is operational for long time in very (>75%) humid environment, water condensates on the fan and water drops start dripping from it. Probably a different type of fan should be chose to ensure better reliability.

Here is a video of the device in action!