Sie sind auf Seite 1von 12

Did you ever face that, your washing m/c already run out the mechanical timer dial?

After using for several times, the dial gear may worn out, and then it can not move anymore. Yeeeeeezzzz.... if you are like me, than this page is the right for you.

A. PREFACE
Many washing m/c shell in the market has mechanical controlled sequence for activated the timer and the sequence back and forth for their motor; washing motor or spinning motor. Spinning motor control only has one direction only, and its simple could be changed to the discrete mechanical timer which sell on the market. But washing motor control has 2 direction for this purpose, it means to squeeze the clothes, it must go to forward and then reversed. The sequence is like this :

First, go to forward direction for about a few seconds Than stop, while the chamber is still rotate Second, go back to reverse direction for about a few seconds Than stop, while the chamber is still rotate And so on, back and forth, until the the timer elapsed

At first, I want to change it to the original parts. But to find the perfect parts is very difficult, even the shop (store) or its showroom don't have the part. I think to change it to electronic circuit. But to run it from electronic, it takes a lot of components and beside that it is not so simple circuit. At last I try to make it from microcontroller, because by using microcontroller, it takes more simple circuit and the sequence can be changed easily, when it is not perfect. Manymany times. Here it is ...

B. SCHEMATIC
Timing sequence like the above description, can be implemented with many way, by using discrete electronic components, timer, using a program or a microcontroller or microprocessor, etc. Because I am learning the PIC microcontroller for right now, I will implement this function using this microcontroller, but for you who familiar with another kind of microcontroller my adapted it to your purpose. By using PIC micro, it can be made more compact. First I plan to make 2 buttons, 1 for set the timer and another for reset the timer or for the emergency stop push button. Then to know the timer works or not, I need a visual display. For this purpose I will use 7-segmen display showing the rest of the timer. To run the motor sequence of course I need a pair of relays (power relays, about 3 Amperes output), one for forward and another for reverse

option. I will use the very common family of PIC micro, ie : 16F84A, because this is the most popular type and very simples used and very much used. Also can be obtained easily in the market. But this is the medium type of PIC micro family. It has 1kByte of memory (EEPROM type) and 13 I/O pins. It can be reprogrammable thousands times. Because the I/O just only 13 pins, I used a BCD to 7-segmen chip. So it will left a few I/O pins for expanded in the future. You can omitted this chip for timing sequence purpose and save one IC price, because the I/O just exactly enough. By selecting the proper pin of PIC micro like this :

I/O port A-0 = SET push button I/O port A-1 = RST push button I/O port A-2 = Reserved I/O port A-3 = Reserved I/O port A-4 = Reserved I/O port B-0 = Forward Relay (Run motor forward) I/O port B-1 = Reverse Relay (Run motor reverse) I/O port B-2 = Activated unit 7-segmen (multiplexed) I/O port B-3 = Activated ten 7-segmen (multiplexed) I/O port B-4 = BCD data A (for 7-segmen) I/O port B-5 = BCD data B (for 7-segmen) I/O port B-6 = BCD data C (for 7-segmen) I/O port B-7 = BCD data D (for 7-segmen) Also integrated power supply to run it modularly

The I/O can be configured as input pin or output pin bit-ly. It is up to you to choose the I/O pin number goes to what function, but it infect the program firmware of course. Once you choose, then it is just like that, except you also change both, the program and the hardware. So the schematic are like this.

C. LAYOUT
I already design the PCB layout for this purpose, and for compact use. Of course you can use another kind of wiring like vero-board or direct wiring (rat nest), but this design already tested. I put the relay to another board, so the design can be used for another purpose.

D. PART LIST
Here are the part list for this washing controller :
1. Resistors : R1 ~ R7 = 220 Ohm, 1/4W, 5% ................................ R8 ~ R11 = 1k, 1/4W, 5% .................................... R12 ~ R14 = 4k7, 1/4W, 5% .................................. R15 = 68 Ohm, 1W, 5% ....................................... Optional R16, R17 = 1k5, 1/4W, 5% (relay indicator led) .... 2. Capasitors : 7 4 3 1 2 pcs pcs pcs pcs pcs

C1 ~ C2 = 22 pF (for oscillator) ........................... 2 pcs C3 ~ C4 = 100 nF (for IC decoupling, used as necessary)..... 2 pcs C5 = 100 uF/25V ............................................ 1 pcs 3. Semiconductors : IC1 = PIC16F84A (PIC microcontroller) ..................... IC2 = 74LS248 (7-segmen decoder common cathode, optional) .. Q1 ~ Q2 = BC548B (NPN transistor) .......................... Q3 ~ Q4 = C1061 or H1061 (NPN transistor) .................. D1 ~ D6 = 1N4007 (Silicon diode) ........................... SEG1 ~ SEG2 = 7-segmen common cathode (red) ................ Optional LED1, LED2 = 3mm, Red (for relay indicator) ....... 4. Others : X1 = 4MHz (Crystal oscillator) ............................. Optional IC socket for 18-pins (use 20-pins) ............... Optional IC socket for 16-pins ............................. Optional IC socket for 24-pins (for 7-segmen LED) .......... Optional terminal connector CON1 = 2 pin ................... Optional terminal connector CON2 ~ CON3 = 3 pin ............ 1 1 2 2 6 2 2 1 1 1 1 1 2 pcs pcs pcs pcs pcs pcs pcs pcs pcs pcs pcs pcs pcs

S1 ~S2 = Miniature push button (Push on) ................... 2 pcs RL1 ~ RL2 = 12V Power Relay (output 220V-AC/3A) ............ 2 pcs T1 = Transformer (P=220V, S=12V/250mA) ..................... 1 pcs

E. FIRMWARE
PIC microcontroller IC needs to programmed with the specific programmer. Many commercial programmers can programmed this IC. But for this purpose of course, I don't want to spend too much to these kind of programmer. So I used a self made PIC programmer. Many free design PIC programmer included with its software program on the net right now (search the net by types "PIC micro programmer). Some are free, some are shareware, many are commercial made. Some only for a specific type, some for a wide variety types. I choose a free one. I made the El-Cheapo PIC programmer, because I already have the PCB when I buy the book of Myke Predko (as a free bonus included with his book), also this is a simple one. It can programmed a few types of PIC micro from the small type to the large type. And the most important, it works. I already reprogrammed many-many times. But I change the original design to fit the last version (newer version, its V0.84 when I made this). This is my PIC programmer looks like. When making a PIC micro firmware, it needs a compiler too. Many commercial program selling at the market, from assembler, basic, c, pascal, and so on. Also as usual many are free, shareware or limited version of this program reserved on the net. I used C program PICCLITE compiler (This is a free limited version C compiler from Hi-Tech software, only for PIC16X84 & PIC16X627 types), because its already included with CDROM that come with the book and also can be fast learned (This template C program suppose to used for the robot application by the writer). The free MPLAB assembler compiler also a good tools, but more difficult to learn. I also found a good compiler, free pascal compiler, but still limited development (all is free, include the source program base on GNU licence). More interesting to learn yet. For this washing sequence algorythm, I make the sequence like this :

If SET push button pushes, the washing sequence start If RST push button pushes, the washing sequence stop immediately Washing sequence start like this o Overall timing about 10 minutes o Every elapsed minutes displayed to 7-segmen (2-digits) o Run forward about 10 seconds o Stop about 3 seconds o Run reverse about 10 seconds o Stop about 3 seconds o Then loop from run forward again (repeatedly), until the last seconds timing

To immediately response the stop button (or as an emergency stop button), it needs a hardware interrupt infect. This microcontroller are capable to do this task, but the I/O pin must be dedicated to the specific I/O number. So I decide to used a timer interrupt. Timer interrupt used the internal timer to make an interrupt from an interval time (for this purpose once at every 1ms). This interval time used to generate the timing for seconds and minutes, also the 1/1000

times from a second to response the push button presses (this is more than enough to stop the sequence). I can stop the process immediately in anywhere from the 10 minutes processing timing. This 1ms also used to refresh the data sequence to the display, because I used a multiplexed 7-segmen (for a good visual, about 50 to 60 times a second, the blinker can not be seen any more). That's all ...!!! Here is the firmware : washing controller (wash.c, wash.hex).

F. PROTOTYPE
Here are my prototypes controller board and relay board look like.

G. COMPACT VERSION

As I told before, The PIC16F84A type PIC micro have 13 I/O pins and can accomodate all the function for this washing timer. By using all of this option, 7-segmen decoder chip can be omitted and we can save one componen price. Here is the new I/Os mapping :

I/O port A-0 = SET push button I/O port A-1 = RST push button I/O port A-2 = Forward Relay (Run motor forward) I/O port A-3 = Reverse Relay (Run motor reverse) I/O port A-4 = Activated unit 7-segmen (multiplexed) I/O port B-0 = Activated ten 7-segmen (multiplexed) I/O port B-1 = Data a for 7-segmen I/O port B-2 = Data b for 7-segmen I/O port B-3 = Data c for 7-segmen I/O port B-4 = Data d for 7-segmen I/O port B-5 = Data e for 7-segmen I/O port B-6 = Data f for 7-segmen I/O port B-7 = Data g for 7-segmen

But be careful of pin A-4, because this I/O can not function as a source output (it is an open collector I/O), I got cheated by this pin when I make my stepper controller board, so it must have a pull up resistor. With this kind of layout the schematic also change. Once you change the hardware, then you must change the firmware too. Here is the new firmware (wash1.c, wash1.hex) for this purpose and the new pcb layout.

H. MODIFICATION & IMPLEMENTATION


Implementation to my washing machine in fact need one more option, ie: for selecting the operation mode, it is a normal mode or a soft/gentle mode. My washing machine type is like this :

At the left, there are 2 selection mode push buttons, soft or normal mode, then follow by the broken wash dial timer. Hacking the contact of this timer dial show that for the normal mode operation, it is about 3 times contact for a round, while for soft mode operation, it is about 2 times contact for a round.

So I add this option mode to the I/O map like these :


I/O port A-0 = SET push button I/O port A-1 = RST push button I/O port A-2 = Normal mode select I/O port A-3 = Soft mode select I/O port A-4 = Reserved ... and so on ...

and made some changes to the firmware like these :


For normal mode operation, nothing change from the above sequence o 10 sec forward/reverse and 3 sec stop For soft/gentle mode operation, change the sequence o 5 sec forward/reverse and 5 sec stop

Here is the firmware (wash-a.c, wash-a.hex) Don't forget to put the pull-up resistors (4k7) for these input buttons. Then the wired connection for the new circuit is like this. There is still more place for any parts to fit inside the control panel. I put the start stop buttons and the 7-segmen display at the left side of this panel. Here is the pictures before and after modified :

Then these are the pictures after modification :

Here is the complete package for all project.

I. ELECTRONIC CIRCUIT VERSION


Last search for this function recently, I bump to another site that give the perfect match with this function but all in electronic circuit. So for you who did not want to built it with the microcontroller version, you could choose this electronic version washing machine timer.

References : 1. Data Praktis Elektronika - Kumpulan Data Elektronika Populer, oleh : Elektuur,1986, Multimedia/ELKOMM - Gramedia (1985, Elektuur B. V. Netherlands)

2. Kumpulan Data Penting Komponen Elektronika : Panduan Cepat IC Linier, TTL, CMOS (Data Sheet Book), oleh : Elektuur, alih bahasa : Wasito S., 1986, Multimedia/ELKOMM - Gramedia (1985, Elektuur B. V. - Netherlands) 3. Programming and Customizing PICMicro Microcontrollers, by : Myke Predko, Mc. Graw Hill, 2001, Second Edition 4. PIC Microcontroller Project Book : A True Beginner's Guide to The Popular PIC Microcontroller, by : John Iovine, Mc. Graw Hill, 2000 5. Programming Robot Controllers, by : Myke Predko, TAB Robotics, Mc. Graw Hill, 2003

Create on : Feb 1, 2004 Last updated : 02/19/2011 20:28:16 - by : David Setya Atmaja Persons who interest so far :

Return to Parent Page

Das könnte Ihnen auch gefallen