Introduction: Water Sensor Power Shutoff

So this is a problem I have been trying to solve for a while now ,since we moved in we had problems with our washing machine drain overflowing. Its been snaked etc but with little kids in the house who knows whats going down the drains ! I looked everywhere for a device that would shut off power and stop the washing machine from draining into the drain but found nothing. There were devices that would shut off burst water pipes but nothing like this . So what we did was finally use all these arduinos I have sitting around . The parts list is pretty slim and you will spend the most on the PowerSwitch Tail II.

The case is a work in progress and can be made to fit your environment I am planning on using an Altoids tin and cutouts for the wires and switch to sit. The sensor will be attached to the PVC Drain at the top to catch any spillover.

Items Needed:

Arduino Uno

PowerSwitchTail II

Momentary push button switch (Radio Shack)

Moisture Sensor ( Used wRobot) http://www.amazon.com/gp/product/B00AFCNR3U/ref=oh...

Various wires

Step 1: Make the PowerSwitch Connections

Pin 1 on the PSTII goes to Pin 13

Pin 2 on the PSTII goes to GND

if i messed this up let me know !

Step 2: Moisture Sensor Connections

Out goes to A0

UCC goes to 5v

GND goes to Ground

Step 3: Reset Button Connections

Soldered two wires(poorly i might add ) to the pushbutton and wired one to GND and the other to the reset. This will enable me to reset the PSTII back to on without having to unplug arduino . Details in the code.

Step 4: Arudino Code

This code is pretty simple. 13 is the PSTII setup goes in and sets variables and sets the PSTII to on. The loop goes through and waits to read The Moisture Sensor . I have it flip off it reaches anything above zero. It then sets the PSTII to OFF. Reset button will turn the PSTII back on.

void setup() {
// initialize the digital pin as an output.

Serial.begin(9600);

pinMode(13, OUTPUT);

digitalWrite(13, HIGH);

Serial.println("Switch ON");

Serial.println("Setup has ended, entering loop()");

}

void loop()

{ Serial.print("Moisture Sensor Value:");

Serial.println(analogRead(0));

delay(2000);

if(analogRead(0) > 0)

{ digitalWrite(13, LOW); // turn the Powertail off

Serial.println("Switch OFF");

} }

Comments

author
jruff000 (author)2015-12-06

Great idea, trentoa. Would I be able to use a power relay for arduino instead of the powerswitch tail II?

http://www.amazon.com/Iot-Relay-Enclosed-High-powe...

Thanks for your help.

author
breagan22 (author)2015-05-13

Nice application!

author
arduinomaster (author)2015-05-13

A good idea actually. As it is not clear, I assume you turn the power off to the washer only. Also consider a total power shut down by activating a Power Point and Leakage Tester Cat No. QP2000 from Jaycar. Make sure you have the lasted circuit breaker to supports this idea. As sensor two stainless steel bolts will do it as well.


jaycar.com.au/PRODUCTS/Test-%26-Measurement/Electrical-Testers/Contact/Power-Point-and-Leakage-Tester/p/QP2000

About This Instructable

1,333views

36favorites

License:

More by trentoa:Grill based home coffee roasterWater Sensor Power ShutoffCardboard pirate ship
Add instructable to: