Introduction: Washer Dryer Laundry Alarm Using Arudino & SMS Text Messaging Alerts

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 (, but these can be sourced from anywhere.

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:
  2. Sign up for a Twilio account here:
  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
  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:

Step 4: Setting Up the Arduino Programming Environment

  1. Download the Arduino software from:
  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:

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.

First Time Author Challenge

First Prize in the
First Time Author Challenge

Make it Glow!

Participated in the
Make it Glow!