I guess, you probably know the problem – you turn on your washing machine in the cellar, it tells you the program will run for approx. 2 hours and during that two hours you maybe get distracted by other things so that when the machine is finished, you don’t have it in your mind, hence your wet / dried clothes rest in the machine for another X hours until you remember you had started the washing machine. As a result of this long period of not taking the clothes out of the machine, they might smell badly, get more wrinkles than if you would have directly taken them out etc.
So how can you prevent that? Most modern washing machines already come with an annoying beeping tone when the machine is finished in order to let you know it is finished (but what if you have your washer / dryer in the cellar and don’t even hear it?). There are even some smart connected machines on the market that can notify you via app when they are finished but they come for a comparably high price.
What I wanted to implement is a super easy, cheap mechanism which ensures my wife and I get proactively notified when the washer / dryer is finished. Also I was curious to get some statistics on how often we actually have the machines running in order to analyze and maybe even optimize the energy consumption.
What do you need?
You need
- either a) an Ethernet or b) a WiFi connection at the place where your washer and/or dryer sits (I decided for WiFi as I have good WiFi coverage all around my house, so there was no need to pull ethernet wires)
- A small electronics development board like a Raspberry Pi, an Arduino or an ESP8266/ESP32 (I decided for an ESP32 as of its low energy consumption compared to a Raspberry Pi).
- A digital or analog vibration sensor plus maybe other sensors in case you want to sense further things
- Some electronic wiring and isolating accessories as well as some fixing tape or comparable for fixing the sensors to the machines
- A cloud account e.g. MS Azure, Google Cloud Platform or AWS
- Maybe other accounts for 3rd party smart home integrations e.g. IFTTT, Amazon Alexa, Google Home, …
How does the solution work?
You can see a high level architecture drawing below which describes the system design.
I connect the ESP32 to my home WiFi and upon established internet connection I connect to the cloud securely in order to exchange status information for the machines. The ESP is wired to two vibration sensors, one for the dryer and one for the washer. The vibration sensors are attached directly to the rear cover of the machine at a position where the machines vibrate most during operation. Both sensors are operated at voltage 3.3V provided by the ESP.
I use a sampling rate of about 2Hz that means I check for the value of each sensor once every 500 milliseconds, but for this use case it might also be sufficient to go with > 1 Hz. When one of the vibration sensors detects vibration, I check for at least another 30 seconds to detect vibration – if so, I assume the machine to be continuously running and not just accidentally touched / moved. Once the machine is in state „running“, I update the state of the machine‘s digital twin in the cloud.
For detection of the stop of the machine, I have a longer threshold as the machine sometimes stops vibrating for some seconds during the running program, hence I wait until at least 180 seconds of no vibration have occurred. Waiting for 180 seconds results in a small delay of notification but that does not bother me. After 180 seconds of no vibration, I update the operation state of the machine‘s digital twin in the cloud again and set it to „stopped“.
Now that’s pretty much it – with these state changes transferred to the cloud I can define rules in the cloud to carry out certain operations once a state change occurs – here I wait for a state change from „running“ to „stopped“ and then fire an event via the IFTTT maker webhooks service. This allows me to use the event as a trigger in IFTTT and use whatever action of any IFTTT service to notify myself as well as my wife that the machine has just finished. For a simple test, you can just use an IFTTT action to send yourself an email once the machine is finished. Also, I added a maker event for the machine being started which allows me to log the washing / drying times in my Google calendar or a Google spreadsheet.
As a further feature, I added a temperature and humidity sensor to be able to get a warning when humidity is too high in the washing room to make us open the windows. This feature has become quite helpful as well.
Have fun implementing this yourself. I can add further details about the implementation in case needed — just drop a comment if you are interested.
No responses yet