You are on page 1of 8

Washing machine with PIC

The idea of this project was to replace an electromechanical timer washing machine by a microcontroller and a handful of things not very complex. It should be noted that this came after the necessity, not concern, my new washing machine in 2001 to date suffered three times the break timer so I got tired and decided to give a final solution. Something to consider when undertaking a reform of such dimensions is aware of what you are trying to achieve. A washing machine timer is but a giant clock that advances a particular rate (defined by the frequency of the mains). This rate is sometimes influenced by external events such as state of the pressure switch when carrying water or drain. Since I never heard of washing machines operate much I decided to look carefully and see what makes the timer and then to synthesize it with a microcontroller. And I found the following: First, load the water with a pretreat product for clothing (this is usually either bleach and coming or anything, depending on the desire to have bleach) after filling the tank with water but the product if any of the drawer in the drawer slide products starts the washing cycle, that is to rotate the drum at low speed. Some washing machines (like mine) only have a sense of rotation of the drum, other washer (mejorcitos) have two directions of rotation. This turning to one side and the other is not fancy, turning to one side the clothing is braided together making a rag ball, when the turn of spin makes the washing machine dance to Lou Vega. After a long slow cycles and pauses the tank is discharged and passed to the next step. Similar to the previous operation in this step loads soapy water instead of enlavandinada. What this does is force the water to pass through the detergent drawer and ready, all the above is the same. In truth the process is always the same, what changes is the product that is added to water at this point whether the whiteness of Julian Weich or the challenge of white soap Fabian Gianola is responsible to wash, not the apparatus. Depending on the program selected washing with soap it will be 1, 2, 3 and 4 times. Finished wash cycles is reloaded water in the drum but this time through the softener drawer. This product is liquid and is contained in a drawer specifically designed to not drain the product before the due time. Basically a piletoncido where the liquid is contained, when you throw water from above the piletn overflows and the liquid falls by gravity. Again the drum is rotated at low speed and then drained.

Finally it is the spin that is to rotate the drum at high speed (in my washing machine is not so high, 500 rpm) for seven and a half minutes (this time can vary depending on the washing machine). During centrifugation, the pump is operated to remove the drum drain any remaining water to drain. This is in summary what the washer so clothes fit well white. The theme so far is easy, but to uncover the device I found things not as pleasing to the eye. The first is the manner in which water is channeled through the cassettes in the drawer. In my ignorance pretended to find something that will power an electric mechanism which forced the water to pass through a given channel. But the reality is very different: This washing machine has a plastic knob that connects the control flow of water inside the box with the ring of the timer. Turning the timer you move the plastic knob which changes the drawer through which water passes. The system is ingenious, but very poor quality (like most things in this washer Brazilian). And this was my first headache, how to make a microcontroller to actuate the control of the drawer ... I thought of stepping motors, engines clutched in solenoids and many more crazy ... What's more, I thought to give an extra hole to get another box and solenoid valve. Powering a water inlet would a site and operating the other on the other site. This involved a system of pipes together within the team and the idea I did not like. Until I received some additional collaboration (thanks Hector !) and the solution came from the hand of the servos used for modeling. These servos require only a control signal to position an axis in a right place no matter where you are before. IDEAL!. Some helped hammer and wire for the servo locks in the washer and twinned in command of the drawer. Then came the time of the engine control computer. This engine has several windings which perform different tasks. There are two start and two are underway. As always, the starting winding must be connected to a capacitor to fall behind the stage to start spinning. With four relay controlled the motor drive. Two relays decide which is the ignition coil to use and decide which two relays will be the coil up to make it work. In this way the micro has the form of controlling the motor. Two other relays actuate the solenoid valve allowing water ingress and the pump which is responsible for draining the tank. Thanks to a two-level pressure switch the computer knows how much water the tank contains. The first level is reached when the tank is at half load, the second level is achieved by filling the tank. If there is something that scared me input is the number of cables that had washing machines, not if I fall short by saying that more than fifty cords of all colors from one side to another team. It is logical if we think the large number of functions to be performed and no more than a mechanical timer. Obviously reform after making the amount of wire was found to be negligible.

Since my problem was critical (the washing machine did not work) I decided to split the task into two stages. The first, immediate execution, would return to the team performance, this includes the water load, pre-wash, wash, rinse and spin without selecting the product to use. As was not clear how to resolve the issue of product selection in the drawer of drawers decided to implement a confirmation step by step allowing the addition of the appropriate product at each step of the process. In other words the boot put the washing powder, the end of step 1 is slow washing machine sounds a buzzer to waiting. When I put soap on the drawer again pressed the button and start carrying water for step 2 and so for the next steps. This makes the semi-automatic washing machine, but prevents me gather the dirty clothes in the laundry at home!. This led to the first micro firmware revision. It took me almost two months to find an appropriate servo (well, nice and cheap) for this application. My idea was to invest 100 dollars in a super deluxe Futaba servo since it will be inside a washing machine which as we all know works with water. So I started looking and got the HITEC servo HC-311 which is of acceptable quality and reasonable price (30 pesos). This servo screw it into the front chassis of the washer (with the original control buttons load average and excluding spin) and by a fairly rigid wire link it to achieve command of the drawer slide products. Then it was time for searching the correct positions for the servo arm, because my washing machine has four drawers four routines were necessary products other than product selection. These routines (BOX1, BOX2, Box3 and box4) are responsible for positioning the servo in its proper place in order to properly guide the passage of water through the soap. In addition to the servo control in this revision I added a couple of security mechanisms to prevent these problems are: Time-Out for loading water: water loading the pressure switch does not detect sufficient level of approx. 10 minutes the team cuts power to all parties and shall indicate on the display "E1" Error 1 - Lack of water intake. In a common washing machine that is not covered and if he were to cut their water and do not detect the electro valve is permanently connected with it that will burn. 2. Time-Out for the drain: If the drain the water pressure switch does not accuse the low level of approx. 10 minutes the team cuts power to all stages. It happens that sometimes we put the drum should not put clothes (peluchosas blankets, slippers worn with templates, etc.). Waste arising which few can sometimes lock the pump water discharge. This would lead eventually burn the motor that spins as the ventilation of the motor winding depends on plastic paddles which rotate when the motor turns. And because the motor is locked by the same burning lint. When the process water discharge exceeds 10 minutes the computer will be stopped showing "E2" Error 2 or problems downloading the water. 1.

Something happens with this security mechanism because sometimes, after a long time you have finished the process and being in "F" display (FIN) begins to accuse "E2". I even got to check why this happens because, as happens once a week does not bother me any more. But it must be some nonsense in handling interrupts. Here are two reviews available current source with the appropriate firmware. Revision 1 - ASM / HEX Revision 2 - ASM / HEX It should be noted that in reviewing an oscillator using a buzzer that had no turning around, as soon stayed silent one that had started but that was with internal oscillator so the firmware revision with oscillator 2 uses buzzer. Let now the wiring diagram:

This circuit corresponds to the power stage performance. It is for my washing machine, a White Westinghouse WW055BTW model. With two double relay controlled the operation of motor rotation. Than do the relay actuating current through the coil idle (wash) and by the start winding clockwise. If, however, I do 4

a relay will lower current through the coil of fast motion (spin) and by the start winding counter-clockwise. One thing I tried is to send current through the coil and the idle-start anti-clockwise (to see if he could roll over both ways in the wash) but it was not possible. The motor "singing" but did not move. This is because, I believe, that the coils are not properly enfasadas to operate in that combination. The way I managed to spin the drum to the counter-clockwise at low speed but was driving the spin but also slow moving coil (the gear, not the boot). Then turn the washing machine to the other side at low speed and with good strength but I do not like the idea so energizing coils at the same time, it gives me something. The two single relays control the solenoid valve water inlet and drain pump respectively. The pad's coming from the control module are ML, MC, VS and BD which actuate the engine at idle, the engine quickly, the solenoid valve and drain the pump by making mass respectively each. The other end of the relay is connected to positive 12V power source.

The electronic circuit shows the logic section of the system. This consists basically of a microcontroller (a PIC16F872) which is engraved in his memory the appropriate program. The ULN2803A is a current driver with protection diodes allows the PIC command the relay and the buzzer without representing any load. The seven-segment display to select the program to run. The numbers in each segment corresponding to the C bit in the port to be connected to each. We will see later time and number of steps in each program. Since the display is multiplexed with other functions its common cathode must be connected to

ground. The port C mic was designed for the direct handling of the display. The port B, meanwhile, was assigned to the control port A outputs and inputs to the census. The 4MHz crystal oscillation provides the micro to work. The 100nF capacitor decouples the source avoiding micro disorders due to interference. This capacitor should be as close as possible to the microcontroller. Half Load Keys and No spin are standard so you do not need further explanation. The Selection and Start buttons to select the program and step from which you want to start and start the washing respectively. These buttons are normally open type as the keys of options discussed above. The five 1K resistors keep up the tickets (Pull Up) should be open the respective switches and buttons. The pressure switch (at least that my washing machine has) has two inverters controlled by a pressure sensor rubber. When the pressure in the tire reaches the average load of the tank drives the first inverter. When the pressure reaches the entire tank actuates the second inverter. Because they are investors we will only use the contacts "Common" and "Normal Open" of each. The contacts "Common" the will to mass while "Normal Open" will tell the micro to the levels. The contact "MC" is for the half-load detection achieved while contact "CC" is for the detection of full charge. The servo is very easy to connect. They usually have three wires in the colors of the flag of Germany. The black wire should go to mass, the red power (+ 5VDC) and yellow micro (for this cable are the pulses of the thumb).

Finally the power supply is of traditional type, with a step down transformer which gives us AC 9V. Rectify and filter and get them use to 12Vdc power handling both relays as well as the buzzer and LED power indicator. The linear regulator 7805 provides the 5V necessary to power the microphone and the servo. The filtered 100nF capacitor ripple produced by this component to regulate. Programs:

This washing machine comes with two different programs. The first has six steps in which makes a pre-wash, three rinses, a rinse and spin softening. The second program has seven steps and unlike previous washing is more. At the request of my wife did not put the pre-wash program since she uses it, preferring to give a touch more of soap rather than keep pace with water alone. Therefore seen in the ASM block called box4 which selects the pre-Labado drawer but is not called from anywhere in your program. The short program runs from 1 to 6 (with the point off) while the long program runs from 1 to 7 (with the point on). The short program (which we always use) takes 1 hour 10 minutes to complete. I just do not understand is why now my washing machine washes better being strictly respecting the original programs (do not think it by going off with soap instead of pre-wash with anything ...). At power up a script appears on the display while flashing point. This lasts five seconds. If within that time pressed one of two buttons (any) will show a "P" is displayed indicating that is used as a confirmation step. This mode sounds the buzzer at the beginning of each program and hopes that the user presses the button before starting. This allows you to put clothes in the middle of the process or remove them before centrifugation or rinsing. Believe me it is something useful and it has no washing machine. Select the appropriate program with the button on RA0 and we begin the process with the key on RA1. Beginning immediately the water load. Since during the loading process of water is controlled at all times the status of the switch "Half Load" we can switch it off even after the washing. The same applies to the "spin". If during the washing process the electrical current is cut and the drum is loaded with water it will be no problem. Returning energy washing machine initiates a check and having water in the drum will be a drain and then at the start, as always. When finished washing three beeps will sound and display an "F" on the display end. We can now press the button program selection and re-wash or unplugging. Mounting: I use a plastic box type relays Chillemi to place far from the micro plate, well near where the parties control (motor, solenoid valve and drain pump). Besides the seals hung high up transformer which is complicated to achieve water. I did the same with the board which she was taking the place of the old mechanical timer. Where was the thumbwheel place a transparent acrylic that I cut into which are the two buttons and the display indicator. I mounted the servo on the chassis front along with the keys of options "Half Load" and "spin". Photos available:

Relay box Solenoid Front Panel Platelet

Pressure switch and transformer Servo (close) Servo (far)

Something to keep in mind when riding around in a washing machine to see how far he can throw off the drum. This is very important because rather than being the program if the concrete rubble gives a blow to the relay box disaster can happen. Keep in mind that we are working on a washing machine where water and hoses. For over everything right now that we have to consider where you can go for the water in case a hose breaks. Plan this is to have less headaches later. Author: Paul Canello (pablo@canello.com.ar)

You might also like