Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Humidity controlled bathroom dryer during and after showering or sauna

Humidity controlled bathroom dryer during and after showering or sauna

Scheduled Pinned Locked Moved My Project
humidity
18 Posts 4 Posters 8.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    samppa
    wrote on last edited by
    #1

    I have arduino sensor measuring humidity of my bathroom with DHT22, alongside with an existing old mechanical humidity limit sensor (that is now used for backup in the logic). I have hooked the node also to booster mode switch of the air ventilation unit of the house and using weather sensor for reference outside humidity. The idea is to replace the mechanical "sensor" with a bit more intelligent logic that takes into account the weather outside and if it is too humid outside (hot summer) ventilating the bathroom does not reduce the internal humidity.
    All works good, except that I need to implement calculation of the mathematical formula for converting the outside relative humidity when the air is warmed up by the ventilation unit since the temperature changes the relative humidity value - non linearly.
    The "real" formula is too complex for PLEG math so I probably need to make linear approximation to simplify the math for the logic.

    BulldogLowellB D 2 Replies Last reply
    0
    • S samppa

      I have arduino sensor measuring humidity of my bathroom with DHT22, alongside with an existing old mechanical humidity limit sensor (that is now used for backup in the logic). I have hooked the node also to booster mode switch of the air ventilation unit of the house and using weather sensor for reference outside humidity. The idea is to replace the mechanical "sensor" with a bit more intelligent logic that takes into account the weather outside and if it is too humid outside (hot summer) ventilating the bathroom does not reduce the internal humidity.
      All works good, except that I need to implement calculation of the mathematical formula for converting the outside relative humidity when the air is warmed up by the ventilation unit since the temperature changes the relative humidity value - non linearly.
      The "real" formula is too complex for PLEG math so I probably need to make linear approximation to simplify the math for the logic.

      BulldogLowellB Offline
      BulldogLowellB Offline
      BulldogLowell
      Contest Winner
      wrote on last edited by
      #2

      @samppa

      how about converting to Dew Point:

      // dewPoint function NOAA
      // reference (1) : http://wahiduddin.net/calc/density_algorithms.htm
      // reference (2) : http://www.colorado.edu/geography/weather_station/Geog_site/about.htm
      //
      double dewPoint(double celsius, double humidity)
      {
      	// (1) Saturation Vapor Pressure = ESGG(T)
      	double RATIO = 373.15 / (273.15 + celsius);
      	double RHS = -7.90298 * (RATIO - 1);
      	RHS += 5.02808 * log10(RATIO);
      	RHS += -1.3816e-7 * (pow(10, (11.344 * (1 - 1/RATIO ))) - 1) ;
      	RHS += 8.1328e-3 * (pow(10, (-3.49149 * (RATIO - 1))) - 1) ;
      	RHS += log10(1013.246);
      
              // factor -3 is to adjust units - Vapor Pressure SVP * humidity
      	double VP = pow(10, RHS - 3) * humidity;
      
              // (2) DEWPOINT = F(Vapor Pressure)
      	double T = log(VP/0.61078);   // temp var
      	return (241.88 * T) / (17.558 - T);
      }
      
      // delta max = 0.6544 wrt dewPoint()
      // 6.9 x faster than dewPoint()
      // reference: http://en.wikipedia.org/wiki/Dew_point
      double dewPointFast(double celsius, double humidity)
      {
      	double a = 17.271;
      	double b = 237.7;
      	double temp = (a * celsius) / (b + celsius) + log(humidity*0.01);
      	double Td = (b * temp) / (a - temp);
      	return Td;
      }
      
      S 1 Reply Last reply
      0
      • BulldogLowellB BulldogLowell

        @samppa

        how about converting to Dew Point:

        // dewPoint function NOAA
        // reference (1) : http://wahiduddin.net/calc/density_algorithms.htm
        // reference (2) : http://www.colorado.edu/geography/weather_station/Geog_site/about.htm
        //
        double dewPoint(double celsius, double humidity)
        {
        	// (1) Saturation Vapor Pressure = ESGG(T)
        	double RATIO = 373.15 / (273.15 + celsius);
        	double RHS = -7.90298 * (RATIO - 1);
        	RHS += 5.02808 * log10(RATIO);
        	RHS += -1.3816e-7 * (pow(10, (11.344 * (1 - 1/RATIO ))) - 1) ;
        	RHS += 8.1328e-3 * (pow(10, (-3.49149 * (RATIO - 1))) - 1) ;
        	RHS += log10(1013.246);
        
                // factor -3 is to adjust units - Vapor Pressure SVP * humidity
        	double VP = pow(10, RHS - 3) * humidity;
        
                // (2) DEWPOINT = F(Vapor Pressure)
        	double T = log(VP/0.61078);   // temp var
        	return (241.88 * T) / (17.558 - T);
        }
        
        // delta max = 0.6544 wrt dewPoint()
        // 6.9 x faster than dewPoint()
        // reference: http://en.wikipedia.org/wiki/Dew_point
        double dewPointFast(double celsius, double humidity)
        {
        	double a = 17.271;
        	double b = 237.7;
        	double temp = (a * celsius) / (b + celsius) + log(humidity*0.01);
        	double Td = (b * temp) / (a - temp);
        	return Td;
        }
        
        S Offline
        S Offline
        samppa
        wrote on last edited by
        #3

        @BulldogLowell
        Good idea, but the outside temp and humidity comes from weatherundeground "sensor", so I have to do the dew point math in Vera3 with PLEG and there are no math functions like pow or log available. The Arduino sensor node that reports the bathroom humidity and temp does not know the outside temp or humidity values..

        Another workaround would be to install another DHT22 humidity sensor for the warmed up air to avoid the calculation altogether.. But I like the idea that some sensor data can also be calculated and estimated instead of measuring everything yourself :-)

        BulldogLowellB 1 Reply Last reply
        0
        • S samppa

          @BulldogLowell
          Good idea, but the outside temp and humidity comes from weatherundeground "sensor", so I have to do the dew point math in Vera3 with PLEG and there are no math functions like pow or log available. The Arduino sensor node that reports the bathroom humidity and temp does not know the outside temp or humidity values..

          Another workaround would be to install another DHT22 humidity sensor for the warmed up air to avoid the calculation altogether.. But I like the idea that some sensor data can also be calculated and estimated instead of measuring everything yourself :-)

          BulldogLowellB Offline
          BulldogLowellB Offline
          BulldogLowell
          Contest Winner
          wrote on last edited by
          #4

          @samppa

          So... use mySensors to fetch the values from Vera!

          S 1 Reply Last reply
          0
          • BulldogLowellB BulldogLowell

            @samppa

            So... use mySensors to fetch the values from Vera!

            S Offline
            S Offline
            samppa
            wrote on last edited by samppa
            #5

            @BulldogLowell
            You mean that I could request data from other sensors? How, and is that reliable?

            BulldogLowellB 1 Reply Last reply
            0
            • S samppa

              @BulldogLowell
              You mean that I could request data from other sensors? How, and is that reliable?

              BulldogLowellB Offline
              BulldogLowellB Offline
              BulldogLowell
              Contest Winner
              wrote on last edited by BulldogLowell
              #6

              @samppa

              Try pushing from vera by creating a scene that runs regularly (e.g. every 5 minutes) and insert this luup code:

              local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 60)  -- 60 is the device id of the WeatherUnderground 'sensor'
              luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="11;3", variableId="VAR_1", value=temp}, 85) -- 85 is the device id of the node to which you are transmitting
              

              you have to modify the parameters, of course, but you get the picture....

              S 1 Reply Last reply
              0
              • BulldogLowellB BulldogLowell

                @samppa

                Try pushing from vera by creating a scene that runs regularly (e.g. every 5 minutes) and insert this luup code:

                local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 60)  -- 60 is the device id of the WeatherUnderground 'sensor'
                luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="11;3", variableId="VAR_1", value=temp}, 85) -- 85 is the device id of the node to which you are transmitting
                

                you have to modify the parameters, of course, but you get the picture....

                S Offline
                S Offline
                samppa
                wrote on last edited by
                #7

                @BulldogLowell said:

                @samppa

                Try pushing from vera by creating a scene that runs regularly (e.g. every 5 minutes) and insert this luup code:

                local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 60)  -- 60 is the device id of the WeatherUnderground 'sensor'
                luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="11;3", variableId="VAR_1", value=temp}, 85) -- 85 is the device id of the node to which you are transmitting
                

                you have to modify the parameters, of course, but you get the picture....

                Thanks I will try that. What should be the radioId="11;3", variableId="VAR_1" values?

                Is there a direct pull/request method? (But in that case I would have to hard code the child id to the code, or store it to variable container if that could be requested too..)

                BulldogLowellB 1 Reply Last reply
                0
                • S samppa

                  @BulldogLowell said:

                  @samppa

                  Try pushing from vera by creating a scene that runs regularly (e.g. every 5 minutes) and insert this luup code:

                  local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 60)  -- 60 is the device id of the WeatherUnderground 'sensor'
                  luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="11;3", variableId="VAR_1", value=temp}, 85) -- 85 is the device id of the node to which you are transmitting
                  

                  you have to modify the parameters, of course, but you get the picture....

                  Thanks I will try that. What should be the radioId="11;3", variableId="VAR_1" values?

                  Is there a direct pull/request method? (But in that case I would have to hard code the child id to the code, or store it to variable container if that could be requested too..)

                  BulldogLowellB Offline
                  BulldogLowellB Offline
                  BulldogLowell
                  Contest Winner
                  wrote on last edited by
                  #8

                  @samppa

                  this example shows how to receive the data

                  look at the getVariables() function and take notice of:

                  gw.begin(getVariables, RADIO_ID, false);
                  
                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    boozz
                    wrote on last edited by
                    #9

                    @samppa:

                    I know it's not the answer to your question, but it might be a solution to your problem :-) In my bathroom i am monitoring the hot-tap temperature (actual the supply line which is at the attick in my situation). Once it goes above 40º C my fan starts. This fan then continues running even if I stop showering as the pipe doesn't cools down rather slowly. Once the hot-tap pipe has gone below 35ºC the fan is stopped. Using a sensor on the hot-tap and a actuator (relay) for the fan.
                    I have been using humidity sensors for this purpose before and found them not to be very reliable on the long term (lasted less than 1 year working) . Thus this solution which is practical and very robust.

                    Regards,

                    Boozz

                    S 1 Reply Last reply
                    0
                    • B boozz

                      @samppa:

                      I know it's not the answer to your question, but it might be a solution to your problem :-) In my bathroom i am monitoring the hot-tap temperature (actual the supply line which is at the attick in my situation). Once it goes above 40º C my fan starts. This fan then continues running even if I stop showering as the pipe doesn't cools down rather slowly. Once the hot-tap pipe has gone below 35ºC the fan is stopped. Using a sensor on the hot-tap and a actuator (relay) for the fan.
                      I have been using humidity sensors for this purpose before and found them not to be very reliable on the long term (lasted less than 1 year working) . Thus this solution which is practical and very robust.

                      Regards,

                      Boozz

                      S Offline
                      S Offline
                      samppa
                      wrote on last edited by
                      #10

                      @boozz

                      Nice workaround, but I already have hot tap sensor, but that is used to keep the pipe always hot by controlling an auxiliary pump used to circulate hot water when not showering so that when opening the shower I do not have to wait long time before getting hot water since the pipes are quite long from the boiler.

                      B 1 Reply Last reply
                      0
                      • S samppa

                        I have arduino sensor measuring humidity of my bathroom with DHT22, alongside with an existing old mechanical humidity limit sensor (that is now used for backup in the logic). I have hooked the node also to booster mode switch of the air ventilation unit of the house and using weather sensor for reference outside humidity. The idea is to replace the mechanical "sensor" with a bit more intelligent logic that takes into account the weather outside and if it is too humid outside (hot summer) ventilating the bathroom does not reduce the internal humidity.
                        All works good, except that I need to implement calculation of the mathematical formula for converting the outside relative humidity when the air is warmed up by the ventilation unit since the temperature changes the relative humidity value - non linearly.
                        The "real" formula is too complex for PLEG math so I probably need to make linear approximation to simplify the math for the logic.

                        D Offline
                        D Offline
                        doctor64
                        wrote on last edited by
                        #11

                        @samppa There is a article (in Russian, unfortunately) where solved almost exactly this problem. (Ventilation of garage)
                        http://habrahabr.ru/post/244135/
                        If you wish i can try to translate, but basic idea of algorithm is to calculate absolute humidity for inside and outside, compare and turn ventilation if inside absolutely humidity bigger than outside with threshold 0.01 gram/m3. Also, if outside relative humidity is large than 90% ventilation does not performed, because it happen in very unusual case, like heavy rain outside, and ventilation in this case is pointless.

                        S 1 Reply Last reply
                        0
                        • S samppa

                          @boozz

                          Nice workaround, but I already have hot tap sensor, but that is used to keep the pipe always hot by controlling an auxiliary pump used to circulate hot water when not showering so that when opening the shower I do not have to wait long time before getting hot water since the pipes are quite long from the boiler.

                          B Offline
                          B Offline
                          boozz
                          wrote on last edited by
                          #12

                          @samppa

                          I agree, In that case it cannot be used, or the pipe from the circulation pipe to your shower should have some significant length.

                          BTW, although you may think it's useless (or at least less effective) when the outside humidity is higher than the interior humidity to use a fan, I think it is not (always). Depends on where the fresh air comes from (probably somewhere from the house were it is not as humid as in your bathroom....)
                          As long as you're able to get the humid air flowing to a place somewhere outside (using your fan) and the fresh air is less humid than in your bathroom it does have the effect you're looking for, even when it's raining outside!

                          Boozz

                          S 1 Reply Last reply
                          0
                          • D doctor64

                            @samppa There is a article (in Russian, unfortunately) where solved almost exactly this problem. (Ventilation of garage)
                            http://habrahabr.ru/post/244135/
                            If you wish i can try to translate, but basic idea of algorithm is to calculate absolute humidity for inside and outside, compare and turn ventilation if inside absolutely humidity bigger than outside with threshold 0.01 gram/m3. Also, if outside relative humidity is large than 90% ventilation does not performed, because it happen in very unusual case, like heavy rain outside, and ventilation in this case is pointless.

                            S Offline
                            S Offline
                            samppa
                            wrote on last edited by
                            #13

                            @doctor64 said:

                            @samppa There is a article (in Russian, unfortunately) where solved almost exactly this problem. (Ventilation of garage)
                            http://habrahabr.ru/post/244135/
                            If you wish i can try to translate, but basic idea of algorithm is to calculate absolute humidity for inside and outside, compare and turn ventilation if inside absolutely humidity bigger than outside with threshold 0.01 gram/m3. Also, if outside relative humidity is large than 90% ventilation does not performed, because it happen in very unusual case, like heavy rain outside, and ventilation in this case is pointless.

                            Thanks! Google translated sufficiently :-)
                            The absolute humidity idea seems simple and the formula is straightforward.

                            The only issue left is how to request data from other sensor so that calculation could be done in one node. @BulldogLowell suggested pushing the data, but that looks a bit complicated..

                            D 1 Reply Last reply
                            0
                            • B boozz

                              @samppa

                              I agree, In that case it cannot be used, or the pipe from the circulation pipe to your shower should have some significant length.

                              BTW, although you may think it's useless (or at least less effective) when the outside humidity is higher than the interior humidity to use a fan, I think it is not (always). Depends on where the fresh air comes from (probably somewhere from the house were it is not as humid as in your bathroom....)
                              As long as you're able to get the humid air flowing to a place somewhere outside (using your fan) and the fresh air is less humid than in your bathroom it does have the effect you're looking for, even when it's raining outside!

                              Boozz

                              S Offline
                              S Offline
                              samppa
                              wrote on last edited by
                              #14

                              @boozz

                              In my case the fresh air comes always from outside and through the ventilation unit where it is warmed up. @doctor64 got the point that in rare cases like hot summer rain the outside humidity makes ventilation pointless, or actually it makes the ventilation run full speed overnight since it does not dry the air.

                              By the way, thanks for everyone for great comments!

                              1 Reply Last reply
                              0
                              • S samppa

                                @doctor64 said:

                                @samppa There is a article (in Russian, unfortunately) where solved almost exactly this problem. (Ventilation of garage)
                                http://habrahabr.ru/post/244135/
                                If you wish i can try to translate, but basic idea of algorithm is to calculate absolute humidity for inside and outside, compare and turn ventilation if inside absolutely humidity bigger than outside with threshold 0.01 gram/m3. Also, if outside relative humidity is large than 90% ventilation does not performed, because it happen in very unusual case, like heavy rain outside, and ventilation in this case is pointless.

                                Thanks! Google translated sufficiently :-)
                                The absolute humidity idea seems simple and the formula is straightforward.

                                The only issue left is how to request data from other sensor so that calculation could be done in one node. @BulldogLowell suggested pushing the data, but that looks a bit complicated..

                                D Offline
                                D Offline
                                doctor64
                                wrote on last edited by doctor64
                                #15

                                @samppa Seems like high humidity in bathroom is a common problem, because i also plan to implement exactly this thing.
                                But, because i can't pump fresh air from outside, i live in multi apartment building, so i pump humid air from bathroom into existing ventilation system.
                                I think about just add second sensor to same node and check humidity in corridor, or may be use "dumb" node, there all calculations and decision about turning on/off the fan made at controller, OpenHab in my case. So i can take into account time of day, for example - i don't want to hear noise from the fan in the middle of night.

                                S 1 Reply Last reply
                                0
                                • D doctor64

                                  @samppa Seems like high humidity in bathroom is a common problem, because i also plan to implement exactly this thing.
                                  But, because i can't pump fresh air from outside, i live in multi apartment building, so i pump humid air from bathroom into existing ventilation system.
                                  I think about just add second sensor to same node and check humidity in corridor, or may be use "dumb" node, there all calculations and decision about turning on/off the fan made at controller, OpenHab in my case. So i can take into account time of day, for example - i don't want to hear noise from the fan in the middle of night.

                                  S Offline
                                  S Offline
                                  samppa
                                  wrote on last edited by
                                  #16

                                  @doctor64
                                  Ok, so you can do the logic in controller. I use Vera as the controller and PLEG for the logic, but it seems there is not enough math functions available for the dew point or absolute humidity calculations..

                                  D BulldogLowellB 2 Replies Last reply
                                  0
                                  • S samppa

                                    @doctor64
                                    Ok, so you can do the logic in controller. I use Vera as the controller and PLEG for the logic, but it seems there is not enough math functions available for the dew point or absolute humidity calculations..

                                    D Offline
                                    D Offline
                                    doctor64
                                    wrote on last edited by
                                    #17

                                    @samppa Sorry, i am not familiar with Vera and PLEG. As last resort, you can use OpenHab with Vera - i'm think Vera is ZWave controller?

                                    1 Reply Last reply
                                    0
                                    • S samppa

                                      @doctor64
                                      Ok, so you can do the logic in controller. I use Vera as the controller and PLEG for the logic, but it seems there is not enough math functions available for the dew point or absolute humidity calculations..

                                      BulldogLowellB Offline
                                      BulldogLowellB Offline
                                      BulldogLowell
                                      Contest Winner
                                      wrote on last edited by
                                      #18

                                      @samppa

                                      yes, but you saw the little point functions your arduino is very capable of, yes?

                                      if you post your attempt at a sketch to control your fan (or even pseudo code) we can certainly help you code it up for Vera.

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      20

                                      Online

                                      11.7k

                                      Users

                                      11.2k

                                      Topics

                                      113.1k

                                      Posts


                                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • MySensors
                                      • OpenHardware.io
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular