Introduction
My house was built without a penetration for the clothes dryer vent. When drying clothes, it is important to first open the window and poke the vent pipe out. Occasionally one of my housemates (or I) forget to do this, causing the laundry room to become a sauna rain indoors (due to condensation on the ceiling). I devised an incredibly simple electrical solution – a circuit that cuts power to the dryer whenever the window is shut!
Circuit
To detect the position of the window, I attached a magnetic reed switch to the window frame and a magnet to the window. Some reed switches are closed when the magnet is present (window shut) which would do the opposite of what we want. I purchased a commonly available double throw reed switch. It has both normally open and normally closed contacts, saving the need for a transistor to invert the signal. The reed switch controls a relay, powered by a switch mode power supply. The relay is able to cut or supply power to the dryer. Here is a schematic of the circuit.
Components list
- Isolated AC to 12Vdc power supply
- SPDT reed switch & magnet
- 2x grommets
- Relay with 12Vdc rated coil and 10A 250VAC rated contacts
- Plastic case
- RGB colour changing LED
- 560Ω resistor to limit LED current
- 1N4001 diode to protect reed switch from relay coil back EMF
- 3.5mm audio plug & socket
- hookup wire
- 2M mains extension cord
Construction
I started by drilling holes in the case and fitting the grommets. Next, I arranged the relay and power supply, fixing them to the case with machine screws and a drop of thread locker on each nut to avoid them shaking loose with vibration (the finished unit sits on top of the dryer). Next, I completed the DC and AC wiring. I used an extension cord as a cheap and quick way of getting power in and out of the box. The neutral and earth wires pass through, while the phase wire is interrupted by the normally open contacts of the relay. The switch mode power supply connects to the mains side of the relay contacts. Finally, I drilled a hole in the lid and used glue to fix the LED in place. A printed label on the front finishes the job.
2022 Update – adding Wifi Power Measurements
It’s Feb 2022 now and almost 4 years to the day that I built the interlock circuit. It’s still going well and in that time I’ve only had one ‘tropical incident’ where I opened the window (activating power to the dryer) but didn’t put the hose out (got distracted as my phone rang at that exact moment!)
I decided to add a Sonoff Pow module to measure the clothes dryer’s power consumption. The purpose of this is to detect when the dryer has finished its cycle so that I can remove the clothes and start another load. The washing machine has a countdown display (though not particularly accurate) which one can use to set a timer, but the dryer uses a moisture sensor and thus cannot predict the run time. Also, I can actually tell how much energy is used to dry a load of washing.
I flashed the Sonoff with open source Tasmota firmware which makes it extremely easy to connect to Home Assistant. From there I was able to configure a HA notification to push to my phone (with HA app installed there) when the power draw drops below 7W for at least a minute. I chose this threshold as the dryer measures around 2-4W when idle and it does pause briefly sometimes when changing direction so the minute avoids any false triggers.
Warning: follow the instructions at the Tasmota website and ensure that the mains is DISCONNECTED before attempting to re-flash a Sonoff!
I also set the parameter (via Tasmota console) powerOnState 1 so that the Sonoff enables its relay at boot up since I am still using the separate relay for controlling the dryer based on the window being open.
Wiring in the Sonoff
I connected the Sonoff downstream of the interlock relay. This means that it goes offline when the window is shut, giving a sort of proxy for indicating the state of the window. If I were starting from scratch, it would be tempting to not bother with the relay & power supply since the Sonoff has its own relay and planty of GPIO which could be used to sense the window state. I would caution readers contemplating such an approach that although the power supply inside the Sonoff is isolated, the Pow model which has power measurement capability uses a current shunt in the phase path and thus the ESP is at 230V phase potential, so a direct GPIO connection to a read switch on the window would be unacceptably dangerous.
Caveats / future improvements
When opening the window, the Sonoff powers up. If the dryer is not started quickly enough, Home Assistant sees it go from unavailable / offline to running with power <7W while one is loading laundry. This causes an alert to be sent out. Having the Sonoff upstream of the relay so that it’s always powered would have avoided this.
I’m currently testing out a potential solution – adding the conditions that the dryer has been on for at least 2 minutes AND that the energy today >0.002kWH. This should prevent most false triggers. Additionally, setting TelePeriod 15 makes the power updates to Home Assistant occur every 15 seconds (default is 5 minutes) giving faster responses (you can go as much as every 10 seconds if you like) as well as setting PowerDelta 150 which causes an asynchronous update to HA whenever the power reading changes by more than 50W. See https://tasmota.github.io/docs/Commands/ for details.
To get rid of the relay & power supply, instead using the Sonoff’s internal relay, one could either develop an isolated connection to the window switch, or perhaps use an off-the-shelf Sonoff window/door reed switch module which one could use via Home Assistant to trigger operation of the relay in the dryer controller – a good?! excuse to add more IoT things to your home!