Transform Basic Bathroom Fan to Advanced




This is my first instructable !!

After i moving with my girlfriend in our new rent house, our new bathroom was equipped of an fan evacuator with a PIR sensor to evacuate humidity, every time we power ON the light of the bathroom, the FAN power on and made a lot of noise !!

I like every time my girlfirend goes to bathroom at night ...


FAN would be power ON if the humidity is higher than 75%


The door is closed (go for a dump)

Please, excuse my poor English.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: What Inside This Silent Fan ;p

+ No transformator => Problem: i cannot extract safe 5V out of the box.

+ No Relay => my Electronic education is not enough to drive a FAN.

... It is a good work from the manufacturer !

Step 2: Add Switch With Snubber Filter

I choosen to drive the FAN with dual relay with optocoupler input protection, the easy way to drive any thing from a µC

I'm very lucky that this dual relay go inside (i cut a litle bit the eges)

snubber filter :

Every time the relayes are cut off, one phenomenon is produced:

> µc reset alone.

The snubber filter (Capacitor in serial with Resistor) is wired in parallel with the FAN.

From Wiki:

Snubbers are frequently used in electrical systems with an inductive load where the sudden interruption of current flow leads to a sharp rise in voltage across the current switching device, in accordance with Faraday's law. This transient can be a source ofelectromagnetic interference (EMI) in other circuits.

Step 3: Add 5V Power Supply

Recover old LG Cell Phone charger to used as a power supply (230V => 5V 0.5A)

Step 4: Remaining Space

Take measures of remaining space where the PCB will be placed.

Step 5: Cut Useless Brace

Cut useless brace to win a little bit more spaces.

Step 6: Schematic Μc/Sensor

I chossen the Atmega 328p because I had several at home ^^

AM2302: The hygrometer/temperature sensor (1-wire bus)

Step 7: Led Driver

NPN Transistors working in saturation mode drived by µc.

Step 8: Door Detection

Infrared Proximity Sensor was built with an TCRT5000 and a LM324, the LM324 is aop used as an voltage comparator.

When the infrared light (from the IR LED) reflect a surface (bathroom door), the phototransistor leave the current to flow, The input 5 of LM324 is at +IRV and compare the voltage with the input 6 (bridge voltage divider), if the value is higher, the output 7 give 3.5V (5V - 1.5V).

N.B. IRV depend of how much IR is received.

Step 9: Lets Go to Disign the PCB

I design the PCB with Fritzing and take into acount the space available in the box.

Step 10: Test and Reshape the PCB

I reshape the PCB to avoid useful brace.

Step 11: Let's Go to Solder Components

While i welding components, i realize that i forget to place Quartz ! ... i improvise by welding one Quartz above the µc.

After welding all components, i test with 5V power supply, every time i test a new PCB i hold my breath before power ON power supply ... poiouff, this time, all work fine for first shot.

RED light: No communication with hygrometer sensor.

GREEN light: humidity < 75%

BLUE light >= 75%

N.B. All light color are bliking to say me, "i'am alive"

Step 12: Test FAN Drived by Μc + Try Close Housing

Temporary the LED go out.

Step 13: Mount the Proximity Sensor Near the Door

I do hole on the ceiling for passing the wires.

Step 14: Final Test

After calibrated the poximity sensor (set the potentiometer to detect the door)

I recovered the PIR cap to protect the LED from moisture.

while i take my shower, i remark that the sensor take a long wihle before detect moisture > 75% ... may be i must move the AM2302 near the hole where come the power.



    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Make It Fly Challenge

      Make It Fly Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    22 Discussions


    4 years ago on Introduction

    It's a fun solution for those who love prototyping circuits. Your issue with the humidity sensor could be addressed by cutting a large enough hole on the fan case to expose the humidity sensor to the ambient air. There is a reason why the sensor has many holes. I bet that would improve the response time greatly.

    That said, I find that an alternate solution would be to mount the motor on soft rubber washers or shocks. It's to reduce the transfer of noise to the case.

    That however doesn't address the fan coming on the whole time the light is on because one switch controls both light and fan. A solution I had explored is to buy one of those remote control switches (transmitter) that look like a wall switch and stick it next to the the light switch. If the receiver end doesn't fit inside the fan case, the receiver assembly can be taken out of it's own enclosure and placed inside the fan case. It's a neat solution and the receiver doesn't care about inductive or resistive loads because the receiver has a mechanical relay. I tried to implement that idea on my exhaust fan, but the enclosure for the fan is very tight around the fan itself, way too small to fit anything else in there, and it's in an old rental apartment.

    1 reply

    Reply 4 years ago on Introduction

    Yes, you are right, but i prefer move the sensor near the existing hole (high above) to avoid as much as possible moisture inside the fan case.


    4 years ago on Introduction

    I am curious why not just put a switch on the ac line next to light switch to allow it to be turned on and off independent of light seems like a lot of work not mention cost when a single double switch would have done the job would not have even had to install a new handy box just wire. or even a remote ir switch. Oh well very neat job and well laid out. Just feel its over kill.

    2 replies

    Reply 4 years ago on Introduction

    $1.90 2 Channel Relay Module With optocoupler

    $1.03 TCRT5000 Reflective Photoelectric Switch Infrared

    $0.99 Ultra-Bright 4 pin RGB Diffused Common Anode LED

    $0.99 NPN Transistor TO-92 2N2222

    $1.08 LM324N

    $3.40 AM2302 Digital Temperature And Humidity Sensor

    $1.75 ATMEGA328P

    x resistors

    x capacitors

    x PCB

    x wires

    ... the FAN belongs to the owner

    Total: 11.14 $


    Reply 4 years ago on Introduction

    There's this thing called building codes.

    In some locals, the light and fan must be connected to the same switch.


    4 years ago on Step 11

    I hope You're not welding it, rather than soldering, hi. ;-)

    Nice work, I will save it for later.


    4 years ago

    Very cool instructable! Way above my abilities but it's something that I would enjoy having and now I have an idea how to do it. Well done!


    4 years ago on Introduction

    This is exactly the sort of project I love to see on here... Hacking an everyday thing that everyone has and uses, and making an ordinary thing awesome. Great work! Thank you for sharing.


    4 years ago on Introduction

    If you buy Panasonic, there brand is extremely quiet. You can't hear it running while your next to it.


    4 years ago

    Very important to have a fan with some noise if you ever have guests; I don't want to hear what's going on in there, and most people don't want to be heard. Some fans even offer a noise option.