Bathroom Exhaust Fan Controller –

The main purpose of a bathroom exhaust fan is to remove the moisture from the bathroom. It also helps eliminate bathroom odors and improve the quality of indoor air. If an unpleasant odour occurs in the bathroom, it can be drawn out through a bathroom exhaust fan to keep your bathroom ‘fragranced’ for the next user.

Now your bathroom exhaust fan can be smart as you can add an electronic fan controller. Installing a fan controller can help reduce wasting valuable electrical energy (no need to have your bathroom exhaust fan always run). A bathroom exhaust fan controller is a clever solution for forgetful people, as well.

Bathroom Exhaust Fan Controller

For little money you can definitely buy a bathroom exhaust fan controller via the usual channels, but a purchase is not recommended if you are an active electronics hobbyist. In this article, you can see the design details of an easy to build and budgetary bathroom exhaust fan controller. It is another simple do it yourself project.

This is the circuit diagram:

Note that this design idea is centered on the Quad 2-Input NOR Buffered B Series Gate CD4001B (IC1). The entire circuit is designed to be powered by a compact 12VDC SMPS module (HLK-PM12 3W) which is capable of catering 250mA of long time maximum output current ( It may not be necessary to use a 250mA power supply depending on your electromagnetic relay (RL1), but it is probably a good idea to go for it to introduce a substantial leeway.

Also note that there’re many bipolar junction transistors (BJTs) you can use to drive the electromagnetic relay and you can pick one depending on the current you need to control. To know the current required means knowing about the electromagnetic relay you want to use. Here I’m using the S8050 transistor (T1) because it’s what I have handy, and I still have a bunch of it in a storage box somewhere (

The BJT is a current driven device and will, given the chance, try to draw as much current as possible, ingesting the life out of the ‘weak’ NOR Gate. Since that’s hardly good, I added a current limiting resistor to stop it happening. See, I used a 1.8KΩ resistor (R4) as the base resistor of T1. Alternatively, you should choose the value for the base resistor depending on the coil resistance of your electromagnetic relay and the actual current required to operate it reliably. I already explicated how to do it in a number of articles published here before.

The wired magnetic door switch (DOOR-SENSOR) is an essential component of this project, because it lets the core electronics know when someone is opening and/or closing the bathroom door. While there are several different types of regular door sensors, most use an encapsulated reed switch and a permanent magnet to determine whether a door is opened or closed. Usually, the capsuled magnet is attached on the door itself, and the reed switch is attached (closely in parallel to the magnet) on the door frame. This setup creates a closed reed switch when the door is shut. As the door opens, the magnet and switch separates, opening the reed switch contacts.

The MC-38 wired magnetic door switch/sensor used in this project ( is very easy to install – by using a strong adhesive (or with the supplied screws), simply attach the encapsulated magnet part onto the door and the reed switch part to the door frame. That’s all.

The two parts must sit directly next to each other with only a narrow gap between them. If they’re too far away or aren’t parallel to one another, they can’t interact well and the magnetic door switch assembly won’t work as hoped-for (see a partial image of my test door below).

This design hopefully needs no explanation as it’s a pretty simple “textbook” circuit. During an entry, opening the bathroom door will wake up the controller circuit and it should kick the exhaust fan on instantly. Note that the exhaust fan retains its active state for a small amount of time (even after the door gets closed) which is already set by the potentiometer (P1). This process repeats once again during the exit time. That’s what I did!

An advantage of this little idea is that the power-hungry exhaust fan only comes on when it’s really needed and stops after a finite duration, it can help save on your energy bills. Interaction, the system happily admits an optional manual override switch which might be useful in some situations.

Below you can see the AC230V/20W “ventilation” fan I used to test my quick breadboard prototype. Look, both ventilation fans and exhaust fans work to create freshest air possible, the key difference between the two types is their intended application. While a ventilation fan works to bring clean air from outside, an exhaust fan removes pollutants from the indoor air. Since I only had a ventilation fan in my lab at the time, I used that one to test my prototype.

Moreover, I built my breadboard prototype with a Chinese version of the original CD4001B IC which has a bit funny part number – IW4001BN (made by IKsemicon

This is the link of its PDF (English) datasheet

As shown above, I prepared my quick test setup on a regular breadboard, and employed a breadboard-friendly “HF11F-012-1Z” miniature high power electromagnetic relay ( Hongfa-datasheet-17574975.pdf) to handle the AC230V test fan. The 12V DC relay has a coil resistance close to 360Ω, and a contact rating of 12A/250V AC.

Thankfully that setup worked as expected! The default timeout as observed is around 15 seconds (when P1 = 0Ω), however, you may have to do some tweaking in the RC timer section, but the 100uF capacitor (C2) does a good job setting the time period for the bathroom exhaust fan application.

Now that my design idea has been transferred to your workbench, you can begin the build of your own automatic bathroom exhaust fan system! Once you give the final assembly a suitable (waterproof) enclosure, you can easily install the controller in your bathroom. Keep an eye on the electrical interconnections though.

Next time I will be discussing steps I took to make this little design ready to work with an add-on humidity sensor circuitry that automatically controls the fan switch. Gone are the days when the bathroom fan is left running indefinitely. Ready to jump in?

To the very end…

  • Ventilation & Noise Mathematics: Air movement is typically measured in cubic feet per minute (CFM) which’s a standard measurement of bathroom exhaust fan airflow. Most bathroom exhaust fans will be rated from 50 to 110 CFM – the bigger your bathroom, the higher the CFM rating you’ll need. Further, sound level of a bathroom exhaust fan is rated usually in sones, not in decibels ( So, the lower the rating number, the quieter the fan. Here’s a consumer guide for bathroom exhaust fans

Leave a Comment