Tuesday, 27 May 2014

Clothes Dryer arduino moisture alert

 So, since moving house we've had to relocate our clothes dryer to the garage. This being slightly inconvenient I keep forgetting to check when it has finished drying clothes which ends up either leaving them ages and having to put the dryer back on to help get damp back out of the clothes, or having trips every 20 mins to the garage to check on it. Either way, I'm lazy and wanted technology to solve my problems.

Searching the web, I found a few people doing smart things with dryers, based around the premise that when clothes become dry, they stop emitting moisture (pretty obvious) and so if you can monitor the operation of the dryer and the moisture still present you can estimate when the clothes are dry and either shut off the machine or advise that it's time to take the clothes out. The general principle is to put a moisture sensor in the vent/output of the dryer to see how much moisture is being emitted. Less moisture, then clothes dryer. You can then build up a reasonable threshold for when the clothes are dry by observing the values and testing.

The plan is to use a spare Arduino Uno I have, plug its usb into the server already in the garage and take readings off this. When a pre-determined threshold is reached it can then alert me by some means (Not sure what yet, tweet, email, sms, bluetooth alert, whatever!). So onto the sensor. Checking around you can get moisture sensors pretty cheap, so I went for the DHT11 moisture/temperature 1-wire sensor (not the usual 1-wire protocol, but well documented and there is an Arduino library for it).

 The sensor itself is around 5-10cm in size, so easily hidden and has 4 terminals along the base. These are for +vcc data (unused) and -vcc

These can be bought on ebay from UK sellers for under £2 which is a bargain I'd say! So I got one ordered to play around and test. So next step, link it up to the arduino and load the library, see what happens. Here it is connected up to my Arduino Uno for testing.

So far so good, running a simple sketch I could retrieve the moisture value (in %) and temperature (in oC) so I was getting together something I could use.

By soldering a long cable onto the sensor and wrapping it a little in electricians tape I then needed to tackle the dryer itself and identify how to make this work. My dryer is a Hotpoint self-ventilating dryer (avoids the external hose requirement) as it uses a condensing technique to convert the moisture-rich hot-air back into water (which then collects in a tub to empty).

So, I didn't want to modify the dryer in any way (I'd get into trouble off the mrs!) so I then looked at how to sense whats in the drum. The following image shows the layout with the door open:

Here you can see the main filter which fits into the dryer drum in the middle. This is all snug-fitting plastic, so no option here really, plus the sensor would end up getting clogged with dryer lint. However, following the internal plastic duct it comes out at the bottom, if you look at the middle+bottom you can see the cut-out that then feeds into the condenser fittings and into the water collector. This seemed like a good place, it was relatively lint-free and would take the hot air coming out. This seemed like a good spot, and it fits when closed using rubber+felt fittings, so I could fit the cable in quite easily.

I therefore put together the sensor onto a long wire and duct-taped it inside the duct (Yep, duct-tape actually being used in a duct).

After the initial test, the humidity rose rapidly with a full load of wet clothes and as the dryer kicked in it heated up. Initially this looked good, temperature going up and then I found a rapid drop in humidity, checking this did indicate that the clothes were reaching the optimum dryness, so it looks like it works. I waited longer to let the temperature level off and then the moisture dropped rapidly showing completion of cycle.

(The dryer isn't smart, it doesn't have a moisture sensor and will continue to run on its timer, so I think this may also let me help save energy by shutting it off early, but that will be a future change)

Unfortunately, I didn't keep a graph of this test, so I cannot show the simple correlation I did. However, something odd I noticed. Afterwards the graphing continued (I use the excellent Munin for graphing as it is so easy to write plugins) and I saw the humidity jump up and then remain at around 95%. This seemed odd, and I did a few things to see if it was a fault, but now I suspect that when the dryer is idle, and not heated its at quite a low temperature, and residual water in the dryers mechanics must stay there and keep moisture high. This also makes me worry about the dryer itself, as it cannot be healthy for it idle at high moisture, but again that is something to worry about another time.

The final design seems to work, and I'm going to continue doing some more test runs before setting up a threshold monitor and alerting part of this. The graph below is from the days after the test and shows the very high humidity. If you can think of a better explanation than mine I gave above, please feel free to add to comments and put me right!

As you can see the temperature remains around the same, but humidity sits up at 95% almost constantly (I'm going to assume the drops in humidity are graphing/serial errors and can be ignored. I should really write that into my code!)

 

I'll try and get another capture of when the dryer is being used to illustrate the correct graphing values that I captured.

You'll also noticed I added an "On" to the graph. The idea is that this will indicate when the dryer power is applied. This is proving tricky. I looked at and made my own caribena induction power monitor to hook around the mains cable and measure when power was flowing (Poor mans clamp meter), as my thinking is that this beast takes around 1kW of power, so its significant and I should be able to see even a tiny voltage showing on my home-made pickup coil. But alas I've failed miserable and I'll address that in another article. So for the moment I'm still working out how to monitor when the dryer power is applied (I still want to avoid intrusively digging into the dryers control panel/inners, especially as it would also probably involve an opto-isolator or something else wired into the 220v mains on the dryer which I like to avoid where possible)

 Also, code for the arduino sketch is at github: github.com/andyb2000/dryer-humidity

 

-- Additional --

I've had a little longer now to look at the code/stats, and have determined that when the dryer isn't being used I should ignore any values, as the moisture values often sit at 95% which I assume is just from the dryer having residual moisture. I'm also building up a decent picture of when clothes are dry. Take a look at this graph from today when the dryer was used 3 times:

 

As you can see on the graph, when the dryer is on (the green ON isn't working correctly, so it's not showing all 3 switch on times) the moisture goes down as temperature goes up. And the final drying cycle you can see the moisture drops rapidly slowly followed by temperature going up. Therefore this looks like a good set of threshold values to monitor. I suspect having a condition such as:

if temperature > 45 && moisture < 50 then clothes are dry

 

-- Addendum--

Thanks to everyone visiting from hackaday.com !

 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.