Find all your DIY electronics in the MakerShed. 3D Printing, Kits, Arduino, Raspberry Pi, Books & more!

M34_PROJ_DryerMsgr_Opener_01
The dryer in our house is in an out-of-the-way corner where it’s hard to hear the buzzer. When we miss it, the clothes sit in the dryer getting wrinkly, so we start the dryer again, don’t hear the buzzer again … it’s an endless cycle. After what seemed like the thousandth time, my wife quipped, “I wish the dryer could just tell us when it’s done.”

I had just started playing with Arduino, so I thought a Dryer Messenger would be a good first project. When I ran the idea by my wife, she was enthusiastic but didn’t want me disassembling the dryer or voiding its warranty, since it was only months old. We decided to use SMS since our phones are usually nearby. Fast-forward a week or two and the dryer was texting us like a household assistant. We haven’t forgotten a load of laundry since.

Materials and tools

  • Non-invasive current sensor, 30a YHDC model SCT-013-030
  •  microcontroller, arduino Pro mini 328, 3.3V, 8mHz SparkFun Electronics #DEV-11114, sparkfun.com
  • Wi-Fi module, Roving Networks WiFly RN-XV
  • Breakout board for XBee module SparkFun #BOB-08276
  • XBee sockets, 2mm, 10-pin (2) SparkFun #PRT-08272
  • Protoboard
  • enclosure Digi-Key #HM1068- ND, digikey.com
  • Capacitor, 10μF
  • Resistors: 330Ω (2), 10kΩ (2)
  • Leds: green (1), red (1)
  • Headers, 40-pin breakaway, 0.1″ spacing (2) SparkFun #PRT-00116
  • stereo jack, 3.5mm SparkFun #PRT-08032 has pins with breadboard spacing.
  • dC barrel jack, 5mm×2.1mm SparkFun #PRT-10811 has pins with breadboard spacing.
  • Hookup wire
  • Wall adapter, 9V 650ma
  • Computer with arduino ide software free from arduino.cc
  • FTdi programmer such as FTDI Friend, Maker Shed #MKAD22, makershed.com, or FTDI Basic Breakout 3.3V, SparkFun #DEV-09873
  • soldering iron and solder

Downloadable Files

 

MAKE Volume 34: Join the robot uprising! As MAKE's Volume 34 makes clear, there’s never been a better time to delve into robotics, whether you’re a tinkerer or a more serious explorer. With the powerful tools and expertise now available, the next great leap in robot evolution is just as likely to come from your garage as a research lab. The current issue of MAKE will get you started. Explore robot prototyping systems, ride along with the inventors of the OpenROV submersible, and learn how you can 3D-print your own cutting-edge humanoid robot for half the price. Plus, build a coffee-can Arduino robot, a lip balm linear actuator, a smartphone servo controller, and much more

On newsstands now, by subscription, or available in the Maker Shed

Buy now!

Steps

Step #1: Overview

PrevNext
The Dryer Messenger
  • The Dryer Messenger consists of 3 main components: a current sensor, the Arduino Pro Mini, and a Wi-Fi module. The current sensor is clipped around a power wire on the back of the dryer where, by electromagnetic induction, it outputs a low current that’s a small fraction of the current from the dryer. A burden resistor is needed across the terminals of the sensor to obtain a voltage that can be sampled by the Arduino; the sensor I used has this burden resistor built in.
  • Since the dryer runs on AC, current flows in both directions, causing the voltage to swing positive and negative. The Arduino can only sample positive voltages, so I used a voltage divider to bias the sensor’s output. The volt- age divider uses two 10K resistors (R1 and R2) to obtain 1.65V from the 3.3V supply.
  • The current sensor has a fairly linear output up to 1V at 30A, which means the Arduino will read 0.65V or 2.65V when the sensor sees 30A. Capacitor C1 goes between the sensor and the Arduino to filter out noise.
  • The Arduino monitors the dryer’s current consumption and sends notification messages when it has determined the dryer has finished a cycle.
  • Since the Arduino Pro Mini has only one hardware serial port for both programming and debugging at 115,200 baud, I connected the Wi-Fi module to the Arduino digital pins and used the SoftwareSerial and WiFlySerial libraries to emulate a serial port and talk to the WiFly at 9,600 baud.
  • The Wi-Fi module connects to the local wireless network and sends notifications as tweets using NeoCat’s Twitter Library for Arduino. The dryer has a Twitter account both my wife and I follow, and by activating mobile notifications for the dryer’s tweets we can receive its updates as text messages on our phones.

Step #2: Build the circuit.

PrevNext
The Dryer MessengerThe Dryer MessengerThe Dryer Messenger
  • Solder the circuit shown in the schematic diagram on a protoboard. LED1 is green, LED2 is red. My board had a copper pour on the back that I was able to use as a ground plane.
  • Since the Wi-Fi module has 2mm headers, it can’t be directly mounted on the protoboard. Use the breakout board to adapt it to the protoboard’s 0.1" grid. The image shows how I arranged the components on my protoboard.
  • Plug the Wi-Fi module into the breakout board, and then mount the protoboard in your enclosure.

Step #3: Attach the transformer to the dryer.

PrevNext
The Dryer MessengerThe Dryer MessengerThe Dryer Messenger
  • Unplug the dryer from the wall and remove the back panel to access the terminal block where the power cord is connected. The first image shows the terminal block on my dryer.
  • The current sensor needs to measure motor current. Use trial and error to determine which leg of the terminal block connections powers the motor.
  • Clip the current sensor around the appropriate wire, and run its output cable out the back of the dryer. Replace the panel and plug the dryer back into the wall.

Step #4: Get your dryer on Twitter.

PrevNext
The Dryer Messenger
  • Create a new Twitter account for your dryer. Adjust the privacy settings to keep it out of public view, if you prefer. Visit http://arduino-tweet. appspot.com and follow the instructions to set up your device to send tweets. You will be redirected to Twitter to authorize the Twitter Library’s use of the dryer’s account. Make sure you’re granting access to the right account. Save the token you’re given to paste into your Arduino sketch, as explained below.
  • Now, follow the dryer from your personal Twitter account. Turn on mobile notifications for the dryer’s updates, and you should be able to receive text messages on your phone when it tweets.

Step #5: Install and tweak the software.

PrevNext
The Dryer Messenger
  • Download the 3 libraries and the Arduino sketch DryerMessenger.ino from http://cdn.makezine.com/make/34/dryer-messenger-code.zip. Move the libraries to your Arduino libraries folder. Leave the .h and .cpp files in the same folder as DryerMessenger.ino.
  • Open DryerMessenger.ino in the Arduino editor, click the Credentials.h tab, and set the following parameters at the top of the file:
  • » Change ssid and passphrase to your network SSID and passphrase.
  • » Paste the token into twitter_token. Adjust the following parameters at the top of the Arduino sketch to suit your application:
  • » The CURRENT_THRESHOLD parameter is set to 1 amp by default, which should be low enough to detect when the dryer motor is running. You can adjust this value based on your particular dryer.
  • » WAITONTIME is how long the CURRENT_ THRESHOLD value must be exceeded before the Arduino moves to the dryer RUNNING state.
  • » WAITOFFTIME is how long the dryer must be off before sending the notification. A longer time here allows for momentary interruption of the dryer cycle to insert more clothes or fabric softener (which I always forget).
  • » The messages array can be edited for more personalized texts, if you prefer.
  • After you’ve set the parameters as you like, upload the code to your Arduino using the FTDI module. Make sure it's set to 3.3V mode.

Step #6: Use your Dryer Messenger.

PrevNext
The Dryer Messenger
  • Plug the current transformer’s stereo plug into the Dryer Messenger’s 3.5mm jack, and plug the AC adapter into the wall. Both LEDs should turn on. After successful start-up and connection to the wireless network, the red LED will turn off and the green one will stay lit.
  • If you leave the FTDI cable plugged in, debug information (such as the software state and the current measured by the sensor) will be displayed.
  • From now on, when your dryer finishes the cycle, you’ll be notified via SMS. No more forgotten, wrinkled clothes!

Step #7: Modify It!

PrevNext
The Dryer Messenger

With the Arduino’s digital and analog inputs, it can monitor and send a notification when triggered by any detectable event. Since the software is a simple state machine, it could be easily adapted to monitor a digital line or a different analog voltage source. A temperature probe might be attached to monitor the temperature of a room or walk-in freezer. A momentary switch on a mailbox could alert you to the mail delivery, or a magnetic switch on a door could let you know when it’s been opened. The possibilities are endless!

Thomas Taylor

Thomas Taylor is an electronics engineer in Fort Walton Beach, Fla., who enjoys creating embedded systems to make everyday life easier and integrating them with his wife’s crafting projects. He’s always on the lookout for new ways to apply technology. Reach him at thomas07@gmail.com.


Comments

  1. Justin Gasal says:

    Okay, pretty cool. What the heck is the XBee used for? It’s listed in the materials but the instructions never reference it. Seems superfluous when you have a WiFi module.

    1. A. Reader says:

      Check the pictures between #2 and #6 – #2 shows the wiring from the Nano to the XBee breakout, #6 shows the module plugged into the breakout

  2. Coconut says:

    Justin, from what I see it doesn’t actually call for an XBee; just XBee breakout board and sockets. It seems the WiFi module has an XBee footprint, so I believe the XBee board and sockets are to easily mate the WiFi module to the Arduino.

  3. dwmurray57 says:

    Nice

  4. Charlie says:

    I’m confused by the power supply in the parts list … it specifies a 9v power supply, but the Arduino takes 3.3 as input.

    1. A. Reader says:

      Check the schematic – the 9v power is being fed into the voltage regulator on the Arduino – so the Nano itself is making the 9v –> 3.3v.

      Check the specs – there are also 5v Nanos – you have a bunch of power choices – any walwart you have lying around will work (except the rare 18 or 24v ones). You could also power it over USB – a standard 110–>USB power jack plus a cable. etc.

      1. Just like to point out, that I used the 3.3V Arduino because the WiFi module is a 3.3V only part. Have them both at the same voltage just made things simple.

      2. Charlie says:

        Got it, makes sense now. Thanks!

  5. I just want to follow this dryer on twitter also….
    Why isn’t that in these instructions?

    1. andrew olafson says:

      You can follow mine! @OlafsonDryer
      I built mine as a mother’s day gift, as my mother is always checking on the dryer or forgets it, thus wasting her time. This should save her time, so she can focus on other things going on in her life, besides a dryer.

  6. Jake says:

    Great idea. My laundry room is a separate room only accessible from outside the house, definitely needed this!

    I built this and had problems because my network uses WEP, presumably to support one device that I probably don’t even have anymore. I took it to my office and was able to connect to the WPA network there and send a test tweet. I figured out how to reconfigure the wi-fly to connect to WEP because I had other issues with my Android phones and WPA (grrr) and got the dryer messenger to connect to my network, but now when I try a test tweet, I get ‘Tweet not sent’.

    How do I begin to troubleshoot this? Thanks.

    1. Jake says:

      I ended up creating a virtual wlan with the WPA settings and everything worked. I guess I’ll reload my router later when I have a chance. Even the phones connected too, so it’s definitely like the router didn’t accept the changes.

      Thanks, and great project again!

  7. James says:

    ok, so i finished building the circuit above on a breadboard and powered it up. My arduino instantly burst into flames. I double checked my wiring and everything seems to be correct. Could the 9V power supply be too much for the internal vreg?

  8. Fred Ramsey says:

    Why doesn’t this article have an estimated cost? Anyone have a ballpark figure?

    1. jvschmitt says:

      Fred: Looks to be about $50-$100 USD total, depending on how much you reuse spare parts (like cannibalizing an unused adapter for power, using led’s, wires, resistors, etc from your spare kits, etc). $50 at least though, as the smallest Arduino + WiFly combined are about there.

      1. Fred Ramsey says:

        Thanks, I appreciate it!

  9. jvschmitt says:

    Great smart-house project! Thanks for documenting/sharing.

    One big question though: I’m torn with choosing Wifi or BlueTooth, for projects like this (ESP. if I were to try selling them commercially someday), as BlueTooth can be far easier to setup (esp. when you’re not worried about security of such things like drier read-only messages!) Wifi would require the user (/consumer) to edit Arduino code to put in the Wifi SSID & password, which is OK for us makers, but a really huge friction point for any consumers.

    Or, am I missing something? What’s the best way to ship simple products like this, where the user has to still specify the Wifi connection parameters somewhere, somehow? (Ideally, maybe there’s a universal Win/Mac/Linux client software that can run & detect any unhooked up arduino’s with wifi, & then push a SSID/pwd file to them, in some standard method?)

    1. Bluetooth would require a bridge of some sort to get on the internet that most people don’t have whereas most everyone has WiFi in their house. WiFi Protected Setup (WPS) is supposed to make getting on your network easier and has been out for a while, but not everyone has/uses it. I have seen one device that I cannot remember offhand, that created it’s own network which you joined and allowed configuration through a web interface.

      Making devices easily configurable and fool-proofing them seem to be harder than doing the actual project itself sometimes.

  10. Michael says:

    Ok so forgive me ignorance and potentially stupid questions. I was an electronics tech in the Navy but that was 15 years ago….. It looks like you connect the VSS from the Arduino and the Wifi, per the picture, the schematic looks like it is just an output, but what about the second resistor that comes off of the current monitor input and the capacitor. I see that is says 3V3 off of it but Im not sure what that means. I would guess that its an output but to what? Also what do I do about ground? I have a strip board so should I just connect all the grounds? Do I connect all of them to something?

    1. Michael says:

      Never mind, got it. I read the description closer and realized the VSS was the power that came out of the cap and resistors first, then the Ard and Wifi Module. I also knocked a few cob webs out and remembered to tie everything back to the ground of the power jack. I powered up and it didnt burst into flames! A red LED lit up and a green one flashed a time or two. So far so good. As soon as the FTDI arrives tomorrow I can program it, cross my fingers, and hope for a text telling me the dryer is done, drying. By the way I forgot to say thanks so..Thanks for creating this and posting it.

      1. Michael says:

        Well..I got the software loaded, the green LED lit up but the red is not lighting up. Any ideas? Any help would be really really appreciated.

  11. George Fetters says:

    I have an odd issue. I have the wifly up and running, connects to my network etc. I send a 1 in the serial monitor, it tries to send a tweet but the post fails. I have confirmed I have my token in my credentials and the tweet library is authorized on twitter. Is twitter blocking this now?

    1. George Fetters says:

      Addendum, It must have been site maintenance. Its working fine now. I wonder if I can track usage with this. This would be great to add to other devices to see where my energy costs are.

  12. So I’m a software engineer and I’ve been toying around with arduino for a while. I get lost in the schematic when it comes to building out the voltage divider that you have described in the following two bullets. Any insight…like “hand-holding” insight would be great.

    * Since the dryer runs on AC, current flows in both directions, causing the voltage to swing positive and negative. The Arduino can only sample positive voltages, so I used a voltage divider to bias the sensor’s output. The volt- age divider uses two 10K resistors (R1 and R2) to obtain 1.65V from the 3.3V supply.
    * The current sensor has a fairly linear output up to 1V at 30A, which means the Arduino will read 0.65V or 2.65V when the sensor sees 30A. Capacitor C1 goes between the sensor and the Arduino to filter out noise.

    1. So I figured this out, I’ve never soldered a voltage divider. However, I notice that the capacitor readings are actually negative values on my arduino uno. Any ideas why?

  13. Gary says:

    I thought I was almost finished but when I plug in the FTDI breakout board (GRN to GRN and BLK to BLK) the TX and RX lights stay lit, the chip on the FTDI board gets very hot, and no lights light up on the arduino. Any ideas?

  14. CAVU says:

    Suggestions are welcome.
    wired up on an Uno and using power/serial monitor from the USB (I didn’t care about the smallest package and this is easier and simpler to work with plus power management is easier.)
    program compiled and downloaded properly so I believe all software is good.
    wifi is seen on my network so the registration that seems good.
    registered token and twitter accepts the arduino as authorized
    when it starts up, it goes through all the power logic, I get a green light from the wifi but the red led still blinks and the green led doesn’t come on.
    I’ve tried to send a test tweet without success.
    I’ve tried with and without the current sensor hooked up which I don’t think that should make any difference.
    nothing goes to the twitter account.
    Any suggestions?

  15. Hi Thomas,
    Great project. A couple of questions about the schematic:

    1. Do you want the capacitor across R2, tied to ground?
    2. On the DC Jack, pin 1 is shown tied to ground and also crossing the power supply. I suspect that you did not intended to represent J1 and J3 tied together (as that would tie the power supply directly to ground. That’s probably why the one guy’s Arduino burnt up – drawing too much current.

    Am I right?

    1. CAVU says:

      Matt,
      I noticed that the J1 from the DC Jack also crossed the GND and the 3V3 and assumed a typo. it didn’t impact my device since I’m powering from the Arduino USB power supply for now. I wouldn’t think it would burn out the Arduino since it would short to ground first.
      I assumed that the C1 tied to R1 and R2 was, however, correct and that may be my problem above.
      Hopefully Thomas will get back on the above.
      Thanks for pointing this out.

      1. Hi CAVU,

        I went back to the magazine and indeed, the diagram there shows no connection between J1 and GND. C1 and R1 are definitely tied together. I think you are correct in that the Arduino should not be affected by this (depends I suppose on your wiring points but you would really have to try to mess up); it’s downstream of the grounding.

        I’m having trouble programming the Arduino myself – I’m not sure if I burned something out or just have a bad configuration.

        Did you get it to work?
        Matt

        1. I’m going to see if I can figure out how to substitute in an Arduino Uno (spare) and see what I can get from there.

    2. I ended up using my own 3.3voltage regulator and not the onboard arduino one. Coupled with two caps and a thermistor I’m in good shape and won’t need to use the 3.3v regulated power from the uno.
      I would like to work on some eagle files to manufacture my own pcb…but eek, no time. For now I have this all on my breadboard.

  16. benwhite says:

    Great project!!!

    I have a comment on the code. If your wireless network has a space in the ssid you are out of luck with the code out of the box. The RN-XV can’t accept commands with a space in an argument. There is a workaround. Out of the box the RN-XV uses the “$” character as a replacement character in the ssid string. That is, “My$Wireless” is used by the RN-XV as “My Wireless” when trying to join a network. However the join() method of the WiFlySerial object uses the getSSID call which returns the ssid with the replacement char replaced! This sends a command to the RN-XV with an argument with a space if your wifi ssid has a space in the name. The fix is to use the alternate join(char *pSSID), where you send the ssid with the replacement char in place. Therefore to fix this problem change the following line in the DryerMessenger.ino file in the SetupWifly function:

    if ( goodJoin = WiFly.join() )

    to

    if (goodJoin = WiFly.join(ssid) )

    And make sure your ssid definition in the Credentials.h file has the replacement character:

    char ssid[] = “My$Wireless”

    NOT

    char ssid[] = “My Wireless”

    Cheers,

    Ben

  17. Mark says:

    I can’t get it to work with Twitter no matter what. I have the token, it is verified and it fails to send the tweet.

  18. John Young says:

    Salisbury University and others use a system like this to alert students that their clothes are dry so that their dorm laundry rooms won’t fill up. And, I’m looking into something similar for traffic signal backup generators for low oil and power outage alerts.