User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Cat Home DIY Q&A - Solenoid Valve How To

Fri Jan 18, 2019 3:30 am

...
Introduction

I am doing home automation. I have learned how to use a relay, then a solenoid. Now I am starting a new thing - Solenoid Valve.

I have already bought a couple of solenoid valves for my hobbyist projects. But I don't know how to use them. So as usual, first thing first is to google SparkFun. I read the description but found too many jargons I don't understand. They say I also need to use a pump. I bought a couple of pumps but do not know if they are useful (What the hell is GPH350?), ...

Anyway, I read AquaTech's datasheet and have learned more. But SparkFun smallest valve is 3/4 in (and their big mac's smallest soda is a whopping 12oz!), too large for my small cat. So I looked for smaller valves , ...

I visited Adafruit and found smaller, 1/2" valves, with a very newbie friendly user guide. So I forgot SparkFun and followed Lada Ada! :mrgreen:

But I always find Adafruit's toys too expensive. So I searched TaoBao and found their cheapest goody, only 8 yuans:

Puro-XD-12 12V 1/4" Solenoid Valve Quick Connect ¥8 (7 times cheaper than SparkFun!)


Update 2019jan19hkt1315

I have shortened the topic title. My way is to make the title as short as possible, but not shorter. My answer also as short as possible, but as long as required, ... :mrgreen:

My Way - Frank Sinatra 74,771,293 views
https://www.youtube.com/watch?v=6E2hYDIFDIU


Appendices

SparkFun 12V 3/4" Solenoid Valve $8
https://www.sparkfun.com/products/10456

Description
Have you ever wanted to control the flow of a liquid using your computer or microcontroller, but didn’t know how? Well, here’s how: The 12V solenoid controlled fluid valve. Simply connect a fluid source to the ¾" threaded inlet and it will interrupt the flow until 12V is applied to the fast-on connectors on the solenoid.

Note: This is not a gravity-feed solenoid. This means that you will need enough water pressure to fully open the valve. Check the datasheet below for exact details. It operates at a minimum of around 3 PSI, allowing around 3 L/min of flow. Although the datasheet shows the valve working at 220 VAC, it’s actually 12 VDC. Our 350 GPH pump does not have enough pressure for this valve. A garden hose or other pressurized system should work just fine.


Aqua Tech AQT15SL 1/2" BSP inlet and 12mm outlet
https://www.sparkfun.com/datasheets/Rob ... Valves.pdf

Adafruit Plastic Water Solenoid Valve - 12V - 1/2" $7
https://www.adafruit.com/product/997

Description
Control the flow of fluid using the flow of electrons! This liquid valve would make a great addition to your robotic gardening project. There are two 1/2" (Nominal non-taped National Pipe) outlets. Normally, the valve is closed. When 12VDC is applied to the two terminals, the valve opens and water can push through. The valve has a gasket arrangement inside, so there is a minimum pressure requirement of 0.02 Mpa (3 PSI). Also, liquid can only flow one direction.

We tried this solenoid at various DC voltages and found we could actuate it down at 6VDC (although it was a little slower to open). Here is the current draw table for various voltages. We suggest a TIP120 or N-Channel power FET with a 1N4001 kickback diode to drive this from a microcontroller pin. For a power supply, our 9V 1A or 12V 1A power adapters will do the job.

If you want a beefier water valve, we also carry a brass version which does not have a minimum pressure requirement and can be used with liquid flow in either direction.

Voltage/Current
6V160 mA
7V190 mA
8V220 mA
9V240 mA
10V270 mA
11V300 mA
12V320 mA

These solenoids are not rated for food safety or use with anything but water.

Tchnical Details
1/2" Nominal NPS
Working Pressure: 0.02 Mpa - 0.8 Mpa
Working Temperature: 1 ℃ - 75 ℃
Response time (open): ≤ 0.15 sec
Response time (close): ≤ 0.3 sec
Actuating voltage: 12VDC (but we found it would work down to 6V)
Actuating life: ≥ 50 million cycles
Weight: 4.3 oz
Dimensions: 3.3" x 1.69" x 2.24"


TaoBao Puro-XD-12 12V 1/4" Solenoid Valve Quick Connect ¥8
https://item.taobao.com/item.htm?spm=a1 ... 0735960072
Attachments
puroxd12_solenoid_valve_2019jan1801.jpg
puroxd12_solenoid_valve_2019jan1801.jpg (166.7 KiB) Viewed 5936 times
Last edited by tlfong01 on Sat Jan 19, 2019 5:33 am, edited 8 times in total.
I am an electronics and smart home hobbyist.

PhatFil
Posts: 1705
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 4:18 am

GPH350 probably means 350 Gallons per Hour. if its for the US market remember they use short 3.75l gallons, not the usual full 4.5l gallon ;) but its the head the pump can provide that is a clearer indication of the force behind the liquid it moves.

gravity fed valves are available if using ebay it can just take some time sifting through ads... just ensure the required back pressure is 0.000, while 0.02mpa may look like a small metric its significant enough ;)

Also be mindful that not all pumps respond well to having their output flow restricted, generally the more expensive magnetically coupled pumps should be used with output restriction without causing problems, so you may also wish to turn off pumps used to feed the valves when they are shut.

From my own experiments with such devices from when i built my micro brewery All i can tell you that this particular pump http://shop.solarproject.co.uk/catalog/ ... 4191d225f1 (14w version) will NOT generate the required back pressure to open the valves intended for mains water supplies..

edit Do you NEED valves, If your design can accommodate a liquid source that is lower than its destination just use a pump ;)

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 6:00 am

PhatFil wrote:
Fri Jan 18, 2019 4:18 am
GPH350 probably means 350 Gallons per Hour. if its for the US market remember they use short 3.75l gallons, not the usual full 4.5l gallon ;) but its the head the pump can provide that is a clearer indication of the force behind the liquid it moves. ...

350GPH means can fill a 1L bottle in 3 seconds

It took me 10 seconds to guess that you xxxl gallon means xxx liquid gallon. I am not sure if there any non liquid gallon. I have little idea what is a gallon. I know my water bottles are 1L, 2L, and my knack sack is 8L etc. Anyway, the online converter tells me that 350 gal/h = 1324.89 lt/h ~= 22 L/min = 0.37 L/sec. In other words it takes 1/0.37 ~= 2.7 = 3 sec to fill a 1 L water bottle. That is fast comparing to me using the water drinking fountain to do the job. Anyway, now I have a rough idea of how powerful is the SparkFun's GHP350 pump.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 6:10 am

PhatFil wrote:
Fri Jan 18, 2019 4:18 am
gravity fed valves ...

Gravity Fed Valves

I never heard of the term "Gravity Fed". I live on the 24th floor of a 28 stories building, where a big pump pushes drinking water from ground to a big water tank on rooftop. So I always thought water on roof top goes to my home by "gravity", and of course the water taps in my home are "valves". :)

Anyway, I need to google again. After a quick reading of the first article below, now I know there are many complicated things, such as air tightness in the pipe, pipe sizing to control velocity, friction energy loss etc.


A guide to gravity-fed water systems
https://thisnzlife.co.nz/guide-gravity- ... r-systems/

Understanding Gravity Flow Pipelines - Water Flow, Air Locks and Siphons
https://www2.gov.bc.ca/assets/gov/farmi ... ravity.pdf
Last edited by tlfong01 on Fri Jan 18, 2019 8:19 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 6:30 am

PhatFil wrote:
Fri Jan 18, 2019 4:18 am
back pressure is 0.000, while 0.02mpa may look like a small metric
not all pumps respond well to having their output flow restricted
so you may also wish to turn off pumps used to feed the valves when they are shut.
i built my micro brewery, this pump http://shop.solarproject.co.uk/catalog/ ... 4191d225f1
will NOT generate the required back pressure to open the valves intended for mains water supplies..
Do you NEED valves, If your design can accommodate a liquid source that is lower than its destination just use a pump

Back pressure, Output flow restriction, etc

The above jargons are a bit too advanced for a newbie. So I will google them later.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 6:55 am

tlfong01 wrote:
Fri Jan 18, 2019 6:30 am
The above jargons are a bit too advanced for a newbie. So I will google them later.

Puro-XD-12 DC12V 1/4" Quick Connect Solenoid Valve Datasheet Reading Notes

Now I am studying the datasheet. It appears that I need to google the basic solenoid operation in order to thoroughly understand the datasheet.

TaoBao Puro-XD-12 12V 1/4" Solenoid Valve Quick Connect ¥8
https://item.taobao.com/item.htm?spm=a1 ... 0735960072

Coil resistance = 37Ω±0.25Ω (at 20℃)
Switch mode = DC Continuous
Operation pressure = 0Mpa-0.8Mpa
Liquid temperature = 1℃-75℃
Response time = open ≤ 0.15s, close = ≤0.3s
High voltage = AC2500V,1 min no break down, arcing
Insulation = > 100MΩ
Flow rate = 0.02 Mpa ≥ 3L/min, 0.1Mpa ≥ 12L/min 0.8Mpa ≥35 L/min
Coil turns = 2500 turns
Life = 200,000 times

Pipe dimension = 1/4" internal 6.5mm PE
Pipe type = quick connect


Setup notes

1. In flow solenoid valve and high pressure connected and then to PCB.
2. When using water or cleaning, both solenoid valve and high pressure pump are activated.
3. When standby, both valve and pump are deactivated.
4. No water flowing when standby, therefore saves water.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 7:18 am

tlfong01 wrote:
Fri Jan 18, 2019 6:55 am
Puro-XD-12 DC12V 1/4" Quick Connect Solenoid Valve Datasheet Reading Notes
Now I am studying the datasheet. It appears that I need to google the basic solenoid operation in order to thoroughly understand the datasheet.

Wikipedia Solenoid Valve Reading Notes

I skimmed through the Wikipedia entry of solenoid valves and found it very good. Now I have a rough idea of how a solenoid works. The explanation on "Internally piloted Solenoid Valve" is interesting. I am not sure if my cheapy 8 yuan valve is internally piloted. I am thinking of tearing down to check out.

Solenoid valve - Wikipedia
https://en.wikipedia.org/wiki/Solenoid_valve

A direct acting solenoid valve typically operates in 5 to 10 milliseconds. The operation time of a piloted valve depends on its size; typical values are 15 to 150 milliseconds.

Power consumption and supply requirements of the solenoid vary with application, being primarily determined by fluid pressure and line diameter. For example, a popular 3/4" 150 psi sprinkler valve, intended for 24 VAC (50 - 60 Hz) residential systems, has a momentary inrush of 7.2 VA, and a holding power requirement of 4.6 VA.

Comparatively, an industrial 1/2" 10000 psi valve, intended for 12, 24, or 120 VAC systems in high pressure fluid and cryogenic applications, has an inrush of 300 VA and a holding power of 22 VA. Neither valve lists a minimum pressure required to remain closed in the un-powered state.

Fs= P x A = (P pi d^2) / 4

Where d is the orifice diameter. A typical solenoid force might be 15 N (3.4 lbf). An application might be a low pressure (e.g., 10 psi (69 kPa)) gas with a small orifice diameter (e.g., 3⁄8 in (9.5 mm) for an orifice area of 0.11 in2 (7.1×10−5 m2) and approximate force of 1.1 lbf (4.9 N)).
I am an electronics and smart home hobbyist.

User avatar
rpdom
Posts: 19040
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 7:32 am

tlfong01 wrote:
Fri Jan 18, 2019 6:00 am
It took me 10 seconds to guess that you xxxl gallon means xxx liquid gallon. I am not sure if there any non liquid gallon.
Sorry, your guess is wrong. The "l" means Litres.

The US Gallon is the same as 3.75 Litres. Gallons everywhere else are the same as 4.5 Litres.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 7:54 am

rpdom wrote:
Fri Jan 18, 2019 7:32 am
tlfong01 wrote:
Fri Jan 18, 2019 6:00 am
It took me 10 seconds to guess that you xxxl gallon means xxx liquid gallon. I am not sure if there is any non liquid gallon.
Sorry, your guess is wrong. The "l" means Litres.
The US Gallon is the same as 3.75 Litres. Gallons everywhere else are the same as 4.5 Litres.

1 US Gallon = 1 MKS Litre

Oh my goodness, so I have been cheated by the Great country. Or are they cheating themselves, because they don't know how to do the simple arithmetic to convert UK Gallon to MKS Litre, so they say OK, OK, gallon is litre, litre is gallon?

That is indeed confusing. I need to google the American history again to clear my mind.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 8:09 am

tlfong01 wrote:
Fri Jan 18, 2019 7:18 am
Puro-XD-12 DC12V 1/4" Quick Connect Solenoid Valve Datasheet
Wikipedia Solenoid Valve Reading Notes
The explanation on "Internally piloted Solenoid Valve" is interesting. I am not sure if my cheapy 8 yuan valve is internally piloted. I am thinking of tearing down to check out.
Solenoid valve - Wikipedia
https://en.wikipedia.org/wiki/Solenoid_valve

Puro-XD-12 DC12V 1/4" Solenoid Valve Tearing Down Notes

So I dismantled the valve. I thought the plastic thing had more plastic things glued inside, so I needed to cut things apart. To my surprise, the whole thing is so hacker friendly, I only needed to unscrew 4 screws, then I just used my hands to pull apart the small thing into two, two to three, to four, to five pieces, all in 30 seconds, and I saw all the basic parts described in the Wikipedia.

At first I thought there was no chance that I could put everything back and make it working again. Now I think there is 90% chance that I can put it back, make it working, and after playing with it, sell it at eBay! :mrgreen:

...
Attachments
puroxd12_solenoid_valve_2019jan1802.jpg
puroxd12_solenoid_valve_2019jan1802.jpg (150.18 KiB) Viewed 5882 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 1:39 pm

PhatFil wrote:
Fri Jan 18, 2019 4:18 am
gravity fed valves
ensure back pressure is 0.000, while 0.02mpa may look like a small metric it's significant enough

MPa vs PSI

Actually I never heard of MPa. I know PSI and Bar because I learnt it in middle school physics. I guessed MPa should be a unit of pressure. But it took me 3 long minutes trial and error googling to find out that MPa stands for Megapascal Pressure Unit

And also reading Wikipedia's very good explanation on pilot solenoid valve then I understand why back pressure should be 0.00Mpa, and 0.02MPa is not OK.

MPa – Megapascal Pressure Unit - SensorsOne
https://www.sensorsone.com/mpa-megapasc ... sure-unit/

The megapascal is a x1000000 multiple of the pascal unit which is the SI unit for pressure. 1 megapascal equals 1,000,000 pascals.

Primarily used for higher range pressure measurement due to its larger value (e.g. 1 MPa = 10 bar), ... the bar and the psi pressure unit are still used more commonly used for describing hydraulic pressures.

A pressure value in megapascals can be converted into its equivalent value in another pressure unit by multiplying it by one of the factors in the table below.

MPa Pressure Conversion Factors

1 MPa = 10 bar ~= 145 psi ~= 10kg/cm²

I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 1:57 pm

PhatFil wrote:
Fri Jan 18, 2019 4:18 am
GPH350 probably means 350 Gallons per Hour, it's the head the pump can provide, ...

Head, Pressure Head, Total Dynamic Head

It is only some months ago that I learnt the idea of 'head'. I only knew some thing like below. If my home is, say, 100 ft below the water tank which feeds water to my home, then the water head in my home is 100ft. Just now I goggled and found that life is much more complicated than I think.

Pressure head - Wikipedia
https://en.wikipedia.org/wiki/Pressure_head

In fluid mechanics, pressure head is the height of a liquid column that corresponds to a particular pressure exerted by the liquid column on the base of its container. It may also be called static pressure head or simply static head (but not static head pressure), ...

Total Dynamic Head - Wikipedia
https://en.wikipedia.org/wiki/Total_dynamic_head

In fluid dynamics, Total Dynamic Head (TDH) is the total equivalent height that a fluid is to be pumped, taking into account friction losses in the pipe.

TDH = Static Height + Static Lift + Friction Loss

where:

Static Height is the maximum height reached by the pipe after the pump (also known as the 'discharge head').

Static Lift is the height the water will rise before arriving at the pump (also known as the suction head).

For a relatively incompressible fluid such as water, TDH is simply the pressure head difference between the inlet and outlet of the pump, if measured at the same elevation and with inlet and outlet of equal diameter.

TDH is also the work done by the pump per unit weight, per unit volume of fluid.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 2:08 pm

PhatFil wrote:
Fri Jan 18, 2019 4:18 am
1. Also be mindful that not all pumps respond well to having their output flow restricted, generally the more expensive magnetically coupled pumps should be used with output restriction without causing problems, so you may also wish to turn off pumps used to feed the valves when they are shut.

2. this particular pump http://shop.solarproject.co.uk/catalog/ ... 4191d225f1 (14w version) will NOT generate the required back pressure to open the valves intended for mains water supplies..

3. Do you NEED valves, If your design can accommodate a liquid source that is lower than its destination just use a pump

Output Restriction, Back Pressure to Open Mains Water Valves

1, 2, 3 above are a bit too advanced to a newbie. I think I would google and think about them perhaps in 2 week's time.

In the mean time, I think I would start doing some beginner's solenoid valve experiments
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Fri Jan 18, 2019 2:41 pm

tlfong01 wrote:
Fri Jan 18, 2019 2:08 pm
In the mean time, I think I would start doing some beginner's solenoid valve experiments

Puro-XD-12 Solenoid Valve Newbie Experiments

Now I am using the following old solenoid test rig to test the new solenoid valve.

RE: CAT FEEDER DIY - HOW TO USE SOLENOID tlfong01 2019Jan17
https://www.raspberrypi.org/forums/view ... 5#p1417151
https://www.raspberrypi.org/forums/view ... 5#p1417740
...
Attachments
puroxd12_test_2019jan1802.jpg
puroxd12_test_2019jan1802.jpg (102.61 KiB) Viewed 5835 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Sat Jan 19, 2019 7:29 am

tlfong01 wrote:
Fri Jan 18, 2019 2:41 pm
Puro-XD-12 Solenoid Valve Newbie Experiments
Now I am using the following old solenoid test rig to test the new solenoid valve.
RE: CAT FEEDER DIY - HOW TO USE SOLENOID tlfong01 2019Jan17
https://www.raspberrypi.org/forums/view ... 5#p1417151
https://www.raspberrypi.org/forums/view ... 5#p1417740
...

Puro-XD-12 Solenoid Valve Newbie Experiments


The Puro-XD-12 is made up of two parts - Solenoid and Valve. The solenoid has been tested OK. Next step is the valve.
...

Puro-XD-12 Solenoid Valve Newbie Experiments
(youtube) https://www.youtube.com/watch?v=h3DAcJ0 ... e=youtu.be
...
Attachments
puroxd12_solenoid_valve_2019jan1901.jpg
puroxd12_solenoid_valve_2019jan1901.jpg (164.77 KiB) Viewed 5766 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Sat Jan 19, 2019 8:01 am

tlfong01 wrote:
Sat Jan 19, 2019 7:29 am
The Puro-XD-12 is made up of two parts - Solenoid and Valve. The solenoid has been tested OK. Next step is the valve.

Solenoid Valve Terminology and FAQ

I am not sure if I have understood the terms correctly. So I googled the terminology and FAQ to make sure.

Solenoid Valve Terminology - Solenoid-Valve-Info
http://www.solenoid-valve-info.com/sole ... ology.html

Soldnoid Valve FAQ - StcValve
https://www.stcvalve.com/STC-DOWNLOAD/STC%20FAQ.pdf

What is a Solenoid Valve?
http://www.solenoid-valve-info.com/sole ... ition.html

Solenoid Valve Basics
http://www.solenoid-valve-info.com/sole ... asics.html

Direct-Acting Solenoid Valve Animation - 500,626 views
https://www.youtube.com/watch?v=SwqM8zpmAD8

Solenoid Valve Terminology - Solenoid-Valve-Info
http://www.solenoid-valve-info.com/sole ... ology.html

Back Pressure
Back pressure occurs if the pressure on the outlet port side exceeds the pressure on the inlet port side. Most solenoid valves are not designed to hold backpressure.

Direct-Acting Valve
In a direct acting valve, the solenoid plunger (or core) directly opens and closes an orifice inside the valve. Direct acting valves do not require any differential pressure to operate (i.e. the valve will operate from 0 PSI to its rated maximum pressure).

Orifice
An opening through which media passes when flowing through a valve. The orifice is opened and closed to control the flow of media through the valve.

Pilot-Operated Valve
Pilot-operated valves utilize line pressure for operation. The solenoid plunger (or core) opens the pilot orifice, allowing pressure to the outlet port side of the piston or diaphragm. This unbalanced pressure opens the valve. Pilot operated valves require a minimum pressure differential to operate and will not operate down to 0 PSI.

Plunger (a.k.a. Solenoid Core)
The moving component of a linear solenoid which opens and closes the valve body orifice or pilot orifice for pilot operated valves.

Port, Inlet
The media (fluid or gas) from the source enter the valve through the inlet port.

Port, Outlet
Themedia (fluid or gas) from exits the valve through the outlet port.

Power Consumption
The electrical energy required over time that must be supplied to the coil to maintain its operation. Typically expressed as Watts.

Pressure
The force per unit area applied on a surface in a direction perpendicular to that surface. Usually expressed as pounds per square inch (PSI).

Pressure Drop/Pressure Differential
Pressure drop is a term used to describe the change in pressure across a system.

Pressure Head
The height of the column of fluid which produces pressure. The height and the specific gravity are the only variables affecting the pressure caused by the fluid head. The shape and the volume of the fluid has no effect over the pressure.

PSI
Pounds per square inch. The standard measurement for pressure in the United States. Normal atmospheric pressure at sea level is 14.7 PSI.

PSIA
PSI (absolute). Gauge pressure plus barometric or atmospheric pressure.

PSIG
PSI (gauge). Pressure referenced to ambient air pressure.

Rated Pressure
The maximum allowable operating pressure.

Response Time
The time it takes the valve's operating mechanism to move from closed to open or open to closed position.

Solenoid Valve
An electro-mechanical device used for controlling the flow of media. Click here for a detailed definition.

Spring Loaded Plunger
Indicates that the valve has a plunger return spring. Usually a sign that the valve may be mounted in any position.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Sat Jan 19, 2019 1:41 pm

tlfong01 wrote:
Sat Jan 19, 2019 7:29 am
Puro-XD-12 Solenoid Valve Newbie Experiments
The Puro-XD-12 is made up of two parts - Solenoid and Valve. The solenoid has been tested OK. Next step is the valve.

Puro-XD-12 Solenoid Valve Piping Notes

Now I am doing the piping work to prepare a wet run.

...
Attachments
puroxd12_piping_2019jan1903.jpg
puroxd12_piping_2019jan1903.jpg (155.58 KiB) Viewed 5729 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Sat Jan 19, 2019 1:59 pm

tlfong01 wrote:
Sat Jan 19, 2019 1:41 pm
Puro-XD-12 Solenoid Valve Piping Notes
Now I am doing the piping work to prepare a wet run.

Water Feature Setup and Testing Notes

Setup
1. NE555 Timer 0.5Hz Square wave
2. KY019 Relay
3. Puro-XD-12 Solenoid valve


Inlet Water source
Water tank 4 stories above (16 meters)

(youtube) https://youtu.be/P2jr1qoPTP8

I have only slightly opened the tap, so the water did not shoot high. I need to do some calculations to see if I fully open the tap, the water can shoot to over 3 stories high.

...
Attachments
water_feature_test_2019ajn1904.jpg
water_feature_test_2019ajn1904.jpg (93.09 KiB) Viewed 5713 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Sun Jan 20, 2019 7:12 am

tlfong01 wrote:
Sat Jan 19, 2019 1:59 pm
I have only slightly opened the tap, so the water did not shoot high. I need to do some calculations to see if I fully open the tap, the water can shoot to over 3 stories high.

Rpi3B switching solenoid valve

Now that I have tested OK NE555 switching solenoid. I will move on testing Rpi to do the switching job.

I have refactored the hardware test rig, adding bells and whistles etc, as displayed below.

The test program, a Minimal, Complete, Verifiable version is fully list below.
...

Code: Select all

# *** puroxd12_2019jan2002.py tlfong01 2019jan20hkt1515 ***

# ***************************************************************************************************
# Program Documentation 2019jan10hkt2111
#
# System Config
# Rpi hardware = Rpi3B+
# Rpi software = $ hostnamectl = raspberrypi Raspbian GNU/Linux 9 (stretch) Linux 4.14.34-v7+ arm 
# Python = >>> sys.version = 3.5.3 Jan 19 2017

# Program Description
# 1. Setup Rpi.GPIO BCM mode
# 2. Set GPIO11 as relayPin to control 5V rela KY019
# 3. Toggle 100 times relayPin at 1Hz

# Test Description
# 1. Rpi GPIO pin controls Relay KY019
# 2. Relay KY019 controls Solenoid ZTE1

# Program Developmenet Description
# 1.0  NE555 Timer Test
# 1.1 NE555 timer to generate 1H square, with red status LED blingking
# 1.2 NE555 output to control KY019, green LED blinks, relay clicks
# 2.0 Digital Signal Generator (DSG) Test
# 2.1 DSG 1Hz to 20Hz signal to control KY019
# 3.0 Rpi Test
# 3.1 Rpi GPIO toggles at 1Hz, 4 times to control KY019
# 4.0 Solenoid Test
# 4.1 Repeat 1.0 to 3.0 with Solenoid ZYE1 or puro-XD-12 connected
#******************************************************************************************************

import RPi.GPIO as GPIO
from   time import sleep

# *** GPIO Functions ***

def setRpiGpioModulePinNumberingMode():
    GPIO.setwarnings(False) 
    GPIO.setmode(GPIO.BCM)
    return

# *** Set Gpio pin as output ***

def setGpioPinOutput(gpioPin):
    GPIO.setup(gpioPin, GPIO.OUT)
    return

# *** Set Gpoio pin High/Low ***

def setGpioPinHigh(gpioPin):  
    GPIO.output(gpioPin, GPIO.HIGH)
    return

def setGpioPinLow(gpioPin): 
    GPIO.output(gpioPin, GPIO.LOW)
    return

# *** Toggle Gpio pin ***

def toggleGpioPin(gpioPin, highSecond, lowSecond, count): 
    for i in range(count):
        setGpioPinHigh(gpioPin)
        sleep(highSecond)
        setGpioPinLow(gpioPin)
        sleep(lowSecond)
    return

# *** Setup ***

def setup():
    setRpiGpioModulePinNumberingMode()
    return

#*** Test Functions ***

def test03(): # *** Toggle 1Hz 100000 times ***
    print('Begin togglePin(), ...')
    setup()
    relayPin   = 11
    highSecond = 0.5
    lowSecond  = 0.5
    count      = 100000
    print('  relayPin =', relayPin, 'highSecond =', highSecond, \
          'lowSecond =', lowSecond, 'count =', count)
    print('  now toggling, hit <ctrl>C to abort this python program.')
    setGpioPinOutput(relayPin)
    toggleGpioPin(relayPin, highSecond, lowSecond, count)
    print('End   togglePin().')
    return

# *** Main ***

test03() # *** Toggle 1Hz 100000 times ***

# *** End ***
...
Attachments
rpi_ky019_puroxd12_2019jan2002.jpg
rpi_ky019_puroxd12_2019jan2002.jpg (163.97 KiB) Viewed 5672 times
Last edited by tlfong01 on Sun Jan 20, 2019 8:54 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Sun Jan 20, 2019 7:26 am

Attachments
rooftop_garden_2019jan2001.jpg
rooftop_garden_2019jan2001.jpg (191.6 KiB) Viewed 5657 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Sun Jan 20, 2019 8:37 am

tlfong01 wrote:
Sun Jan 20, 2019 7:26 am
Mains Water Head Measurement Notes
Now I am trying to measure the water head in my home, where water comes from a water tank about 16 meters above.

Mains Water Flow Rate Measurement Notes

I am filling a 15 litre fish tank from the mains 1/2" pipe. The stop watch record is displayed below. The flow rate is about 0.25L/s.I don't know if I can calculate the water head from this results. I need to google again! :)
...
Attachments
mains_flow_rate_2019jan2001.jpg
mains_flow_rate_2019jan2001.jpg (111.4 KiB) Viewed 5654 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Sun Jan 20, 2019 1:03 pm

tlfong01 wrote:
Sun Jan 20, 2019 8:37 am
Now I am trying to measure the water head in my home, where water comes from a water tank about 16 meters above.
I don't know if I can calculate the water head from this results. I need to google again!

Water Tank Volume Flow Rate Calculation

I googled the online flow rate calculator below and the volume flow rate should be 2.2L/s, more than double of what I found in my experiment. I guess the main reason is that there is too much friction loss from the rooftop water tank to my flat.

The online calculator says hydrostatic pressure will impart a velocity to an exiting fluid jet. The velocity and flowrate of the jet depend on the depth of the fluid. For low-viscosity incompressible fluids such as water, the incompressible Bernoulli equation describes the flow.


https://www.efunda.com/formulae/fluids/ ... g_tank.cfm
...
Attachments
volume_flow_rate_2019jan2001.jpg
volume_flow_rate_2019jan2001.jpg (158.71 KiB) Viewed 5614 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Sun Jan 20, 2019 1:39 pm

tlfong01 wrote:
Sun Jan 20, 2019 1:03 pm
Water Tank Volume Flow Rate Calculation
I googled the online flow rate calculator below and the volume flow rate should be 2.2L/s, more than 8 times of 0.25L/s, what I found in my experiment. I guess the main reason is that there is too much friction loss from the rooftop water tank to my flat.

High Press Motor Required to Work with the Solenoid Valve

The solenoid valve description says a high pressure motor is required to work together. So I think I better forget the rooftop water tank pressure to do gravity feed, and use a motor instead.

Puro-XD-12 12VDC 1/4" Solenoid Valve
https://item.taobao.com/item.htm?spm=a1 ... 0735960072

Operation Pressure 0Mpa-0.8Mpa
Response Time - Open <= 0.15s, Close <= 0.3s
Flow Rate - 0.02Mpa ≥ 3L/min 0.1Mpa ≥ 12L/min 0.8Mpa ≥ 35L/min
Coil Resistance = 37Ω

Operation - both solenoid valve on and high pressure motor on
Standby - both solenoid valve and high pressure motor off

Old Posts on Motors
https://www.raspberrypi.org/forums/view ... 5#p1381664
https://www.raspberrypi.org/forums/view ... 5#p1377308
https://www.raspberrypi.org/forums/view ... 5#p1381265

AliExpress DC 12V Solar Hot Water Circulation Pump Brushless Motor Water Pump 3M
https://www.aliexpress.com/item/New-DC- ... 6bfc9e89fd

TaoBao WS122 12VDC adjustable speed brushless DC motor
https://item.taobao.com/item.htm?_u=f3t ... 6993226670

Description
The pump is perfect for the family home thermal solar systems or any circulation pump application (Does this mean not for high pressure applications?) where conventional power is not available.

Horizontal inlet and outlet with rotatable cap, easy installation. Max operating temperature up to 100°C with External circulating water flow.

Super long working life.low consumption & low noise. Amphibious design.Submersible installation and entirely waterproof.


DC 12V Hot/Cooling Water Circulation pump
Inlet/Outlet: 1/2" male thead
Voltage: 12V DC
Maximum Rated Current: 500MA
Max Flow Rate: 6.5 L/Min
Max Water Head: 3 metre
Max system pressure: 10Bar

Max circulating water temperature: 100°C
Low noise: 30db at 1 metre


I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Mon Jan 21, 2019 3:43 am

tlfong01 wrote:
Sun Jan 20, 2019 1:39 pm
Water Tank Volume Flow Rate Calculation
High Press Motor Required to Work with the Solenoid Valve
The solenoid valve description says a high pressure motor is required to work together. So I think I better forget the rooftop water tank pressure to do gravity feed, and use a motor instead.

Forking A New Topic on Water Pump How to Use

This thread is on solenoid valve and I don't want to off topic divert to water pump, making the thread messingly long. So I have opened a new topic:

CAT HOME DIY Q&A - WATER PUMP HOW TO Postby tlfong01 » 2019-Jan-20 Sun 10:25 pm
https://www.raspberrypi.org/forums/view ... 0#p1419088
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: Cat Home DIY Question - How to Use Solenoid Valve

Mon Jan 21, 2019 4:03 am

tlfong01 wrote:
Sun Jan 20, 2019 1:03 pm
Water Tank Volume Flow Rate Calculation
I googled the online flow rate calculator below and the volume flow rate should be 2.2L/s, more than double of what I found in my experiment. I guess the main reason is that there is too much friction loss from the rooftop water tank to my flat.
The online calculator says hydrostatic pressure will impart a velocity to an exiting fluid jet. The velocity and flowrate of the jet depend on the depth of the fluid. For low-viscosity incompressible fluids such as water, the incompressible Bernoulli equation describes the flow.

What is Bernoulli Equation?

Now for my PBL (Problem Based Learning) project, there are three more things to learn:

1. What is the source of friction causing loss of energy?

2. Who is Bernoulli?

3. Why I need a water pump to work with the solenoid valve. Is it not better to use gravity fed from the rooftop water tank?


I googled and found what I need to know:

Bernoulli Equation
http://hyperphysics.phy-astr.gsu.edu/hbase/pber.html

Daniel Bernoulli - Wikipedia
https://en.wikipedia.org/wiki/Daniel_Bernoulli

Bernoulli's principle - Wikipedia
https://en.wikipedia.org/wiki/Bernoulli%27s_principle

In fluid dynamics, Bernoulli's principle states that an increase in the speed of a fluid occurs simultaneously with a decrease in pressure or a decrease in the fluid's potential energy. The principle is named after Daniel Bernoulli who published it in his book Hydrodynamica in 1738.

Bernoulli's principle can be derived from the principle of conservation of energy. This states that, in a steady flow, the sum of all forms of energy in a fluid along a streamline is the same at all points on that streamline. This requires that the sum of kinetic energy, potential energy and internal energy remains constant. Thus an increase in the speed of the fluid – implying an increase in its kinetic energy (dynamic pressure) – occurs with a simultaneous decrease in (the sum of) its potential energy (including the static pressure) and internal energy. If the fluid is flowing out of a reservoir, the sum of all forms of energy is the same on all streamlines because in a reservoir the energy per unit volume (the sum of pressure and gravitational potential ρ g h) is the same everywhere.

Bernoulli's principle can also be derived directly from Isaac Newton's Second Law of Motion. If a small volume of fluid is flowing horizontally from a region of high pressure to a region of low pressure, then there is more pressure behind than in front. This gives a net force on the volume, accelerating it along the streamline.

Fluid particles are subject only to pressure and their own weight. If a fluid is flowing horizontally and along a section of a streamline, where the speed increases it can only be because the fluid on that section has moved from a region of higher pressure to a region of lower pressure; and if its speed decreases, it can only be because it has moved from a region of lower pressure to a region of higher pressure. Consequently, within a fluid flowing horizontally, the highest speed occurs where the pressure is lowest, and the lowest speed occurs where the pressure is highest.

...
Attachments
bernoulli_2019jan2102.jpg
bernoulli_2019jan2102.jpg (170.49 KiB) Viewed 5547 times
I am an electronics and smart home hobbyist.

Return to “Automation, sensing and robotics”