How can I open a solenoid valve in the pipe when a tap is opened?

Hi everyone,

I'm not sure if this is the right place to ask, because my problem is not with the arduino itself but still with an arduino project.

Anyway, here's what I'm working on:

I have an undersink reverse osmosis unit that provides me with soft water for my tea kettle. I've used arduino to add a flow sensor that shows me how much water has been dispensed on a little display, so I know when I have just enough to fill my teapot. This is working great so far. Basically, when I open the tap, the flow sensor starts giving signals that trigger an interrupt and turn on the display.

Now, for "version 2.0" I want to be able to open the tap, then push a button to make it automatically stop dispensing when I have enough for my teapot.

I bought a solenoid valve for this and I want to use a relay to control it with my arduino. Like pretty much all cheap solenoid valves, it opens when powered and closes without power, which I like beause it also adds a failsafe.

My initial plan was to connect the solenoid valve to the "normally on" side of the relay and have it only turned off by the arduino if I have pressed the button and the volume limit is reached. However, it draws quite a bit of energy when it's powered (close to 10W) and that's a little too much for me to have it powered pretty much 24/7, plus I'm a bit worried about overheating issues.

So now I would like to do it the opposite way. The solenoid valve would normally be unpowered and shut off, only to be opened when the arduino is turned on by an interrupt from the flow sensor. Sounds better, right? But it's not going to work this easily. I've attached a schematic of my setup.

The RO unit only produces water when a builtin pump is turned on. When I open the tap, the pressure inside the pipe drops, which is registered by the pressure sensor attached to my RO unit, that then turns on the pump. When I close the tap, the pressure in the pipe quickly increases, which triggers the pressure sensor that turns off the pump.

But if I put in a solenoid valve somewhere between the pressure sensor and the tap, it will no longer register any pressure drop. And the arduino won't know it's supposed to open the valve as long as it doesn't get a signal from the flow sensor.

I could add another button or switch to wake up the arduino first, but I would prefer to just open the tap and have everything turn on and work. Another idea I had was to add something like an air spring between the solenoid valve and the flow sensor, so enough water is mechanically stored to trigger the flow sensor when the tap is opened. But I'm not sure if I can build it in a way that would work reliably and I also don't want to add more potential leakage points to the whole system and eventually flood my apartment.

So, is there anyone here who's maybe a bit smarter than me and has a clever idea for a solution?

Thanks a lot in advance!

That definitely does not define a cheap solenoid. Look on the valve there is an arrow showing which way the water should flow. From what I can determine you have it installed backwards.

In this context, almost all solenoid valves I can find are the "normally closed" type, which does make sense because most people don't want uncontrolled water flow in case of a power outage. I'm sure you could find one somewhere that is "normally open", but it's a lot less common.

I had a little trouble describing this complex problem in one sentence for the title, but the valve itself is working just fine. Everything is working as expected, I just need an idea how I can set it up so it does what I want.

Basically, I want to have the solenoid valve somewhere in line and have it open when the tap is opened. I feel like there's a way to make it happen with what I have, but I just can't come up with it. For example, the flow sensor could easily trigger the opening of the valve, but there's no flow while the valve is closed.

It is probably a pilot operated valve, it needs pressure to operate. That can be caused two ways, first because you do not have enough supply pressure second it is installed backwards.

If I understand correctly, you want to turn the water on with the tap but have the option to turn it off with the solenoid valve, correct?

If so, the simplest solution is a latching solenoid valve between the RO unit and the tap, with the valve in the Normally Open position. Latching valves only use power when they turn on or off, so you don't have the problem of consuming power continually.

In this case, your failure mode is no worse than if you left the tap on indefinitely. However, you'll now have the opposite problem: once the kettle is full and you turn the valve to Closed, you'll have to manually shut the tap and reset the valve to Open for the automatic system to work again.

The only feasible way to fully automate this is for your system to know when the tap is in the open or fully closed position.

1 Like

Yes, that's exactly what I want.

I think I have a different kind of valve, the one I have immediately closes when the power is turned off. I'll see if I can get a latching valve, that would pretty much solve my problem!

I can use the flow sensor to figure out if the tap is closed. I'll just set a timer for a minute or so, and then open the valve. If the flow sensor registers a flow, it means the tap is still open, so the valve closes for another minute and tries again.

Thanks a lot for the help so far!

No, that's a block diagram.
Best show a schematic (description on Google as you don't seem to know) and your code thanks.

What if you continually let the tap opened and use a button to trigger the process, the Arduino being in charge of opening (upon button press) and closing (when required volume has been reached) the valve ?

1 Like

maybe automate the tap instead..
could add a tap for this and leave a manual tap..

Automatic-Arduino-Water-Dispenser

sounds fun, good luck.. ~q

1 Like

Post a link for the valve that gives technical details. That looks like the one I replaced on my old washer but it was 120V.

Oh, that's a great idea. I might actually do that instead, at least if I can't find a latching solenoid valve.

Here's the one I'm using right now (the 12V variant)

https://www.aliexpress.com/item/4000976038622.html

As I said, it's working exactly as it should, but it's built to open only while powered. I've had the same type of valve (with a different connector) in use with an irrigation system for years, no issues despite the cheap price.

Etienne_74's suggestion sounds good.

I think that you need to position the solenoid valve next to the existing tap, so that the flow sensor remains full and that the water flow doesn't end up trickling to a stop.

Look on the bottom, it has a port called out, that is the tap side. Pressure is taken from the other port. That pressure moves the diaphragm to open and close the port.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.