Jump to content

Bathroom Fan Control Solution


jrainey

Recommended Posts

Posted (edited)

Here is a simple setup to put a flexible timer system on your bathroom exhaust fan.  Hope someone finds it useful.

 

The objective is to let the fan run for a period of time after use, but to ensure that it shuts off in in a reasonable amount of time regardless.

 

The bathroom (in this case our man bathroom) has a fan and a light.  They are separately switched with insteon devices.

 

The light switch is pressed into the job of 'occupancy detector'  i.e. if the light is on it is assumed that the bathroom is occupied.

 

Goals of the program as as follows:

 

              1) provide a single place to set the timeout value

              2) start the timer when the fan is turned off

              3) keep the fan running if the light is on

              4) shut off the fan after the initial time out (with no light on) OR the full time ot time after the light has been switched off

 

Four programs combine to implement this: 

 

              1) MBFanSwON - Executes the timer.  Is initiated when the fa is switched on - passes control to a check program when te timeout is reached

              2) MBFanCheck - Checks the status of the light and either keeps the fan running or shuts the system down

              3) MBLightSwOFF - Resets the timer to allow full run time before shut down

              4) MBFanSwOFF - Shuts down the fan and stops the timer.

 

 

 

Program 1)  MBFanSwON  - Main Bathroom Fan Switch On

If
        Control 'BedAndbath / ~Devices / Main Bathroom Fan SW' is switched On
 
Then
        Wait  10 minutes 
        Run Program 'MBFanCheck' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 
A timer is started when the fan is turned on.  When it times out
control is passed to s check program to determine the next action.

This program is the central location to change the length of the fan run time - in this case it is set to 10 minutes

Program 2) MBFanCheck - Main Bathroom Fan Check - Please take note of the comment that the program must be disabled

If
        Status  'BedAndbath / ~Devices / Main Bathroom Light SW' < 20%
 
Then
        Run Program 'MBFanSwOFF' (Then Path)
 
Else
        Run Program 'MBFanSwON' (Then Path)
 
Note that this program must be set to DISABLED.  if it isn't it will
shut down the fan immediately when the light is turned off.

When called by the timer program, the status of the light is checked.

if the light is OFF the shut down program is called.

If the light is ON the timer program is called again.

Program 3) MBLightSwOFF - Main Bathroom Light Switch Off

If
        Control 'BedAndbath / ~Devices / Main Bathroom Light SW' is switched Off
    And Status  'BedAndbath / ~Devices / Main Bathroom Fan SW' is On
 
Then
        Stop program 'MBFanSwON'
        Run Program 'MBFanSwON' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 
Resets the timer if it is running.  Only runs if the light is switched off while the fan is running

This avoids starting the timer program if the fan is not running

 

   
Program 4) MBFanSwOFF - Main Bathroom Fan Switch Off 
If
        Status  'BedAndbath / ~Devices / Main Bathroom Fan SW' is Off
 
Then
        Stop program 'MBFanSwON'
        Set 'BedAndbath / ~Devices / Main Bathroom Fan SW' Off
 
Else
   - No Actions - (To add one, press 'Action')
 
The then action is to stop the timer program and shut down the fan.

this action is called by turning the switch off or after a time out when the 
light is either not turned on or turned off when the fan is running.

The goal of this is to ensure that the timer program is stopped whenever
the fan is stopped.
Edited by jrainey
  • Like 1
  • 1 month later...
Posted

Thats a lot of programs for such a simple task. You could simplify it by simply stating if the status of the light is off and the fan is on, wait x amount of time then turn the fan off.

  • 3 weeks later...
Posted

Thanks Lilyoyo1.

 

I was under the mistaken impression that once the timer started it would continue to run regardless of subsequent events. (i.e. if the light was turned on after the fan, the fan turn off early).

 

Wrong thinking on my part.  The event based programming sometimes confuses me.

Posted

I also have a simple program for the Fan to go ON for 1 minute when the Light goes OFF.  

I actually prefer this as the Fan is noisy and interferes with my contemplating  the world in  the splendid isolation of where King goes by himself.......

Posted

I also have my exhaust fans turning on based on humidity levels. The humidity levels are taken from Zwave Multi-sensors.

 

 

Sent from my iPhone using Tapatalk

Posted

Thanks Lilyoyo1.

 

I was under the mistaken impression that once the timer started it would continue to run regardless of subsequent events. (i.e. if the light was turned on after the fan, the fan turn off early).

 

Wrong thinking on my part.  The event based programming sometimes confuses me.

You're welcome. I was like that too when I first started with the ISY. I had a million programs just to do one thing. In time, it'll become second nature.

Posted

I use dew point to run exhaust fans now. It is more predictive of the desired resultant.

 

I discovered by exhausting air with a higher humidity than the outside air, I may still be increasing the humidity, instead of lowering it, once the incoming air is cooled down to the room temperature.

 

Dew Point comparisons eliminate this and it's easy to calculate.

  • Like 3
Posted

I've got analog sensors wired into an EZIO 2x4 module that auto on-off the fan. Works rock solid for two years running. The relay wall switch for the fan can override for 15 (normal) or 30 (fast on) minute intervals.

 

 

Sent from my iPhone using Tapatalk

Posted (edited)

I use dew point to run exhaust fans now. It is more predictive of the desired resultant.

 

I discovered by exhausting air with a higher humidity than the outside air, I may still be increasing the humidity, instead of lowering it, once the incoming air is cooled down to the room temperature.

 

Dew Point comparisons eliminate this and it's easy to calculate.

Easy to approximate! I set up the formula for my weather station, and the dew point formula was a bit of a puzzle for a while. Granted, I needed to use RPN, but still!

 

dewPoint=243.12,humidity,.01,6.112,17.62,5,9,/,tempF_BME,32,-,*,*,5,9,/,tempF_BME,32,-,*,243.12,+,/,EXP,*,*,*,LOG,*,440.1,-,19.43,humidity,.01,6.112,17.62,5,9,/,tempF_BME,32,-,*,*,5,9,/,tempF_BME,32,-,*,243.12,+,/,EXP,*,*,*,LOG,-,/,1.8,*,32,+

 

 

Personally, I just use humidity to shut off my bathroom fans. Lights too. If the humidity is up, someone is in the shower. We don't get excessive outdoor humidity here during the day.

Edited by builderb
Posted (edited)

Yeah. Dew point is only necessary where you compare two humidity levels.

I calculate mine, dynamically, using  ISY programs so Logs are not happenin' there.

 

My usage is my cold cellar running at 10-18C degrees, and if you bring in warmer and lower RH% air, very often you will increase the humidity RH% as the temperature drops.

 

 

Use  SOAP RPN, I do not. To do the work for me, I like my computers. :)

Edited by larryllix
  • Like 1
Posted

As a matter of inerest here is how I got around the log usage with ISY.

A simple calcualtion of %RH divided by a factor of 5 was offered elsewhere but the curve gets way off at one end of the range.

 

Note how this line has been used as an inline If/Then condition to fudge any humidity over 45%

...Repeat  While $Variable > 45

 

This is  to bring dewpoint resultant at that end of the curve, closer to the actual conversion curves .

 

 

I use three programs like this, for conversion of inside, outside and cold cellar %RH humidities  to dewpoint humidity readings.

Sync.DewPoint.in - [ID 0128][Parent 0101]

If
        $sHouse.humidity <= 100
     Or $sHouse.temperature <= 100
 
Then
        $House.dewPoint.scratch2  = 100
        $House.dewPoint.scratch2 -= $sHouse.humidity
        $House.dewPoint.scratch1  = $House.dewPoint.scratch2
        Repeat While $House.dewPoint.scratch1 > 45
           $House.dewPoint.scratch1 -= 45
           $House.dewPoint.scratch1 *= 0.7
           $House.dewPoint.scratch2 += $House.dewPoint.scratch1
           $House.dewPoint.scratch1  = 0
        Repeat 1 times
           $House.dewPoint.scratch2 /= 5
           $House.dewPoint.scratch2 -= $sHouse.temperature
           $House.dewPoint.scratch2 *= -1
           $sHouse.dewPoint.in  = $House.dewPoint.scratch2
 
Else
   - No Actions - (To add one, press 'Action')
 


  • Like 2
Posted

For my bathroom fan I set up three programs that provide a simple timer that will run the fan for 10 minutes for each time the ON switch is pressed.

 

 

First I created a STATE variable: sMasterBathFan with an initial value of 0.

 

 

The first program adds 1 to the state variable each time the on button is pressed:

MBA Fan - On - [ID 002C][Parent 002F]

If
        Control 'MBA Exhaust Fan' is switched On

Then
        $sMasterBathFan += 1

Else
   - No Actions - (To add one, press 'Action')

Then a program to zero the variable if the off button is pressed:

MBA Fan - Off - [ID 002E][Parent 002F]

If
        Control 'MBA Exhaust Fan' is switched Off

Then
        $sMasterBathFan  = 0

Else
   - No Actions - (To add one, press 'Action')

And a control program that will decrement the variable by 1 every 10 minutes and turn the fan off when the variable is 0:

MBA Fan - Control - [ID 002D][Parent 002F]

If
        $sMasterBathFan > 0

Then
        Wait  10 minutes 
        $sMasterBathFan -= 1

Else
        Set 'MBA Exhaust Fan' Off

I do plan on implementing humidity control whenever I get a sensor, but this set of programs work well for now.

Posted (edited)

Nice!

 

In the original programs you had a 20% detection, and have sinced removed the logic. What was the objective of that dim level?

 

BTW: I define constant Interger variables so that things look like this. (personal preference)

 

If         $sMasterBathFan is $cTRUE

Then   $sMasterBathFan  = $cFALSE

 

You can base logic on the state of another program and avoid the variable usage, but I prefer the variable technique myself.

 

You  do get 10, 20, 30, 40, 50 minutes with multiple On taps though. You may want to make a limit on that and a cancelling double tap Off too.

Edited by larryllix
Guest
This topic is now closed to further replies.

×
×
  • Create New...