Bathroom humidity controller
Capdiamont
Posts: 218
blockly.parallax.com/blockly/projectlink?id=60669&key=b3c7c1df-7866-4d00-b3fb-f7be386dd98f
Ongoing project. This works in Blocky, but I'm unable to load this in to Solo. I figure they will get there, not worried, and I think it is unable to load due to using user code block to calculate dew point.
When dew point is within threshold, fan turns on. Added with this version, adding time to light timer if dew point is within the threshold. The idea is to ensure the light is not turned off when in the shower. That happened to my spouse.... oops. This uses the temperature/humidity, PIR, and light sensors. Light sensor is for future use.
Ongoing project. This works in Blocky, but I'm unable to load this in to Solo. I figure they will get there, not worried, and I think it is unable to load due to using user code block to calculate dew point.
When dew point is within threshold, fan turns on. Added with this version, adding time to light timer if dew point is within the threshold. The idea is to ensure the light is not turned off when in the shower. That happened to my spouse.... oops. This uses the temperature/humidity, PIR, and light sensors. Light sensor is for future use.
Comments
I saw @Capdiamont post and went “hey! Neat! I should build one!”. To which my wife replied “you see that yellow flippie-thingie on the wall? We call that a ‘switch’ and it controls the light and the fan just fine!!!”
Spoil-sport...
That kind of thinking is soooo 20th century, jeez!
I downloaded the latest Blocky Solo, to run on Big Sur and I adjusted thresholds to make it work. Works great under Big Sur. Did they adjust the custom block?
Three changes, made light time, a constant for long long to run the light. Next change was instead of stopping the light timer countdown, it increases the light timer to the light time constant. I'm hoping this makes it no longer turning off while in the shower. Last change is turn on the light if the fan is on, light level is low and motion is detected. This is so the person taking a shower doesn't need to be rescued or grope around for the switch. I resisted doing the last part because I didn't want the light to come on automatically at night, as I hardly need the light at night.
Update: Light comes on when motion detected and light is low, regardless if fan is on. More troubleshooting needed.
Not sure how I messed things up so badly. I had to use a file before this latest stint of programming to get things right. I have things so if motion is detected and fan is on, the light timer is lengthened by the starting amount, which is 1200. After making sure this works right, I'll try to add back the auto turn on if fan is on, light is low, and motion detected.
Quite a project! I also think occasionally about adding an automatic fan controller to my bathroom. But I'm a simpleton and I like simple solutions. My hardware-only approach would be to attach a thermistor to the copper hot water supply pipe feeding the shower. That and a fixed series resistor in a voltage divider arrangement gives an analog voltage corresponding to the pipe temperature. Feed that into an LM339 or LM393 (whatever's at hand) comparator and compare to an adjustable reference pot. Comparator output to relay to fan turns on immediately when hot water starts flowing, stays on for a while until the supply pipe cools down after the hot water is turned off. A bit of pot twiddling (ahem, empirical determination of performance coefficients) adjusts the delay. And of course I would add a 1M hysteresis feedback resistor to avoid oscillation at the setpoint.
Or, I could go the IoT route and alert Alexa that I'm heading for the shower...
... or just buy one. This is what I have in my bathroom to control the ceiling fan:
https://www.amazon.com/Honeywell-Wall-Mounted-Humidistat-H46C1166/dp/B06X9GMSBP
It works flawlessly.
-Phil
Jeepers, that humidistat is $120, PhiPi! Wow, you're smart AND rich! I'm proud to call you my friend!
It was way cheaper when I bought it 30 years ago!
-Phil
I just used a SPDT switch so the fan comes on with the light in one position and in the other position it was always on.
Under $5.00 at the hardware store or electrical supplier.
Been awhile. Though I also control the lights. One benefit is remade stuff doesn't suffer with my errors.
Been rethinking things, as I introduced errors. Realized my buttons for switching the thresholds, and manual/auto mode were all out of my Wife's reach. Opps. Just loaded this in my prop tonight, so will need to test. Buttons are more responsive and seem to do what I want. I no longer have set thresholds for summer/winter. Instead, upon power up, it waits a bit, and uses the calculated threshold and subtracts a bit, so fan doesn't go on. Further, if fan runs under automatic mode over two hours, it tightens the threshold. I changed the buttons to use loops to not flash as my timer method wasn't a good method, and I can make the lower buttons set the mode and recalculate the threshold depending on how long the buttons are pressed.
Going to add a window switch to have it not turn the fan automatically on.
Controls:
Fan manually on and off.
Light manually on and off.
Fan manually on, automatic off.
Light manually on and automatically off.
Fan automatically on and off.