Why?

I felt sorrow to throw away the machine when it is in a good condition and it is also fun to develop and create embedded electronics. I really like programming of MCUs.

Another reason is my father has horses and the machine will be used for washing the horse's 'clothes'.

Machine itself

Washing machine Ardo A600x consists of these electronical components:

  • Outputs
    • Dual speed AC drive with 5uF condenser
    • ~2Kw heating element
    • Electric doorlock
    • Valve for water filling
    • Drain pump
  • Inputs
    • Binary temperature switch with temperature setup
    • Two level water level switch (low water level. high water level)
    • 3 front panel switches (just one is used in my project)
    • Doorlock feedback

Hardware - version 1 [obsolete]

My first version of the project consisted of ebay 16-relays module to control the outputs and universal PCB for TQFP48. It looked really horrible. I had a lot of problems with this design like:

  • MCU hardware fault interrupts
  • relay contacts got welded because of no zero cross switching.
  • ....

These pictures are from the old board. As you can see there is a lot of varistors to protect the relay contacts and the MCU board with a lot of transils - the problems with unhandled exceptions were not fixed by all this protection.

Old version of hardware

Hardware - version 2

So I decided to use semiconductor to control the power outputs. Triacs are ideal solution. I use triacs BT136X and BT138X with isolated package and MOC 3020 optotriacs with zero cross detection switching. All the problems mentioned above suddenly disappeared no more MCU hardfaults or welded contacts.

This is the first version of the controller board with triacs. The heating element triac was supposed to be on the board as well but it got burnt with the poor heatsink used before.

The only issue is that the triac for the heating element dissipates around 10Watts of heat - huge heatsink is needed. This is no real problem because there is a lot of space in the machine case. Maybe the machine case would have been a good heatsink but I did not test that.

So I moved the heating element triac on huge heatsink which is located on the other side of the case. It is connected by 2.5mm^2 copper wires - the heating element drains almost 8Amps.

Right now the triac solution is in heavy testing. I have already tried to turn on the heating element for 15-20 minutes and there were no problems with triac overheating.

I also got a noname 12VDC power source to supply the electronics.

The front panel now has a new LCD which tells you the current state of automatic machine and you can setup machine constants with rotary encoder.

Actual hardware and firmware design is on the github repository.

Firmware

All the firmware is also in the githup repository.

The firmware is based on ChibiOS realtime operating system. It has a lot features like thread support, synchronization primitives, queues, hardware abstraction layer and many others.

Firmware contains two threads. The first one (main function) reads inputs, work with state machine and write outputs. The second one is doing the GUI system for LCD display.The principle of the state machine is here

Every state of the machine sets different outputs.