Close

Firmware

A project log for Borg Washing Machine

Homemade PLC-like electronic replacement for the mechanical timer in my washing machine.

jose-ignacio-romeroJose Ignacio Romero 02/16/2015 at 23:220 Comments

[January 15, 2015]

For the initial test runs of the machine I wrote a minimal program in ladder logic for a full, fixed wash, rinse, and spin cycle. I chose LDmicro as the runtime since it's very simple to use and supported my processor pretty well.

The "heart" of the program is a sequences of cycles: wash, rinse and spin. The wash and rinse cycles are divided into 3 phases each: fill, tumble and drain. As each phase is completed, a coil is sealed and the next phase starts. once all phases are completed, the coils are released and a counter is decremented, restarting the cycle. Once the counter reaches zero, a coil is sealed and the next cycle is started. The spin cycle uses a simple timer as end condition. Once all cycles are completed successfully, the "program running" coil is unlatched and the program halts, unlocking the washer's door.

There are several safeties built in that would pause the program if triggered (for example, door not locked, overflow switch.) One thing that is missing however is an alarms system to report the errors to the operator, and abort sequences like draining with the pump on overflow for example.

Next version of the program will have an operator control panel to select among several predefined cycles and edit their parameters. Another thing to add is a product dispensing system to add detergent and fabric softener as needed in different parts of the cycle.

LDmicro source and text conversion available on gist

Discussions