Forum Discussion

TNGW1500SE's avatar
TNGW1500SE
Explorer
Apr 11, 2018

Water shut off solenoid on timer

One of the things I worry about when we leave the RV is a water leak. Now I know I could just shut the valve and last year we tried that but we forgot, a lot. I had some free-time to kill. LOL! So here's what I did to solve the "problem".

I bought a 12 volt normally closed solenoid valve off e-bay for 7 bucks. On each side of the valve I added a garden hose fitting. The valve screws onto my water inlet connection and the hose now screws onto the valve. I ran a hot to the pump from the compartment light.

Then I got creative and programed a NodeMCu (2 bucks on Ebay) using Arduino so that anytime the Node sees terminal D1 go "HIGH" (3.3 volts) it sends power to a Mosfit out D5 thereby grounding the pump through the Mosfet. I programed the Node to power D5 for 900000 milliseconds if D1 goes high.

Then I added a doorbell switch in the water compartment so I could push it and get 15 min "water on" time. It connects D1 to 3.3 on the Node.

I bought a 433Mhz remote receiver that came with 2 transmitters off Amazon (16 bucks) and wired relay 1 on the receiver to the Node so when the transmitter button "A" is pressed the relay connects the Node D1 to 3.3 volts on the Node. Thereby setting the timer to on for 15 min.

I'm putting one transmitter in the bathroom and one at the kitchen sink.

The water will now automatically shut off in 15 min.

If you followed that congratulations ;). It was a fun little project.

It's all mounted under the bed with only 5 wires from the electronics.
Hot
Ground
Switched Ground
and two wires to the doorbell button.

If it ever fails the valve can just be unscrewed and the hose connected directly.

Here's the code I used:

int buttonState = 0; // variable for reading the pushbutton status

void setup() {
// initialize the pin as an output:
pinMode(D5, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(D1, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(D1);

// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn on:
digitalWrite(D5,HIGH);
delay(900000); //15 min on time
}
else {
// turn off:

digitalWrite(D5,LOW);
}
}
  • JTLance wrote:
    I guess getting out of the coach and turning the water off is a big complicated task to remember?

    Maybe a pink rubber band around your wrist would help?


    that's why I put a simple 90 degree throw ball (?) valve in my system so an easy twist and it is off.
    bumpy
  • DutchmenSport wrote:
    .....my eyes are still stinging!.... :B


    It's something you kind of have to "develope a taste for".

    I use Nodes to control most of my house through Alexa. Keeps my brain active.
  • Jim@HiTek wrote:
    Any way I can talk you into scanning the schematic and posting it here?

    Thanks.


    I don't have the base in my fritzing software so, no, without a crude hand drawing.

    I've got one better though. Would be easy to wire up:

    This device looks like would do the same thing without any codeing or flashing. A little over 8 min would be the max time you could set it for. Specs say a max of 500,000ms. Comes with one remote but I'd guess it could learn more. The only problem is Chinese instrutions suck but it looks like everything you would need to know is on the page. Buy and use at your own risk.

    433Mhz delay relay

    The valve is here:


    valve

    The fittings came from Home Depot.
  • Shortly after we got our current camper (new), I found the water pump switch would be turned on (at home in the drive way), and I always dumped my fresh water tank on the ride home from our camp outs. It happened over and over. I'd turn it off and a few days later, the switch would be back on, of course, running the pump and no water in the fresh water tank. I never did figure out why that happened.

    I finally got desperate and run a second toggle off-on switch under the bed and near the water pump. So both switches had to be on in order for the water pump to run. When returning home, both were off. The new one was hidden, unless you knew exactly where it was. And you know .... that "ghost" never turned on the switch at the door again!

    I still use the double switch "off" if the camper is not being used for any length of time and there's no water in the tank.

    I never hook up directly to the water spigot, never! Never a risk of over pressure that way, and never have to worry about a functioning water pressure gauge that way either. When leaving out the door of the camper, a simple flip of the water pump switch and the most anything will run (or leak), or blow, or fail, will be only about 5 seconds of water. Works for me.

    This was a simple fix and about as complicated wiring as I ever want to do. Reading the OP's description above makes my eyes hurt! But if he enjoyed the project, ... well ... that's really all that matters!

    Great job there, and thanks for sharing your fun project! (even if my eyes are still stinging!) :B
  • Jim@HiTek wrote:
    Any way I can talk you into scanning the schematic and posting it here?

    Thanks.


    Google for 'Arduino relay' for the basic premise. Replace the Arduino with your choice of embedded board.
  • That is something that I would do, it's a lot like the macerator pump l built or putting a second amber under stair light w/a remote on my steps. Fun to do and not really necessary. I like projects like that a lot. I've had an OTS time delay relay and some magnetic switches and some red and green LED indicator lights that I intend to build a, step extended/step retracted, indecator panel. Of course I couid just continue to look out the side view mirror to see that but what is the fun in that.

    Cool project.
  • I guess getting out of the coach and turning the water off is a big complicated task to remember?

    Maybe a pink rubber band around your wrist would help?
  • Any way I can talk you into scanning the schematic and posting it here?

    Thanks.
  • Old-Biscuit wrote:
    I just use the fresh water tank and on-board pump

    Consistent pressure and just takes a flip of switch ----easy to do when stepping out of RV or when going to bed

    And no additional draw on battery


    My pump sounds like a helicopter. That's on my to do list too!
  • I just use the fresh water tank and on-board pump

    Consistent pressure and just takes a flip of switch ----easy to do when stepping out of RV or when going to bed

    And no additional draw on battery

About DIY Maintenance

RV projects you can tackle on your own with a few friendly pointers.4,352 PostsLatest Activity: Jan 29, 2025