Humidity Activated Bathroom Fan

bathroom humidifier

[Andrea] recently moved into an apartment with a few of his friends. Unfortunately the bathroom lacks one of the most important things — A fan. Or at least a window!

Using the case of an air freshener, a simple DHT11 Humidity/Temperature sensor, an LCD, a 12V fan, and ATmel328 microcontroller, he created this handy gadget.

When the humidity in the bathroom passes the 50% threshold, an LED flashes to prompt the user to open the door. After a short delay, one of the transistors flips causing the moist air to circulate out of the room.

We’re surprised the little 12V fan is powerful enough to clear the room, but apparently it helps a lot and can clear the room in less than 20 minutes.

To see it in action, stick around after the break.

This isn’t the first smart bathroom sensor though! We covered a project last year that uses a very similar setup.

Comments

  1. Darius says:

    No fan or window in the bathroom is against building code. The mold in that place must be atrocious.

  2. shkolarac says:

    I love the “Fourth line!” at 4th line of LCD :). And it kinda rihme with Uptime : .nice work btw

    • yeah :D this is because that very day I had gotten a 4×20 display in my mail, and before that moment I’ve always had only 2×16. Since the I2C interface works with arbitrary sized displays, I just plugged the new one and added one line of code to see it do something !

  3. Bill Cahill says:

    Do they make a methane sensor that would be sensitive enough for this project?

    • Node says:
    • Greenaum says:

      That’s a sorta urban myth, there’s not so much methane comes out yer arse. Mostly it’s CO2, air, hydrogen, and some other bits. The smell is from indoles and skatoles, since methane is of course odourless.

      Plus dampness works for damp from the shower etc. I dunno that it’s gonna detect toilet use, I suppose you could rig a sensor up. A rugged one might be a tip-sensor on the lever inside the tank that connects to the handle.

      And like Darius says, I thought it was illegal in most places to have no outside ventilation, either a duct or a window, in a bathroom.

      • Eirinn says:

        AFAIK not all people produce methane through digestion. Aka. not all people’s farts light up.

        • vonskippy says:

          Technically, NO person produces any gas, it’s the trillions of intestinal flora that produces the gas, averaging 1 liter (or more) a day, and most produce methane, along with CO2, H2. The wiki article that states that some people don’t produce methane is another fine wiki oddity that takes ONE (and only one) study and tries to state that as a given fact.

  4. fartface says:

    I have always wondered why built in fans dont have this feature and auto on and off based on humidity.

    • DainBramage1991 says:

      Humidity is a relative thing. Around here humidity levels seldom get below 50%, and are usually over 90% during the summer months. I imagine it would be difficult to make a device that would work well in all regions. It’s far easier (and far more robust) to just wire a 120v fan into a standard wall switch.

      • JamesInCA says:

        A contractor friend of mine puts a push-button timer in place of the fan switch in all his bathroom builds, so when you take a shower you can just set the timer for an hour and forget it. It really takes quite a while to clear the humidity out — it’s not just a matter of exchanging the air once, as you still have plenty of wet surfaces once you’ve pulled that first batch out.

      • Garbz says:

        You can still achieve the desired affect by monitoring the rate of change of humidity and the rate of change of temperature. If humidity goes up it’s usually because temperature goes down, until you hit the dew point where relative humidity pegs the 100% mark.

        However if humidity goes up and temperature goes up and all of this happens in a matter of seconds or minutes rather than hours then it’s likely something is causing steam.

        That said it wouldn’t be possible with a DHT11 since they aren’t sensitive enough to pick up changes in really high humidity.

    • Eirinn says:

      My grandfather’s fan has this feature, it’s a built in fan :)

    • John U says:

      But they do, they’re quite common and cheaper than the component parts of this build. Have a look at your local electrical wholesalers!

  5. Mickcy says:

    I don’t trust it. It looks too much like a turret from Portal to me :C

  6. Joakim says:

    Nice project if there is no existing fan in the bathroom. I had a different case in my home. I have a central air handling unit in my house which I hacked to reduce the humidity levels in my bathroom using an arduino. I take the liberty to provide the link to my blog here in case anyone is considering reducing humidity in their bathroom.

    http://diycrap.blogspot.no/2013/09/bathroom-ventilation-using-arduino.html?m=1

  7. supershwa says:

    Cool project. I have a DHT11 that’s been collecting dust – since I have roommates and similar issues with bathroom moisture I may rig something similar in the window (my bathroom window is fused shut due to caulking from poor construction before I moved in.)

  8. supershwa says:

    Pardon my noobishness (still learning a lot about electronic engineering,) but I noticed something strange – the schematic on the site shows an ATMega168, but he says he used an 328. I realize there are very minor differences between these, especially that you get twice the programmable memory on the 328, but I’m wondering which was actually used, and if he needed the 32k memory over 16k?

    I’m assuming you could use either, but I thought I’d check with the gurus first.

    • Greenaum says:

      Might be he planned on needing a 168 but had a 328 available, or his supplier only had a 328 available, etc. Since you can nearly always swap for a better component.

      Looking at it, this app doesn’t need as many pins as the Mega has, and I’d bet you could do it with hardly any ROM and no RAM. But people use the stuff they like, and have, and have the hardware / software / knowledge to program.

      • precisely. also, the schematic shows a 168 cause I guess it’s the default one in Fritzing, which I used to (badly) draw the schematic. probably forgot to change the part name, sry for that. It’s also most likely not the only mistake in that schematic

    • Garbz says:

      You do not need the extra memory. I have a device that reads temp, humidity, has an I2C display, multiple outputs controlled via I/O pins, a piezo buzzer, a voltage monitor (again I2C) and it all talks to the computer via serial comms. Fits on an ATMEGA88 with comfortable room to spare and I haven’t put any method into optimising my code.

      That said I don’t have the overhead of the Arduino bootloader. But surely that can’t take up 16k.

  9. vonskippy says:

    “one of the transistors flips causing the moist air to circulate out of the room.”

    I didn’t see any details on the magic transistor that can cause moisture to leave an area – do you have a spec sheet on that?

    Otherwise swishing moist air around with a tiny fan would have little to no effect since their isn’t an exit for the moist air to leave thru. Probably clears the room in 20 minutes because THE DOOR IS OPEN.

    • Greenaum says:

      > I didn’t see any details on the magic transistor that can cause moisture to leave an area – do you have a spec sheet on that?

      You use the moisture sensor with the voltage connected backwards.

    • easy mate.
      Let me reword: “the microcontroller activates the fan through a darlington switch”. This would probably be more correct.

      You may also be right when saying that possibly the open door is enough. Now let’s put it this way, the fan really has a nice output and at the very least it may help a little bit to let the air circulate.
      As you may notice by having a quick walk at your closest electronics store, they don’t really make such devices for everyday use, and this one shall be considered as just some random excuse to get better at electronics, as I’m a quite a beginner. cheers

      • vonskippy says:

        Get a ceiling exhaust fan at any home improvement shop, add your humidity sensor and switch and voila! there’s a ACTIVE solution.

        The sensor and switching part are great, it’s just that I doubt the small fan without a guided exhaust is doing much of anything but swirl moist air around.

  10. pff says:

    “can clear the room in less than 20 minutes.”
    same amout of time it takes to clear without the fan?

  11. Thomas says:

    Please note – that the 1N4004 Diode, D1, is incorrectly oriented across the Motor.
    As is shown, when Transistor Q2 is turned ON, via the µController, only 0.6 Vdc will be applied across the Motor; and, a large amount of Current will flow from the Battery through the D1 and Q2 to Ground.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 97,581 other followers