loading

Have you ever wished there was a better way to be notified when your laundry was done? Have you ever forgotten a load in the washer because you couldn't hear the buzzer and your clothes became smelly and moldy from sitting there for too long? Well, I have and decided to solve this problem by building this simple notification system using an Arudino microcontroller. It uses a dual-axis accelerometer to detect motion and vibration coming from the washer (or dryer) and alerts my phone via SMS text message when the machine is no longer vibrating. I tried to build the easiest system I could using parts sourced from a local store and some online tools that help simplify the process of sending these alerts. Follow along as I show you how to put together this simple but useful project.

Step 1: Parts list

As I mentioned in the intro, I bought everything from my local Radio Shack, but you can find all of these parts at many other places. Most of the parts below that do not have a link were taken from a microcontroller pack I had (http://www.radioshack.com/make-ultimate-microcontroller-pack-w-arduino-kit/2770077.html), but these can be sourced from anywhere.

Advertisement

Step 2: Setting up your Temboo and Twilio accounts

Temboo and Twilio help make the process of getting the Arduino Yun connected to the internet and sending SMS text messages a breeze.

  1. Sign up for a Temboo account here: https://temboo.com/signup
  2. Sign up for a Twilio account here: https://www.twilio.com/try-twilio
  3. From the Temboo Account page, select Applications on the left and record your Account, Application, and Key as shown in the above picture.
  4. From your Twilio Dashboard page, record your Account SID, Auth Token, and Twilio number as shown in the above picture. For the Auth Token, you have to click on the padlock symbol to display the number.
  5. You will use these values later when programming the Arduino Yun.

Step 3: Setting up your Arduino Yun on the wireless network

You can either set up your Arduino Yun using a micro USB cable or through WiFi. I chose to set it up through WiFi and these are the steps below:

  1. Power the Arduino Yun through the micro USB port using the power adapter (or directly connected to your computer).
  2. When you first power up the Yun, it will automatically act as a wireless access point and create a WiFi network called: Arduino Yun-XXXXXXXXXXXX
  3. Connect your computer to this network.
  4. Open a web browser and go to this address: http://arduino.local or http://192.168.240.1
  5. Enter "arduino" for the PASSWORD and click the LOG IN button.
  6. Click the CONFIGURE button.
  7. Give your Yun a unique name and enter it in the YUN NAME field.
  8. Enter a password in the PASSWORD field.
  9. Select a timezone from the TIMEZONE dropdown menu.
  10. Either select a wireless network listed in the DETECTED WIRELESS NETWORKS dropdown menu or enter a wireless name in the WIRELESS NAME field, select the security type in the SECURITY dropdown menu, and enter the password in the PASSWORD field.
  11. Click the CONFIGURE & RESTART button.
  12. After you click the button, the Arduino will reset itself and join the specified network.
  13. Connect your computer back to this specified network.

Now that the Arduino Yun is connected to your wireless network, now you can program the Yun over the wireless network instead of through a USB cable.

If you have any trouble with this, please see this link: http://arduino.cc/en/Guide/ArduinoYun

Step 4: Setting up the Arduino programming environment

  1. Download the Arduino software from: http://arduino.cc/en/Main/Software
  2. As of this writing, you must download Arduino version 1.5.8 BETA that has support for Arduino Yun and not the version 1.0.6 that is listed first on the page.
  3. After installing, open the Arduino software.
  4. Go to Tools -> Board and select the Arduino Yun.
  5. Go to Tools -> Port and select the Arduino Yun. It should have the name you gave it before as well as the IP address.
  6. To test that everything is working, go to File -> Examples -> 01.Basics -> Blink
  7. Click the Upload button.
  8. You should be prompted for a password. Enter the password you chose earlier in the configuration webpage and and click Upload.
  9. After it is done uploading, you should see the small red LED on the Arduino board blinking that is connected to pin 13 (it says L13).
  10. If you get any errors, make sure again that the correct board and port is selected from the Tools menu and try again. Sometimes I have to click upload a few times to get it to go through.

If you have any trouble with this, please see this link: http://arduino.cc/en/Guide/ArduinoYun

Step 5: Programming the Arduino Yun

  1. Download the file WasherDryerAlarm.ino and open it in the Arduino software.
  2. Enter the values you saved before in the define statements for the Temboo Account, Application, and Key and for the Twilio Account SID, Auth Token, and Phone Number.
  3. Enter the number where the SMS text messages should be sent in the RECIPIENT_NUMBER define statement.
  4. If you change any of the pins, you must update the code in the constant variable statements to reflect these changes.
  5. Also, there are a few constant variables that you might want to adjust depending on your situation:
    1. The "waitTime" is approximately how many minutes the system will wait until it send an SMS text message. This is to account for when the machine is either filling up water or sitting idle during its cycle and not vibrating. 5 minutes worked in my case, but you may need to adjust this. Also, please note that the timing isn't exact and was just an approximation.
    2. The "sensitivityX" and "sensitivityY" are values that tell the system how sensitive it should be to the vibration changes of the machine. Right now it declares a 0.5% change as movement by the machine. Anything below this and the system assumes that the machine hasn't moved since the last time it checked. You can adjust this to meet your own needs.
  6. Click the Upload button. Once again, I noticed that the wireless upload isn't that reliable so just keep clicking the upload button until it goes through if it fails the first time.

Step 6: Assembling the system

  1. Disconnect the power from the Arduino Yun.
  2. Wire up the system as show in the pictures.
  3. If using an case or base, mount the Arduino to the case or base using screws. I just used double sided tape to mount the base to the washer (or dryer). You could also attach rubber feet either to the base or directly to the bottom of the Arduino. That way you could move it around as needed.

Step 7: Testing the system

  1. Mount or place the unit in the desired location. You can either mount the unit on the top, side, or back of the washer or dryer or you could just place the unit directly on top of the machine taking precautions to ensure it does not fall off during operation.
  2. Plug the power into the micro USB port using either a wall power adapter or a portable battery pack.
  3. The timer for the system does not start until you click the little pushbutton. So load your laundry first and start the cycle.
  4. Once your machine is started, click on the pushbutton once. You should see the LED light up. If you do not see the LED light up, wait a few seconds or even a minute and try clicking it again. Sometimes the WiFi takes a while to connect and it won't allow you to start the system until it is done connecting to the wireless network.
  5. After the LED is on, the system will immediately begin checking for movement and vibrations coming from whatever surface it is mounted to. If it detects movement (greater than the sensitivity settings), it will reset the timer and continue to monitor. If it doesn't detect any movement or vibrations, it will start the counter and wait until the "waitTime" (currently defaulted to ~5 minutes) passes. Once the "waitTime" is reached, the Arduino Yun will wireless connect to the internet and send out an SMS text message to the phone number designated.
  6. If you receive a text message at the end of the machine cycle, congratulations as your system is working!
  7. If you receive a text message before the machine is done, don't panic! This probably just means that either you need to adjust the "waitTime" or "sensivityX/sensitivityY" constant variables discussed earlier.
  8. When the cycle is done, you can click the pushbutton and the LED should turn off indicating that the system will stop monitoring and stop sending out SMS text messages. Or you could also just unplug the power from the micro USB port.

Step 8: Conclusion

There are many other ways to accomplish this same task, but I wanted to find a very simple way using some parts that I already had. Hopefully this will give you some ideas for other projects you could monitor or connect to the internet. Thanks for reading and be sure to follow me as I will be doing more write ups in the near future.

<p>Beautiful project I have something like that in: http://www.microcarsil.com.mx/2015/10/tarjeta-universal-phoenix-premium.html</p>
I need help. I am trying to do the same thing but with a voice/sound detector. Any help will be greatly appreciated!!!
<p>Check out the Uber Home Automation Instructable. I beleive he uses a mic to do the same thing.</p><p>http://www.instructables.com/id/Uber-Home-Automation-w-Arduino-Pi/ </p>
<p>This is a cool project. I have all the components, however my accelerometer, is a seeed studio analog unit. I have tryed to wire it up and make things work. With no luck, what bit of code would I need to change for the analog unit? </p>
<p>I had already been planning this as well. I had intended to test the current on both the washer and dryer to determine if they were active or not. I planned to do this using a on-invasive inductive method with a sensor wrapped around each of the power cords. I would need to add timer logic to account for the &quot;soaking&quot; phase of the wash cycle when only a tiny current draw was taking place (washer's timer motor). The other (invasive) method is to tap into the washer's circuit for the timer motor and have it close a relay (DPST) which in turn closes a circuit that Adruino would recognize. This would isolate it from the 120 volt side of things.</p>
<p>NON-invasive</p>
<p>it says yun connected. but arduino port are not showing.</p>
<p>Hey this is so awesome ... I hat the same issue and the last three months I developed an app using phone acclerometer to check idle mode and let the phone call me. The funny part beside having the same idea is that I named the app also &quot;Washer Alarm&quot;. And after upload to Play Store I searched the net and found your project. I think we should combine our solutions :)<br><br>If somebody is interested check the app, it is for free --&gt; <a href="http://play.google.com/store/apps/details?id=washeralarm.washeralarm" rel="nofollow"> http://play.google.com/store/apps/details?id=wash...</a></p>
<p>Hi, I'm from Malaysia.. just want to ask, it there any possibility for me to find all this items for this project?</p>
<p>This sounds fun. But then again a timer works very well for things where time is the actual thing you're measuring. My unit has 2 washers and 2 driers. So building this would be four times the parts, and I'm sure it would have a decent set of headaches. I like pomodoro. I also like turtles.</p>
<p>Why could you not make one of these with a hanger that matches up to your machine? That way you can hang it in the machine your doing your laundry on, and take it back with you when your done. I LOVE the idea of putting a sensor on each machine, that way you can get machine status from your apartment and avoid going down to the laundry room just to find out that all the machines are in use. </p><p>I am thinking of using this same setup (minus the accel.) to monitor weather I left my garage door open, or txt me if it has been opened. </p><p>Bravo MakerBee!!!</p>
<p>Not necessarily. You could get an accelerometer for each unit, (for under $5 each) which supports I2C, and have all of them monitored by a single Arduino.</p>
It's true, it would be fun, especially if I could get the entire building on it, we could revolutionize the way we do laundry. For now I'll stick with my timer app though.
<p>Do took a look at the new ESP8266 modules. They are WiFi modules that cost about $3. You can program them directly or connect to another uC. I have a short article on it here: </p><p><a href="http://electronut.in/an-iot-project-with-esp8266/" rel="nofollow">http://electronut.in/an-iot-project-with-esp8266/</a></p>
<p>Haha ok. Yes, I agree. Thanks for the feedback.</p>
Would there be a way to have the arduino receive an input value from a screen and then text the correct associated phone number if you have a lot of users but one machine?
<p>An accelerometer is overkill in this case, even ignoring the other suggestions (LEDs or sound). Just a small vibration sensor (like a dollar at most) does the same job. I have mine set up via a local XBee network so I don't need to use an expensive YUN for it. One XBee with a small Arduino Trinket pings another Trinket upstairs and sets off an alarm and LED. </p>
<p>Yes, you are correct. As I have stated to others countless times (next time I will just add a disclaimer in the Instructable), these were parts I had and I merely created this Instructable for fun to share with others. In no way was I suggesting that this was an economical or practical solution to this problem. But your idea is great and a much simpler and cheaper solution. Thanks for the feedback.</p>
<p>Very fun idea. OK, OK, I admit that I help my wife with laundry -- so how might I set this up to send text msg to two phones? Thank you</p>
<p>All you have to do is modify the part of the code where it sends out a text message and add another phone number in there. I'm not sure if Twilio requires a separate account for each number or if they allow for multiple recipients on one account, but either way it can be done very easily. Good luck on your project!</p>
<p>I am VERY new to using Arduino boards and was gifted an UNO R3 a while ago and was wondering if it was compatible with the YUN, and if it was possibly usable for this project?</p>
<p>Yes, you can accomplish this with an UNO, but would have to add a wireless board or shield to do it the way I did. If you don't care about the text messaging part, you can also have the Arduino notify you in some other creative way.</p>
<p>Great idea!!! if You want to use push notification instead of SMS take a look to <a href="http://www.pushetta.com%2C/" rel="nofollow">www.pushetta.com</a> it's a free service I made to send push notification (also) from Arduino Yun to Android and iOS phones.</p><p>Regards</p><p>fg</p>
<p>Cool, I'll take a look at it. Thanks for the suggestion.</p>
Ill go a little cheaper and ask someone at one of the shops that takes old comps Ect about parts ;)
<p>Great idea. I'm sure there are many other less expensive ways to accomplish the same task. I just already had these parts at my disposal. Good luck on your project.</p>
Best idea ever! Would save so much water, clothes, detergent ,electric and time! Thank you my laundry will appreciate it &amp; so will my bills O.0!
<p>Haha, awesome! Glad you enjoyed the write up. Thanks for the feedback!</p>
<p>Wow, reading the comments, your first Ible is inspiring lots of makers! Keep up the good work!</p>
<p>Thank you for the feedback! This was a great first experience and I look forward to writing more in the near future.</p>
Ill go a little cheaper and ask someone at one of the shops that takes old comps Ect about parts ;)
<p>Most auto washing machines give a beep beep beep noise when the washing cycle is finished. Could one of these microprocessors be configured to recognize that and notify you by text? </p>
<p>Yes, definitely. That would be a great idea and one that was actually suggested before in one of the other comments below. I think that might work even better since you can be notified exactly the moment it is done. Thanks for the feedback!</p>
<p>Or a light sensor over the LED that shows that the machine is finished. Actually my machine has an LED indicator for every step in the washing cycle. I could open the machine and tap the Arduino into this LED board.</p>
<p>Nice! You inspired me for my next project! I actually need this because i often forget when the wash is finished since i am using the building's common washing machine room, which results in me losing time from... the dryer room! No more wet clothes! I will make it cheaper (for about less than half the cost) and more versatile (no need for WiFi) and will post it here as an instructable with the proper credits to you as the inspiration source! Thanks! </p>
<p>Great, good luck on your project! Can't wait to check it out! Thanks for the feedback.</p>
<p>Ha ha ha, I Love it !!!</p><p>Two and a half men TV series.</p><p>Charlie: His Cell Phone Rings,...&quot;wait I think that's my Laundry Calling&quot;</p>
<p>That's awesome! I was just thinking though, don't some wash cycles incorporate a soak, where the drum stops turning part-way through? But I wonder if the current detection method would help with that? Presumably the current drops off to &quot;standby&quot; levels when the drum isn't actually turning or the pump pumping... :/ Tricky.</p>
<p>Yes, you are correct. The way I worked around that is by accounting for this in my code. I just set a &quot;wait time&quot;, which is essentially a delay before the arduino thinks the cycle is done and sends out a text message. Of course this means that I won't be notified immediately after the machine is actually complete (and not during a rinse cycle), but this project was mostly just for fun and I wasn't looking for exact timing. But great observation and I'm sure some of you can come up with a better and improved system. Thanks for the feedback!</p>
<p>another approach that i think would work well, would be to use a sensor that detects the electrical load from the washing machine. In other words, detect whether the washing machine is using electricity or not. Surely there's a way to do this. At least the way i'm thinking could be a wrapped copper wire around the machine's wire to the wall outlet. You could even add a light detecting cell in front of the LED that lights up on the machine XD, there's certainly a lot of ways to go about it.</p>
<p>If you scroll down a bit, I talked about my laundry monitoring project where I'm doing current sensing in my build. I included a picture of the sensor.</p>
<p>perhaps implementing a microphone to detect sound as well as vibration</p>
<p>That's a great idea! You can probably approach that in two ways. Either the microphone tries to detect silence OR the microphone is programmed to listen for the sound of the buzzer going off. The latter one sounds like it might be a fun solution to try. Thanks for the suggestion.</p>
<p>Cool~</p><p>Some laundry support wifi &amp; smart app.(LG or Samsung) </p><p>My mother don`t use this smart function. but this is quiet a useful. </p>
<p>Haha, great. Thanks for the feedback!</p>
<p>I actually built something like this for my dorm last year! However, instead of sending a text, I had it update a Web page that showed the status of the machines.</p>
<p>Wow, that sounds awesome! I think more laundromats should have a system like that. Wish I could have seen your system.</p>
<p>you can also send sms via email</p>

About This Instructable

99,907views

847favorites

License:

More by MakerBee:Washer Dryer Laundry Alarm using Arudino & SMS Text Messaging Alerts 
Add instructable to: