• Making it smarter

    Boris van Galvin03/12/2017 at 21:00 0 comments

    Last night I was finishing some washing and thought about ways to make this thing smarter.
    Maybe adding a flow meter to the pump so when the train cycle has finished and there is no more water being pumped out the spin cycle ends.
    Using something like this.

    The other thought was to add an actual water level sensor. There is a tube at the base of the tub that goes upwards to the existing sensor/switch, you dial up the water level and when that level is reached the switch triggers but I was contemplating adding one of these instead.

    Only other thing that would be cool is a sensor to work out just how much washing is in the machine but I cant really see any way to do this at the moment as it cant really be based on weight as clothes have different weights and an optical sensor would not really work as things like sheets when you put them in tend to sit a little higher but then compress more when they are wet.

  • Who let the smoke out

    Boris van Galvin03/11/2017 at 11:30 0 comments

    This is the MOV that was across the relay contacts.
    Looks like it got a little toasty.

  • Mini Pro V Nano

    Boris van Galvin03/11/2017 at 05:32 0 comments

    Still suffering from a bit of noise or some form of instability, its similar to what I was finding using the Mini Pro to drive a stepper. Checked the PSU and that is nice and stable so when in doubt fall back to what worked to solve the stepper issue I had and that was swap out the Mini Pro for a Nano.

    I suspect there is something in the Mini Pro design that makes it a little more susceptible to interference but I guess after a few more cycles we will soon see.

    The only other issue it could be is that one of the salvaged caps I used for the R/C circuit has decided to start failing. When i finalise things I may add a few MOV's to the mix

  • Testing Testing 123

    Boris van Galvin03/10/2017 at 21:48 0 comments

    6 loads of washing and it is running as expected without any issues, I have even had the guts to leave it plugged in with the power on for 2 days now.

    Now its time to pretty things up and start working on some additional features and more advanced code with a few safety features and maybe hook up the lid switch again

    Given most of the routines are time based I have decided to make use of probably one of the best librarys i have found. Chrono as it has all the features required and the developers are prety quick to respond to any issues.

    LOL: And as luck would have it ,after completing 6 loads of washing and hanging it out to dry it started to rain :( given the urgent need for some clothes I decided to use the dryer and to my dismay that stopped working. I can see another hack coming in the near future but for now the problem was the tensioner for the drum belt had work out at the door clip had broken. Thankfully I have a 3D printer on hand so printing up a new clip and a new tensioner was a simple process.

  • More on the Snubber

    Boris van Galvin03/08/2017 at 23:06 0 comments

    Sure enough the snubber seems to sort out most of the issues however the snubber for the spin cycle needed to be connected in parallel across the motor and not across the relay as the actuator seems to use an asynchronous motor and is really low current. Putting the snubber across the relay was causing the R/C circut to feed enough power to run the motor even when it was turned off.

    I could adjust the values however did not have the components here to do that.

    It seems that the water valve solinoids do not need snubbers in place.

    Now to test the machine on a full wash cycle then back to making a more advanced version of the code with a few additional features like gentle wash and an extended spin rinse cycle as firing water in to machine while it is spinning seems to cause the clothes to rinse out a lot better than just fill, agitate and spin.

  • Test Code

    Boris van Galvin03/08/2017 at 09:23 0 comments

    Now for some code, I will add the final version later as there are a pile of additional timer routines but for now I am testing the stability of the system. There seems to still be some RFI issues when the spin cycle ends and the actuator drops the brake but I also ran out of parts to make a snubber for the actuator so this fault should go away once the additional snubber is n place.

    Yes i know its full of while loops but I wanted this to be as simple as possible for testing purposes.

    #include <Bounce2.h>
    // Constants for Control Pins
    const int LedPin =  13;         // LED Pin
                                    // Washingmachine Sensor Pins
    const int WaterLevelPin = 2;    // N/C Switch to sense the water level If it goes open then stop everyting.
    const int LindSwitchPin = 3;    // Goes OPEN circut if the lit is opend. E-STOP
    const int SpinSensorPin = 12;   // When the spin locking pin is in place this is short
                                    // IN# are the relay inputs for the Duinotech 8 Channel Board
    const int CWPin = 4;            // IN1 - Clockwise Pin
    const int CCWPin = 5;           // IN2 - Counter Clockwise / FAST SPIN Pin.
    const int SpinActuatorPin = 6;  // IN3 - Pull the locking pin in for the spin cycle
    const int ColdWaterValve = 7;   // IN4 - Cold Water Valve
    const int HotWaterValve = 8;    // IN5 - Cold Water Valve
    const int WaterPumpPin = 9;     // IN6 - Water Pump
                                    // Control Pannel Pins
    const int StartPin = 10;        // Restart After and Error
    const int RestartPin = 11;      // Restart After and Error
    // Control Variables
    int ledState = LOW;             // ledState used to set the LED
    int CWState = LOW;              // Clockwise Relay State
    int CCWState = LOW;             // Counter Clockwise Relay State
    int SpinState = LOW;            // Spint Actuator State
    int ColdState = LOW;            // Cold Water Valve State
    int HotState = LOW;             // Hot Water Valve State
    int PumpState = LOW;            // Water Pump State
    int incomingByte = 0;
    int MachineCycle = 0;
    int WaterLevel = 0;
    int SpinEnabled = 0;
    long AgitationCounter = 0;
    long BallanceCounter = 0;
    long RinseCounter = 0;
    long SpinCounter = 0;
    long EmptyWater = 0;
    long SoakCounter = 0;
    // Instantiate a Bounce object
    Bounce debouncer = Bounce();
    void setup() {
      Serial.begin(9600);                   // Serial Communications for Debuging
      pinMode(StartPin,INPUT_PULLUP);       // Pin to use for the Start Button
      debouncer.attach(StartPin);           // After setting up the button, setup the Bounce instance :
      debouncer.interval(40);                // interval in ms
     // set the digital pin as output:
      pinMode(LedPin, OUTPUT);              // Onboard LED on pin 13
      pinMode(WaterLevelPin, INPUT_PULLUP); // Enable Pullup for WaterLevel Sensor
      pinMode(LindSwitchPin, INPUT_PULLUP); // Enable Pullup for Lid Switch
      pinMode(CWPin, OUTPUT);               // Clockwise Motor Control
      pinMode(CCWPin, OUTPUT);              // Counter Closkwise Motor Control
      pinMode(SpinActuatorPin, OUTPUT);     // Spin Actuator Solinoid
      pinMode(ColdWaterValve, OUTPUT);      // Cold Water Valve
      pinMode(HotWaterValve, OUTPUT);       // Hot Water Valve
      pinMode(WaterPumpPin, OUTPUT);        // Water Pump
      pinMode(StartPin, INPUT_PULLUP);      // Start Button
      pinMode(RestartPin, INPUT_PULLUP);    // Restart/Resume after Error
      pinMode(SpinSensorPin, INPUT_PULLUP); // Enable Pullup for Spin Sensor
    void loop() {
      debouncer.update();                   // Update the Bounce instance :
      int value = debouncer.read();         // Get the updated value :
      if ( value == LOW ) {
        Serial.println("Washing Cycle Started");
        MachineCycle = 1;                    // If the button is pushed start the machine  
       // send data only when you receive data:
      if (Serial.available() > 0) {
        incomingByte = Serial.read();       // read the incoming byte:
        Serial.print("I received: ");       // say what you got:
        Serial.println(incomingByte, DEC);
    if(incomingByte == 48){
      Serial.println("Stop Machine");
      MachineCycle = 0;
      // If we receive a 1 run this
      if(incomingByte == 49){
        Serial.println("Start Machiner");
        MachineCycle = 1;
      if(MachineCycle == 1){
      Serial.println("Filling Machine with Cold Water for Wash Cycle");
        while(digitalRead(WaterLevelPin) != 1){
          //Fill the machine
              digitalWrite(LedPin, HIGH);                   //Start Filing
              digitalWrite(ColdWaterValve, HIGH);           //turn...
    Read more »


    Boris van Galvin03/08/2017 at 09:16 0 comments

    After writing some code and making the thing work then connecting the motors things were not working as I would have expected. The arduino started to lock up and do some really weird things and the USB would drop out for no reason.

    I re-wrote the code several times thinking that it was something I had done then made s really simple for loop that did the same thing.

    It turns out that the motors when running on 240V and connected to the relay was creating some RFI that was getting picked up by the arduino's clock causing it to lock up and do some weird things.

    So I decided to lineament a snubber circuit made up from a .47UF cap and a 1W 47ohm resistor connected across the relay points. in theory it should be connected in series to the motor but this was not working correctly and made little difference

    Why they don't build this on the the duinotech board in the first place is any ones guess as most people using this board would suffer from the same problem.

  • Arduino / Relay Pin Assignment

    Boris van Galvin03/08/2017 at 09:05 0 comments

    Arduino PinFunctionRelay ConnectionWashing Machine
    2Water LevelBlack N/C
    3Lid SwitchNot Used Yet
    4Motor CWIN1A5 - RED
    5Motor CCWIN2A2 - WHITE
    6Spin ActuatorIN3A4 - YELLOW
    7Cold Water ValveIN4CV - WHITE
    8Hot Water ValveIN5HV - BLACK
    9Water PumpIN6A6 - WHITE - PP
    11Run Switch
    12Spin SensorA7 - Purple
    A9 - Purple to GND

  • Tracing Wires

    Boris van Galvin03/08/2017 at 08:53 0 comments

    The first step was to start tracing all the wires and rip out the old controller.
    Essentially the motor in this one is a 3 wire AC motor, this uses a starter cap and a common neutral. One winding causes the motor to rotate CW the other CCW.

    There is a kind of actuator that pulls in the a locking pin to engage the spin cycle when the motor is run CW.

    Care must be taken with this as unlike most things that have been wired up form some reason the simpson 711 wires are all labled BUT one end of the wire will say one thing then when it enters the connector it will say something else the at the termination point it will be labeled somehting else again.

    I decided to base my wiring on the plug labels.

    A1 = Blue = Common Neutral wire for Motor, Spin Actuator and Water Pump.

    A2 = White = Starter Capacitor and CCW Motor

    A4 = Yellow = Spin Actuator

    A5 = Red = Capacitor and CW Motor

    A6 = Black = Water Pump

    A7 = Purple = Spin Engaged Switch

    A9 = Red = Spin Engaged Switch

    White CV wire = Cold Water Valve
    Black HV wire = Hot water valve

    Purple = COM = Common Water Level Sensor

    Black = NC = Normally Closed Water Level Sensor

    Brown = NO = Normally Open Water Level Sensor

    Inside there is also a microswitch for the lid however for the moment I have no bothered connecting this.