Page 1 of 1
controlling ventilation with humidity sensor
Posted: Tuesday 27 December 2016 22:02
by manjh
I have a central ventilation system in my house that is controlled by Domoticz.
Also I have several temp/humidity sensors, and the light switch of the shower room is also detected.
In trying to optimize the fan speed, I am looking for an algorithm to decide when to switch the fan to high or medium speed, and when it can go back to low speed.
I am struggling with the target humidity value.
Think of this scenario. Humidity has a certain value when someone decides to take a shower. Humidity reading goes up. I could decide to switch the fan to medium. When the light in the shower room is switched off, I could decide to switch the fan to high. And humidity value should be going down.
But when do I decide to switch off? Ideally this would be when the humidity value of before the shower is reached again.
Any ideas for an algorithm? Store the hum-reading in a user variable, but only if the current reading is lower than the stored? Make the switching decision based on that?
Just to make it clear, it is not a problem to decide to switch the fan on. The challenge lies in figuring out when to switch it back to medium/low.
Re: controlling ventilation with humidity sensor
Posted: Tuesday 27 December 2016 22:31
by stlaha2007
A quick response as i'm working on that myself for the near future.
You can notice the rise when one is taking a shower. And you can also see how fast it rises without the vent and with the vent.
If you can capture the rise, then you can also capture the lowering of humidity.
A simple solution would be to monitor elapsed time and rise and elapsed time and lowering humidity.
Humidity is not very steady as it also depends on heating in the bathroom, and you'll gonna notice its gonna take twice the time to see humidity to reach normal value. And probebly not getting there as expected.
Re: controlling ventilation with humidity sensor
Posted: Tuesday 27 December 2016 23:10
by pvm
You can store the humidity value on the moment you turn on the ventilation system (medium) and try to reach that. If humidity however increases due to other factors than showering.... You need am extra offset
Re: controlling ventilation with humidity sensor
Posted: Tuesday 27 December 2016 23:21
by manjh
pvm wrote:You can store the humidity value on the moment you turn on the ventilation system (medium) and try to reach that. If humidity however increases due to other factors than showering.... You need am extra offset
I was thinking along those lines.
1. lights on: --> store current hun value and switch fan to medium
2. lights off: --> switch fan to high
3. switch fan to low when stored hum value is reached, or when fan has been on high for (say) 1 hour
The time limit is there to switch the fan off if the stored hum level can't be reached.
But there is also room for error... if I leave the shower and switch the light off, then remember I forgot something and go back in and switch the light back on. To prevent this...: execute step one conditionally, only when the fan is not already on medium or high.
I think I'll give this a try. Will report back with results in a little while.
Re: controlling ventilation with humidity sensor
Posted: Wednesday 28 December 2016 0:57
by pvm
Why not store the value when ventilation is turned on, instead of when light is switched on? (Or when ventilation is switched on in case the lights are also on?)
Re: controlling ventilation with humidity sensor
Posted: Wednesday 28 December 2016 9:22
by manjh
pvm wrote:Why not store the value when ventilation is turned on, instead of when light is switched on? (Or when ventilation is switched on in case the lights are also on?)
Because the light switch is my trigger: it indicates someone walked into the shower room. There are a few small windows in there, but they don't let enough daylight in. So I know that when the light is switched on, someone is about to take a shower. That is the moment I want to capture the humidity, and switch the fan to medium.
Once the light is switched off again, I can switch the fan to the high setting. Not before: the fan is powerful and quite noisy when switched to high!
So I know the light turning on is my startpoint. I think I will store the humidity level and add a few percent to it, just to keep things realistic. Getting back to that level wouild be good enough.
Re: controlling ventilation with humidity sensor
Posted: Wednesday 28 December 2016 10:54
by elmortero
I think could use this as a base script
https://www.domoticz.com/wiki/Humidity_control and adapt it to fit your needs.
It does almost everything you mentioned, just need to add something like "if fan is On and light is Off then set Fan speed to Medium"