Introduction: Washing Machine Countdown Timer - Arduino

Hello, and welcome to my instructable for a washing machine countdown timer. The timer is operated with the very popular Arduino micro controller. See here for more information. Arduino Home Page

Aim

The aim of this project is to be able to delay the start of the washing machine by a few hours. This is to provide a cost saving and a convenience.

Purpose

1) To be able to take advantage of off peak electricity.

The electricity supply to my home is via a "Time of Use" or ToU meter. This means that I am charged in 3 different bands which are "Peak", "Shoulder" and "off Peak" The details are as follows:

Peak = 2pm to 8pm Mon-Fri 51c/kWh

Shoulder = 7am-2pm & 8pm to 10pm Mon-Fri & 7am to 10pm weekends 20/kWh

Off Peak = all other times 11/kWh

These are prices effective from 15th Sept 2014 for Origin Energy supplied via AusGrid. The prices are in Australian cents and include tax.

As you can see it is considerably more expensive to use "Peak" electricity as opposed to "Off Peak". This project is fairly useless if you are still on the old style of 'whirling disc' single tariff meters. However, each year there are less and less of those types and ToU metering will become ubiquitous over time. FYI and comparison if you are still on an old style meter then the current tariff is 25c/kWh all day every day.

2) To be able a load of washing to be completed by the time I get up in the morning.

Rather that having the wet clothes sitting in the washing machine for several hours, a delay timer allows the machine to come on, say at 5am and be finished by the time your up.

Whilst my instructable has been applied to the machine that I own (a Miele W310) I believe that many modern electronic machines rely on a 'start' button to energise the machine programme so it should be transportable to your own washing machine with a few modifications.

Please watch the video to show how it works in practice. Comments and advice are always welcome.

Step 1: The Unmodified Washing Machine

Here is the unmodified 'before' photo!

My machine is a Miele Novotronic W310. It is about 12 years old so is well out of warranty! I was worried about 'frying' a perfectly good machine and would urge you to take caution if you decide on a similar conversion of your own machine.

The documentation says it uses 0.55kWh for a standard 40DegC cotton wash. This wash takes just under 2hours to run. If you do a more energy intensive 60DegC wash it is 1.00kWh and 1.75kWh for a 95Deg wash.

Step 2: Safety

Mains electricity is dangerous....period

This Instructable concerns modifications to a washing machine powered off the main AC supply. Please do not attempt any modification of you are not confident and or competent!

However, having said this it should be possible to modify many machines without as much interfacing as I have described here. Essentially you could make your own battery powered control box and simply "parallel in" to the start button.

To be safe, always remove power before going inside such a machine. If you need to test the main board as I did then take your time and think carefully about what you are doing before doing it.

Step 3: Tools

The tools and skills required to take on this project are:

Tools

1) Torx bit (for getting into my Miele washing machine)

2) Soldering iron and wire preparation tools.

3) Multimeter

3) PC with Arduino IDE software on it.

Programming skills - not really required if you just download my pre prepared program. However the more familiar you are with Arduino the easier this instructable will be to understand.

Step 4: Parts Required

Parts required are as follows:

1) Arduino or Arduino compatible micro controller. I used a Leostick from Freetronics I think most boards would run this project.

Freetronics Leostick

It is the 1st time I've used this product and I like the idea it has a piezo buzzer already installed on the board. I picked one up from the Sydney maker faire last Saturday.

If you really want to keep costs down you could try making your own clone by following the instructions here:

Standalone Arduino

Freetronics also sell the ATmega controller (with bootloader) as a separate leaded chip.

Freetronics ATMega MCU

2) Reed Relay

I used a tiny reed relay to 'parallel in' to the start switch. This ensures that from an electrical perspective I am not altering the function of the start button, I am merely duplicating it. The relay has a 500Ohm coil so should draw 5/500 Amps = 0.01A = 10mA which is fine for an Arduino output.

Attached is the manufacturers pdf and here is where I bought it.

Jaycar reed relay

3) 7805 Voltage regulator

To provide a 5VDC supply for the project. See attached data sheet and the following link to Jaycar.

Jaycar 7805 Regulator

4) A 7 segment display (including a dot/decimal point) also bought from Jaycar.

Jaycar 7 segment display

5) Capacitors

1 x 100nf monolithic

1 x 1uF electrolytic

these smooth out the input and output of the voltage regulator.

5) Resistors

1 x 330Ohm for the 7 segment common cathode display

2 x 10kOhm for each of the 2 push buttons to 'pull' the inputs to ground.

Miscellaneous items.

Small perforated PCB

Solder

Epoxy - Araldite

Wire - various colours

Step 5: Take a Break....

Ok so this step is NOTHING to do with the project and you can skip over it.....

....but I thought I'd just let you know where I've been recently.....The beautiful Lord Howe Island. The island is 700km off the Australian NSW coast and if you ever in this part of the world its well worth a visit.

Here are a couple of links if you want to see more details....

http://www.visitnsw.com/destinations/lord-howe-isl...

http://en.wikipedia.org/wiki/Lord_Howe_Island

..and the best place to stay..

http://www.pinetrees.com.au/

Step 6: Getting Into the Machine

I firstly need to get into the machine to make an assessment to see:

1) How accessible the start push button was and if I could solder some connections so as to piggy back on it

2) Whether the display and push buttons and/or the control board could be fitted into the machine or whether I would need to add a separate box on the outside of the machine

In my case the Miele is easy to get into.

1) Just remove/pry the plastic caps covering 2 torx screws 1 on each side of the machine. Fully remove both torx screws

2) The whole lid then hinges up and is removable (no more screws to remove)

Step 7: Remove Front Panel

1) Grasp selector knob and pull.

2) The front panel can now be pried off using a small flat blade screwdriver. Start at the top right hand side as shown

Step 8: Its Tight But......

It's is tight but I think there is just about enough room to get the all the necessary items into the machine.

1) There seems to be space above the start button for the display and the push buttons.

2) Also there is space behind the control panel to mount a small home made PCB.

Step 9: Remove the Main PCB

Remove the main PCB by removing the 2 torx screws.

Now disconnect and unravel the various wire connections

The PCB can now be released from its plastic cage.

Oh gosh! Now the machine is in bits! What to do next?

Step 10: The Start Push Button

Looking at the washing machine printed circuit board (PCB) the "Start" push button is located in the bottom left hand corner. It is an easy task to 'parallel in' to this button with a couple of wires soldered onto the surface mounted pads.

Step 11: DC Power for the Arduino

Somehow I need to power the Arduino and its associated parts. If the project were to sited outside the machine I could either use a wall wart or possibly a battery but as I'm aiming to get it all in the machine I am going to attempt to find a useful supply from the washing machine itself.

To do this I took a look at the PCB and made an assessment of where I though there should be DC power. I then temporarily reconnected the cables, switched the machine on and used a multimeter. I found 13vDC on the pads indicated in the picture.

NB: There is a risk here of really mucking things up. I'm not the Miele designer of the board so I am taking a gamble that siphoning off a few mA is not going to overload the original board. See my later steps where I try to quantify the additional load.

Step 12: Prepare the Front Panel and Buttons

Having decided to integrate the timer into the front panel I prepared the front panel by drilling 2 holes for the buttons and clearing a window for the 7 segment display.

The front panel is a strip of polycarbonate (or something very similar) The decals are printed on the reverse and then an application of white paint provides an opaque background. If you rub the white paint off a 'window' can be made in the panel. I did this as carefully as I could but the results are not perfect. The technique I used was as follows:

1) Mark out the position and shape of the 7 segment display on the back.

2) Gently scrape the paint of the back of the polycarbonate to reveal a clear 'window'. (Use a scalpel or a section of hobby knife blade).

3) Use 1200 grit emery then "Brasso" to polish the window. Brasso is quite abrasive but it does produce a nice optically clear window if done well. Brasso description

4) Epoxy (I used Araldite quick set) the 7 segment display in position over the window

5) Spray paint the surrounds of the 7 segment display (my window ended up being too big - so I had to include this step).

6) Epoxy the 2 buttons in place.

7) Wire up the 7 segment display and 2 push buttons (I used a 14 way ribbon, 10 for the 7 segment display and 2 each for the switches).

8) Reassemble the washing machine PCB into its plastic cage and cover. Ensure the wires are long enough to feed out to the new Arduino controller board.

Step 13: Make the Arduino PCB

I have shown a circuit diagram and a few photos of the assembly of the components onto a small piece of perforated PCB board.

The Freetronics Leostick is mounted using its ICSP header (which I don't need to use). You just need to make sure that that in doing this the pins are not shorted together. The USB section overhangs the board to help connection when inside the machine (just in case I want to update the software at some time). The other components were located fairly randomly!

Step 14: Add Jumper Wires

I used a combination of jumper wires and soldered joints to give the flexibility of making pin changes where required.

2 capacitors were included on the input and output of the voltage regulator. These should smooth out any fluctuations in voltage.

Step 15: The Arduino Program

Here I attach the Arduino program.

I have commented the program extensively so encourage you to look at the code directly to see what is happening. I have also incorporated messages to be posted @9600baud to the serial window. These messages are not actually needed for the program but I have left them in to help with debugging.

Parts of the program, including the writing to the 7 segment display and to de-bounce the buttons is copied from examples on the Arduino website.

What does it do?

When the machine door is closed and the power is applied the Arduino boots up in a few seconds. The default countdown time is 8Hrs and the countdown timer starts immediately. IE: if I load the washing machine at 9pm then it will start at 5am.

At any time the 'up' or 'down' buttons can be pressed to increase or decrease the number of hours 1 at a time (up to a maximum of 19 hours).

If both buttons are pressed simultaneously the timer zeros out and the signal to start the machine is initiated. The reason I added this was to help with commissioning - I did not want to have to wait around for hours to see if it all works!

What it doesn't do?

The washing machines 'start' button flashes as normal and can be pressed manually. The countdown timer is an additional function and in now way alters the original operation of the machine.

To summarise the I/O

Digital pins 2-9 are for the 7 segment display as follows:

Digital Pin 2 output 'a' on 7 segment display

Digital Pin 3 output for 'b' on 7 segment display

Digital Pin 4 output for 'c' on 7 segment display

Digital Pin 5 output for 'd' on 7 segment display

Digital Pin 6 output for 'e' on 7 segment display

Digital Pin 7 output for 'f' on 7 segment display

Digital Pin 8 output for 'g' on 7 segment display

Digital Pin 9 output for '.' on 7 segment display

Digital Pin 10 output for the start up relay

(PIN 11 is connected on the Leostick to the piezbuzzer)

Analog Pin A0 input for the "up" button

Analog Pin A1 input for the "down" button

Step 16: Checking the Power Used.

When I had completed the programming I checked how much power the whole set up was drawing. I did this using a plug in USB power checker. Answer ~63mA. This made me more confident that tapping into the washing machines DC supply would not add much of an overhead.

To minimise the minor spike when the reed relay is energised I decided to momentarily switch off the 7 segment display.

See later to confirm the differences in power drawn with and without the timer energised.

Step 17: Mounting the Finised PCB

After checking there was sufficient space, I mounted the PCB on 2 short plastic stand off's.

Step 18: Refit the Panel

Make all the connection and refit the front panel. Its difficult to get a good photograph as there is just enough room!

Step 19: The Finised Project

Here is a view of the completed set up and a close up of the front panel. As I noted earlier the display is not as neat as it could be (particularly around the display) but I will live with it as is I think.

If you don't look too close it could be taken as an original fitment ;)

Step 20: Overall Power Consupmtion Change

This is a repeat but confirmatory check to see what change adding the Arduino control board has added. The 1st is without and the second is including the board. As you can see the difference is 67mA which is very close to the 63mA measured earlier. The difference is due to the fact that I'm now including the 7805 voltage regulator efficiency. Also, at these low levels the accuracy of the measurement equipment will be contributing to the results.

Step 21: Conclusions and Ideas

Well if your washing machine is this old it's time to get it updated!

I've been using the timer now for a week or so and it is proving quite useful. Perhaps you have an idea on where you could use a delay timer on another item of domestic equipment?

Let me know what you think....

Comments

author
pest85 (author)2017-01-10

Thanks for the guide.
Any issues with it so far?

millis() is fine because you use relatively small time, isnt it?

author
sjowett (author)pest852017-01-19

No issues - it still works fine.

millis() is fine for this project as you can count down/up for around 50 days. millis() is an unsigned long variable and can there for count to over 4 billion (to be exact 0 to 4,294,967,295 (2^32 - 1))!

author
DavideG19 (author)2016-07-02

Awesome!! For long time I was looking for a project like this, but I've never found. I'm looking forward to do it. Thanks a lot

author
ajrulradhi (author)2016-01-11

Very awesome! btw, can you teach me how to read the code from washing machine?

author
sjowett (author)ajrulradhi2016-01-11

What code are you referring to? The Arduino code? If so then if you are new to this then I suggest starting with some of the examples embedded into the Arduino IDE (the Arduino program).

author
JeremySCook1 (author)2015-12-21

Hi! Is the video of it working still up? I don't see it for some reason.

author
sjowett (author)JeremySCook12015-12-21

Still works for me?

Here the direct url

https://youtu.be/ucxl1GM8xp8

author
JeremySCook1 (author)sjowett2015-12-22

Thanks! Not sure what the issue is, it's coming up now. Could have been my computer.

author
el.champiero (author)2014-12-18

I just need to ask another 2 questions about this timer: How long does the relay click on for? My start button on my Whirlpool machine needs to be pressed and released to start the wash cycle. If it is held on for over 2 seconds, it stops the cycle and the machine drains itself of water. This is used in case the machine is operated without adding some clothes or perhaps you forgot to put the soap in etc. So, for this timer to work on my machine, it is critical that the relay only clicks on for about a second and then clicks off again. Also, if say, I turn on my machine and the timer display appears on say 8 hours (or whatever it defaults to), if I then use the start button normally will this then override the operation of the delay timer? I ask this as I live with two lodgers who may not always remember to use the time delay function if it causes the machine to behave in an odd fashion :-)

author
sjowett (author)el.champiero2014-12-21

The relay holds in for 250 milliseconds the section of code is thus:

delay(250);

This line is in the fuction "washingmachinestart"

If you press the start button before the timer has finised then the machine will start - so in answer to your question it will override the timer. The timer and the start button are in parallel with each other.

author
el.champiero (author)sjowett2014-12-22

aha! got it now. Useful to know. I had a look through the coding and noticed the line with the delay in it. Looks like this will work very well with my machine. all looks reasonably straight forward to me including the schematic. I think I'll use stripboard to build it.

author
el.champiero (author)2014-12-18

If say, the machine was operated normally using the start button and the timer display said something like 8 hours on it, and say said person went out for over 8 hours and then returned, I think the timer would then start the wash cycle again thus causing a potential issue. Would there be a way to modify the code to prevent this from happening? On rare occasions, some of us have put a washing load on and forgotten to get the clothes out for several hours afterwards. If I am thinking on the right lines, I presume that they would have to start the machine by pressing both the timer buttons together in this case, thus removing the risk of the start button causing a problem. Is there a way round this perhaps by incorporating a "timer activation" push button in the circuit somewhere? Ideas welcome before I start on this project. I expect there are a few people out there with machines with a start button that has a dual function.

author
sjowett (author)el.champiero2014-12-21

Hi el.champiero For my washing machine, pressing the start
button again has no effect (even after the cycle has finished).The microprocessor waits to see the
"door open--door shut" cycle before it resets itself ready for a new
run.I guess you can experiment with
your machine to see what happens - I think it would be bad programming on
Whirlpool if the cycle kept on restarting every time you press the start button
when it was trying to complete a wash?If, on the other hand, the timer initiated a 2nd cycle after the 1st one
then all you are going to get is very clean clothes!

author
el.champiero (author)sjowett2014-12-22

Cheers for the info - most helpful! From what I remember when I last tinkered with the machine (to rewire it to run on 13A rather than 16A) I remember seeing that there is quite a lot of space in the top panel to put another small board there. I'll get busy with the circuit in the next few months!

author
gabbiy110177 (author)2014-12-20

ideia e bun dar ar merge facut asa ceva la un filtru de cafea sa porneasca la anumit timp sa cand te trezesti cafeaua sa fie gata


author
sjowett (author)gabbiy1101772014-12-21

....in the UK these were popular in the 1960's and they were called "teesmaids" (for a cup of tea rather than coffee but you get the idea)! And yes I had to use Google translate!

author
el.champiero (author)2014-12-21

Buna ziua - Sunt folosind Google Translate astfel scuze pentru români ciudat: 0)
Ai putea folosi acest circuit într-un aparat de cafea, atâta timp cât acesta are un buton de pornire sau ceva asemănător.

bună idee!

author
el.champiero (author)2014-12-17

A very useful instructable. I have been having similar ideas to modify my Whirlpool Pro washing machine with a programmable time delay switch. Like the Miele example, you can select a programme and then you have to push start to make it happen. Therefore, it looks to me like it will be possible to either use a pre made timer PCB or an Arduino one and use DC power from the main PCB (the timer switch PCBs I have seen operate on 12V DC), and run the output wires to the start button. It is very good to see that I was thinking on the right lines - well done to you!

author
sjowett (author)el.champiero2014-12-18

Hi el.champiero - thanks for you comments - The pre-made timer is a good idea. I have just completed another hack, on my fridge this time. In a similar manner to the washing machine additions (ie faking a push button), the temperature is adjusted throughout the day to avoid the peak electricity rates. I'll post it in the coming months for the rest of the instuctables community to review.

author
dkosasih (author)2014-11-17

Well Done!!!

I have been searching a similar tutorial how to "borrow" power from existing mainboard. This is great!

Is possible for you to get into detail of how to use the power from mainboard? the journey of finding the DC power?

and more details on the wiring part? :)

Thanks!!

author
sjowett (author)dkosasih2014-11-17

Here are my thoughts on "Borrowing" power from unknown boards?

1) With the power disconected I would do the following:
a) close visual inspection might find some screen printed text on the board possibly indicating +, - or GND. Also look out for pads/pins on the board which the manufacturer may use for testing purposes. There will usually be several of these.
b) With a mains AC device you can see where the power comes in (tick - easy). From that, trace (looking at the PCB tracks) further downstream and you should see a rectifier (or set of diodes) this converts the AC to high voltage DC. The next components will either be a transformer or a set of other chips/transistors and other discrete components to lower the voltage to that required for the rest of the PCB.
c) Look closley at the tracks on the board. The thicker ones are often power rails.
d) similar to c) the GND rails are often run along the edge of the board.
e) Maybe you can see and identify a voltage regulator or similar chip or silicon component - google the part number and look at the datasheet diagram of the pins/legs of the device. From this you will get ground (-ve) and possibly one DC voltage.
2) With the PCB powered up (Danger 240V!!!!)
a) using the information gained above, carefully probe around the board with a multimeter typically you should be able to find 5v, possibly 12v, 3.3v any other voltages will be there to support a particular component or subsystem

I'm not too sure what more information I can assist with regarding the wiring - are there any specific questions you may have or want clarification on?

I hope this helps a bit.

author
dkosasih (author)sjowett2014-11-17

Thanks for your reply. it does help me with my hunger of knowledge.
I just finished a garage door project, but I ended up having to extend the wall plug, because I do not know how to "borrow" power from the mainboard.

Speaking of washing machine, it leads me to another questions.
Fortunately, I have a more advanced washing machine, which have timer and completely shutdown when finishes.
The washing machine make sound (yes, it's a song) when you turn it on, and when it finishes.
Hypothetically, I want my Arduino to inform me when the washing is finish, of course I can monitor the power and send the signal when it power down, but this is not the case because it will shut down completely after it's done.
Is it possible to tap into the speaker line and monitor the pulse it's sending to determine if it's a start sound or finished sound, and recognise half of the song, and quickly send signal to server before it loses power???

again, thank you...

author
SilverTB (author)2014-09-25

This reminded me of the Cloud Wash from Berg,

vimeo.com/87522764

Nice instructable

author
AD8BC (author)2014-08-23

Nice project, but good God, 51 cents AU for a kWh during peak and 11 cents non-peak? That's like 48 and 10 cents US.... In Texas USA I pay 8.5 cents a kWh all freaking day!

author
sjowett (author)AD8BC2014-08-24

Hmmm 8.5c/kWhr that is low! However cross boarder comparisons are always going to be difficult even with 2 similarly developed countries such as the US and AU.

My attitude is muted even though I have to pay a high price for peak electricity as I actually approve of this kind of price signalling as it accurately reflects the situation that the system that supplies your house has to be sized to reflect peak demand.

Unfortunately in the case of Australia the people who run the national grid made a huge cock up a few years ago when they predicted that electricity usage was going to continue rising. Virtually on the day the ink was dry on the report the overall usage stated falling and keeps on falling. It was too late to stop the $48B that they decided to spend on the poles and wires so we are all paying for this gold plated system now. $48B will be small in US terms but very large for a country of ~25M people! I'll stop droning on now ;)

author
CarterBond (author)2014-08-23

Intresting

author
diy_bloke (author)2014-08-23

very useful.
My washing machinehas an on and off button and starts a few secs after the program is chosen, so for me it is sufficient to just use a timed switch that supplies power to the machine, but if ever i get a new one, this will be a handy thing to have

author
sjowett (author)diy_bloke2014-08-23

Hi - I have had a similar reply through another forum. It seem like there are a number of machines that will come on in this manner. I wish mine could as it would have been much simpler (but perhaps not as much fun)!

I'm guessing that the machines that do are probably on the older style of mechanical dial timer - or, perhaps if it is an electronic type there must be some form of memory function for when the power is removed?

author
Reichenstein7 (author)2014-08-22

Clever =)

author
sjowett (author)Reichenstein72014-08-22

Thanks. However, I can't claim this is a new idea as countdown timers are already included on many new washing machines. I guess the manufacturers want to retain some product differentiation so they can sell the higher spec machines for a premium.

author
Reichenstein7 (author)sjowett2014-08-22

Makes sense, a few more features for a higher cost. I have seen timers on commercial grade dryers, but I like how you went about upscaling your washer. I need one on my dishwasher =P

author
seamster (author)2014-08-22

Great project!

I had to chuckle at the spammy step in the middle... It's surrounded by such good content that it'll probably not cause too much trouble. Besides, it looks like a nice place for vacation :)

author
sjowett (author)seamster2014-08-22

Hi Seamster - Thanks for commenting, positive feedback is always uplifting. Regarding the spammy step, I'm not working at the moment and I spent several weeks on the island helping out with a renovation and I just wanted to share part of that recent experience. I sincerely hope nobody is offended and my apologies up front to those who are!

author
seamster (author)sjowett2014-08-22

Ha ha, you're fine! We all know real spam when we see it, and that was just a friendly plug! Hope you find suitable work soon enough. I've been through non-work times, and it can be rough.

About This Instructable

21,710views

44favorites

License:

Bio: An engineer who likes to tinker with electronics and make stuff!
More by sjowett:Meet 'Holman' the Ultimate Bluetooth SpeakerMiniature Weather Station - ESP8266Fridge Hack -  Internal Light Conversion to LED
Add instructable to: