Washing Machine Text Alerting
Article originally created 4/17/2018
From time to time, when I’m out in the garage or off somewhere in the house, I forget about my laundry. Or worse, I check on my laundry and find that it’s not done. While not the end of the world, it is inconvenient. I saw that some modern washers have notification apps to solve this problem. Since the washing machine that came with our house still functions, I decided to retrofit a notification system to it.
Items Used and Cost:
- Raspberry Pi Zero W - $15
- A 3.3v or 5v Vibration sensor, for Raspberry Pi or Arduino - $4
- A piece of breadboard, a moment switch, a resistor, some wire, and solder - $5
- An old cell phone charger that I had a box of junk - FREE
- An old Roku 2 Case, or any enclosure - FREE
- Python Script to monitor the sensor and send text alerts - $$$ (Whatever you value your time at)
- Twilio.com Account - $0.0017 per text
I really thought about using a Sardine can for this one.
The wiring schematic found on the site referenced below allowed me to put together a few circuits on breadboards for testing. The Roku 2 streaming device case had a perfect location for an LED indicator, which I incorporated into my programming as a status light. I then soldered everything together and superglued standoffs to the case to best position everything. Of note, nylon standoffs are my favorite thing ever.
I spent most of my time merging together a few Python scripts into something I liked. Using callbacks as opposed to putting a button event in the center of the main loop seemed to make the most sense to me. When the sensor is motionless for 5 minutes, a text alert is sent. A link to the actual python app is also linked below.
The alerting was the fun part. I found that Twilio.com had a ready to go Python library, and rediculously inexpensive text plans for the hobbyist. The script logs to a file and outputs to standard out if debugging is needed.
Currently I have the device perched on the washer (or dryer). Seems to work pretty well so far. Sample code is: here
Links
- I heavily borrowed the circuit design from this page on Spiria: https://www.spiria.com/en/blog/iot-m2m-embedded-solutions/connected-washing-machine-raspberry-pi
- Raspberry Pi Zero W: https://www.raspberrypi.org/products/raspberry-pi-zero-w/
- Sample Vibration Sensor: https://www.banggood.com/SW-420-NC-Type-Vibration-Sensor-Module-Vibration-Switch-For-Arduino-p-916223.html?cur_warehouse=CN
If you have questions about any specifics, email me at sclebo05 —AT— gmail