Saturday, October 29, 2016

Launitor - Laundry Monitor

The LED and button on the left is for my washing machine, the LED and button on the right is for my dryer


Launitor - a combination of 'laundry' and 'monitor'...ok, so maybe it's a silly name, but it's nice to name your projects, and that's all I've come up with at the moment.

At the Jamreb household, our laundry machines are in our garage. They were purchased many years ago, and they were cheap. They don't give any kind of notification when they are done. Worse, our dryer is not working too well at the moment. We have to run it 3 times before our clothes are fully dry.

I don't know about other people, but sometimes we forget to move the laundry from the washing machine to the dryer. If you've ever done this, you know it's not pretty. The clothes get all nasty smelling and need to be washed all over again. We also forget about the clothes when they're in the dryer sometimes, which also ends with unpleasant results.

I remember seeing a few laundry monitor devices on one of my favorite sites, Hackaday.com. Well, I wanted to build one of my own and start saving water/energy/time/money! But first a little planning...


Requirements
As usual, there were some requirements I had:
  • It should be portable for if/when we get a new washer/dryer
  • No permanent changes/modifications should be made to the machines
  • Should be cheap
  • Should require as little user-intervention as possible
  • Easy to use, and have visual cues as to what's going on with them

1 of my challenges
When I first started this project, I was using an Arduino and trying to use some cheap piezo elements from Sparkfun to detect the vibrations of the washer/dryer. It seemed to have worked o-k, but the piezo wasn't quite sensitive enough. Also, I had problems with the wires breaking right off of the piezo too easily when working with them. And I had to tape them real tight to the washer/dryer to get them to pick up the vibrations of the washer/dryer. Lastly, when removing the tape from them (to bring back into my 'lab'), it tended to damage some of the film on the piezos.

After giving up on the piezos, I came across these cool little Adafruit triple-axis accelerometers. It took me a while to figure them out and how to use them. Thankfully there is a great little tutorial on Adafruit's website for them though. So I read through the tutorial several times, and finally was able to get them working.

Once I had the accelerometers working (enough), I then switched over from the Arduino to Adafruit's Huzzah ESP8266 breakout board. This would allow me to IoT-enable this project a lot simpler and a lot cheaper than using an Arduino and a Wi-Fi (or Ethernet) shield.

Throughout the course of development, I ran into many issues/problems along the way and learned a lot. If you want to know about the challenges/problems that I ran in to (and how I overcame them), check out my Laundry Monitor challenges post.


So how does this thing work, anyway?
This is a very simple device to use - when nothing is going on, the LEDs are off. If it detects enough vibrations in a certain amount of time (both amount of vibrations and time are easily adjustable in code), it starts blinking the corresponding LED to visually show that the washer (or dryer) is running. When it realizes that the machine is done running, it turns the LED solid, and sends you an email. If you have the option enabled in the code, it will keep sending you an alert via email every X (also adjustable in code) amount of minutes. After you remove your clothes, just push the corresponding button to reset it so that it will start watching for the next load!

Just a quick note - if you decide to do this project, keep in mind that you will most likely have to 'calibrate' the sensitivity for your own washer/dryer. This involves adjusting 1 or both threshholds and testing. And maybe changing some of the counting/timer constants in the code. (I explain this more the code's comments)

Last photo - this just shows the final placement of the accelerometers on my washer and dryer:




Below are some links for you to use if you want to make your own Laundry Monitor. The various Fritzing files are so you can see how to hook everything up. The bill of materials gives you a complete list of parts, including pricing, and direct links to the items:

Arduino code on GitHub
Fritzing file (actual .fzz)
Fritzing file, exported to .png image
Fritzing file, exported to .jpg image
Fritzing file, exported to .pdf file
Bill of Materials (Open Office) 
Bill of Materials (Excel)

There's no proper schematic because I'm being lazy again. Between the 'Bill of Materials' file and the Fritzing file however, you should be able to make your own. ;)


Cool, I want to build one - what do I need, and what do I need to do?

Note 1 - I'm not going to go into every little detail of what you need here. This list is basic and is just a high-level overview. It also assumes you have at least a little experience in soldering and necessary hardware to attach the sensors to your washer/dryer and the rest of the electronics to something (like a wall). Lastly, it assumes you have basic electronics stuff like wire and wire strippers.

Note 2 - This list isn't necessarily in chronological order

  1. About $40 depending on what you have already, and how you 'mount' the sensors to your washer/dryer. And how you 'mount' the enclosure if you use one.
  2. Check out the BOM (linked above), and figure out what you need to buy and what you already have. Note - if you don't have an FTDI cable (like this) to program the Huzzah, you'll need one of those too (or some other way of programming the Huzzah)
  3. Sign up for a free account at smtp2go
  4. Solder everything together if you're brave, or breadboard it 1st for testing/calibration and then solder everything together
  5. Update the sketch to use your own Wi-Fi, IP, email, (encoded) smtp2go credentials
  6. 'Calibrate' the sensitivity of the accelerometers you're using for your washer/dryer in the Arduino sketch

Of course, I'll be happy to answer any questions about it - just ask in the comments section!


Lastly, here's a quick video of mine in action:





Thanks for visiting!

4 comments:

  1. Hello your images of the fritzing file no longer are live

    ReplyDelete
    Replies
    1. Thank you for mentioning that Eric. The files should be live again. (I've been having a little trouble with my web server lately)

      Delete
  2. Hi Jamie, this rocks! Are the push buttons necessary? I was trying to read through your code and I think your setup figures out that the washer/dryer are running without the need for the push buttons.

    ReplyDelete
    Replies
    1. You are correct Kulvir - the Arduino does in fact figure out that the washer/dryer are running on its own with no push buttons. But once it does that for the first time and then determines that the washer/dryer is done, the code starts sending alerts at a fixed interval until the push button is pushed which kind of 'resets' it to wait for the washer/dryer to start running again.
      I'm not really sure what you're wanting to accomplish, but there's probably other ways to code this up.

      Delete