Translate

Tuesday, December 28, 2021

Bathroom fan controller - the idea




Ok, here a quick and dirty project.

The idea is to build a bathroom fan controller.
One of the bathroom I have has no windows, only a fan to remove the humidity.

I'm tired to have manually to turn it on and off, so time to make this automatic.

What is it ?

The goal is to design and build a bathroom fan controller capable to automatically turn on the bathroom fan when the humidity of the room is above a threshold (changeable).
The fan can also be started manually for a fixed time.

Event/Action table

  • Humidity > upper threshold (above ~58%)
    • Fan ON
  • Humidity < lower threshold (below ~50%)
    • Fan OFF
  • Pushbutton pressed
    • Fan ON for about 5 minutes
    • After 15 minutes Fan OFF
    • Pushbutton pressed when Fan ON
      • Fan OFF

Shopping list

Quick and dirty, so let see what I have around.

Specifications

Turning automatically on the bathroom fan when the humidity is above a specific value and then turning it off when a predetermined level is reached but leaving the original control in place.

There are mainly 5 areas where to work :
  1. Location
  2. Enclosure
  3. Power supply
  4. Settings
  5. Feedback

Location

The location is critical because it can affect some design choices.
Where to put the sensor ?
On the wall ?
On the ceiling ?
How to connect the relay to the fan ?
Where to grab the power ?

The logistically ideal location would be close to the ON/OFF switch because is easy to have the relay put in parallel with the original switch.
Also usually not far away from the switch (at least in my bathroom) there is an outlet to be able to plug in a power supply for the circuit.

However having the sensor on the ceiling would be probably a better location to detect the humidity in the room but longer wires will be needed both for power supply and relay connections.

Enclosure

The location also can determine the type of enclosure.
Would be nice to put a new electric box just above the switch box and put everything in it, power supply and electronic, with the 3D printed cover to host the sensor, trimmer and led bar. 

Power Supply

The thermostat need to be powered.
Originally I considered to set up a parasitic power (like the one used in the X10 modules) however I'm not sure I can extract enough juice for that, not mentioning the more dangerous and time consuming setting and testing.

Looking around I did find a small power supply module : Diymore 5V Step Down module
It is small enough to be put in the same enclosure with the rest of the circuit, also if it is needed a kind of protection enclosure.

The alternative is to use a normal wall wart module, but that imply to have an outlet or anyway a live wire available to tap in.
The wall wart is ideal for many reasons, the only negative thing is aesthetic and logistic.

Settings

It is true I could just hard code the threshold values but is always better to be able to compensate somehow.
Even having the possibility to manually overwrite the thermostat using the original switch, is still better to be able to modify the trigger points.
Having enough inputs maybe a simple analog trimmer could be used to set up the humidity level.
A formula like :
  • FAN ON : base humidity + trimmer offset
  • FAN OFF : base humidity - 5% + trimmer offset

Feedback

Having a visual feedback is always nice.
A Neopixel  8 LED bar can provide some graphic feedback showing the read temperature and humidity level and eventually the relay status.
 

Schematic prototype

Nothing fancy, just the bare controller board and few components and connectors for sensor, strip LED and push button.


Since is something to be installed on a bathroom I preferred to do a PCB rather than have a wired board.


3D stuff


The idea is to cut a hole in the bathroom wall, add an electric box for retrofit jobs (i.e. not nailed to a stud) and install there the electronic.
But is nicer to have a custom plate where to install the sensor, the LED bar and the pushbutton, so, some work on Tinkercad and here the :

Outlet plate

The design is available on TinkerCad.
The plate is modeled after a standard US switch plate and also is designed to hold (glued) the PCB.
Front plate. In the middle the place for the sensor, on the right the space for the LED bar and above the sensor, the pushbutton hole

The back of the plate with the support for the components and on the right, the place for the PCB

Power supply cover

The power supply, a Diymore 5V Step Down module, need to be placed somewhere in the outlet box that host the rest of the circuit.
To avoid shorts and contacts I did print an small enclosure for the module.
The enclosure is available on TinkerCad



The plate and electronic


The next article on this project is about installation : Bathroom fan controller : installation







No comments:

Post a Comment