Designing a inline piston pressure regulator - Fluid statics math model

Show us your pneumatic spud gun! Discuss pneumatic (compressed gas) powered potato guns and related accessories. Valve types, actuation, pipe, materials, fittings, compressors, safety, gas choices, and more.
User avatar
FighterAce
Specialist 2
Specialist 2
Croatia
Posts: 294
Joined: Fri Oct 23, 2009 1:28 pm
Location: Croatia/Zagreb
Has thanked: 1 time
Been thanked: 4 times
Contact:

Sun Nov 07, 2021 8:55 am

Hello everyone!

I finally found some free time after finishing my undergraduate degree and I'm starting to get back into this hobby. One thing I always wanted to make is a pressure regulator to fill my creations from a external tank. Currently I have a 2l fire extinguisher to use for this purpose.

My fluid mechanics is a bit rusty and I've never solved problems with compressible fluids like this before, so I'm asking for help figuring this out. Basically I'm trying to set up a mathematical model of a regulator to find the appropriate spring, overall dimensions and working pressures. I'll be trying to shrink the design as much as possible, so knowing the forces and stresses will be important.

This will be used for my last build, the Barret M98b replica. Unfortunately I can't find the old showcase post, as if it's been deleted, so here are a few photos. Some of you might remember it
PC210381.JPG
PC260428.JPG

Initial regulator design will be based on the following image, posted years ago on Spudfiles. Forgive me I don't know the author
regulator.JPG
regulator.JPG (17.89 KiB) Viewed 1039 times

This is what I came up with:
Regulator resized.png

Initial values are:

p1 = 15 bar -Inlet pressure from the external fire extinguisher tank
p2 = 6 bar -Outlet pressure, inside the onboard tank
d1 = 6 mm -Piston diameter, minimum value limited by the smallest available O ring (2x2mm)
d2 = 4 mm -O ring contact diameter
dr = 2 mm -Rod diameter


Forces acting on the piston:
Forces on piston.png
Forces on piston.png (14.87 KiB) Viewed 1039 times
Where:
F1 is the force due to pressure p1 that is closing the regulator
F2 is the force due to pressure p1 that is opening the regulator
F3 is the force due to pressure p2 that is closing the regulator
Fo is the spring force that is opening the regulator

Equilibrium equation and spring force:
Equations v1.png
Equations v1.png (16.51 KiB) Viewed 1039 times
If forces in the picture above are set up correctly, spring force that keeps this system in equilibrium is Fo=31,1N.

When I keep the spring force constant at Fo=31,1N and solve for pressure p2 while lowering inlet pressure p1, the math falls apart below p1=11bar. The results become nonsensical in that the outlet pressure p2 becomes greater than p1. I'm not sure if this is due to some error I made or the assumption of constant spring force is no longer valid when the spring elongates, opens the regulator and stops it from functioning.

My overall concern with this design is that outlet pressure p2 rises when inlet pressure p1 drops. I'd very much prefer it to be the other way around, if that is even possible. Also I'm not sure what effect friction will have or how to model it. Could anyone double check these equations? Any suggestions are welcome.

Please help if you're a mechanical engineer laughing at this simple problem :D
“The combined synergy of a man and rifle is matchless.
The steadiness of hand, the acuity of vision and finally
the art of knowing how to make the rifle an extension of the
body all equate to the ultimate synthesis of man and machine.”
User avatar
Moonbogg
Staff Sergeant 2
Staff Sergeant 2
United States of America
Posts: 1695
Joined: Mon Oct 13, 2008 10:20 pm
Location: SoCal
Has thanked: 115 times
Been thanked: 73 times

Tue Nov 09, 2021 6:02 pm

That's a lot of work to go over. Not sure you'll get many bites to be honest.
User avatar
FighterAce
Specialist 2
Specialist 2
Croatia
Posts: 294
Joined: Fri Oct 23, 2009 1:28 pm
Location: Croatia/Zagreb
Has thanked: 1 time
Been thanked: 4 times
Contact:

Wed Nov 10, 2021 6:52 am

I think these are really simple equations, it's not like I'm writing out Navier-Stokes here :D I just don't trust myself in correctly assuming the surfaces on which pressures are acting upon, because I literally have no experience with solving this kind of problems. My major deals with incompressible flow and hydrostatics, I've never dealt with sealing faces, O rings or pistons like this.

Anyways, after tinkering with this a bit more I figured out mirroring the design worked better when the spring is acting against the lower (outlet) pressure. This significantly lowers the spring force. Also having access to the spring should make testing easier. I'll call this version v2:
Regulator v2.png

After figuring this out, I found the following article showing the exact same design (Fig1) used in paintball regulators http://www.docsmachine.com/tech/regs.html
Unfortunately there were no dimensions or equations for sizing such a thing.

To better visualize which pressure is acting on what surface, I've colored the low pressure (p2) zone blue and high pressure (p1) zone dark blue:
Regulator v2 visualized.png

I think the resultant forces due to (gauge) pressure acting on the piston now look like this:
Forces on piston v2.png
Forces on piston v2.png (7.42 KiB) Viewed 886 times

Setting up the same equilibrium equations resulted in changing the minus signs and switching p1 with p2:
Equations v2.png
Equations v2.png (28.07 KiB) Viewed 886 times

After trying a few dimension combinations, I've settled on the following:
d1 = 16 mm -Piston diameter
d2 = 4 mm -O ring contact diameter
dr = 2 mm -Rod diameter
Fo = 131,95 N -Required spring force

Plotting the outlet pressure as inlet pressure drops with a constant spring force now shows a much better situation:
Outlet vs inlet.png

Does this look reasonable for a pressure regulator?

I will soon be fabricating a prototype to verify these equations and hopefully find out if I made some big error.
“The combined synergy of a man and rifle is matchless.
The steadiness of hand, the acuity of vision and finally
the art of knowing how to make the rifle an extension of the
body all equate to the ultimate synthesis of man and machine.”
User avatar
Moonbogg
Staff Sergeant 2
Staff Sergeant 2
United States of America
Posts: 1695
Joined: Mon Oct 13, 2008 10:20 pm
Location: SoCal
Has thanked: 115 times
Been thanked: 73 times

Wed Nov 10, 2021 2:32 pm

Personally, I have only made hybrid cannons and I never had to understand how a pressure regulator works, so I don't know how a pressure regulator works. The ignorance isn't by accident. When I can, I let the rest of the world do the thinking and heavy lifting for me. The pistons in a hybrid are very simple, but I had to design it because there is nothing I could purchase that would do the job. If I wanted a regulator for air pressure for a pneumatic, I would almost certainly try to purchase a regulator to use for my cannon. So I guess my brain has created a lazy road block which prevents me from trying to figure this out. I'm actually almost done with a degree in mathematics, so doing the math isn't the issue here (as you pointed out). In fact, there isn't really any math to do with what you've shown because all you have is pressure acting on surfaces that balances out. It boils down to simple addition and subtraction of forces resulting in a sum of forces equaling zero. At least that's what I'm seeing.
The issue here (for me at least) is why are you designing a pressure regulator?

I was a mechanical designer for a company a long time ago. I think it was my third job as a designer. My boss would ask me to design something and I was excited to design, so I started to design the whole thing; every part of it. He told me that I didn't have to reinvent the wheel for every project. He wanted to save time and money by just buying stuff when possible. Is it possible to just buy stuff for this project to regulate air pressure? It looks like you would have to machine some parts to make your regulator. Are you machining them yourself? If not, is a friend doing it for you? My point is, if you have to have parts machined to make a regulator, then it will be way more expensive than buying even a high-end one.
User avatar
Solar
Corporal
Corporal
United States of America
Posts: 538
Joined: Tue May 17, 2005 11:53 pm
Has thanked: 1 time
Been thanked: 12 times

Thu Nov 11, 2021 5:04 am

Can't say much for mathematics but I agree that you might find what you need at www.palmerspursuit.com as they have regulators for many different installations.

Their inline cart-reg might be adequate for your application. The Stabilizers are also a great reg.

If you want to make your own I would suggest putting orings on the screw shaft to allow it to pass through opposite wall for external adjustment.
User avatar
FighterAce
Specialist 2
Specialist 2
Croatia
Posts: 294
Joined: Fri Oct 23, 2009 1:28 pm
Location: Croatia/Zagreb
Has thanked: 1 time
Been thanked: 4 times
Contact:

Thu Nov 11, 2021 7:11 am

Moonbogg wrote:
Wed Nov 10, 2021 2:32 pm
The issue here (for me at least) is why are you designing a pressure regulator?
I’ll be going off topic here, but will give you an answer.

You could ask the same why I designed and made my last airgun, the M98b. It was a very complex project involving a QEV design using a piston with a built in check valve, full 3D model of the wooden stock, safety system separating the valve and barrel, hammer valve trigger system as the pilot valve, etc. I could have easily purchased a commercial airgun, but that was not the point. I enjoy solving problems like this and fabricating something I designed myself, using minimal machinery / tools. For me the point of this hobby is in that journey, from design to fabrication and not so much in the usage after the fact.

The regulator in particular is something I’ve been thinking about for a long time, but didn’t know anything about fluid mechanics until I had it in a university course. I’m still missing some understanding of seals/O rings like I mentioned and this is why I’m asking for help. I’d use it first to regulate the output pressure of a external tank, but this is not some immediate need. After I gain more understanding and some experience, I’ll consider having a integrated regulator inside the rifle air tank which would keep the pressure constant (increasing accuracy) and prevent overpressurization (because of gun laws).

As for the cost, it would definitely be more expensive buying a commercial regulator because I already have all the materials, tools that make fabrication possible, large variety of O rings, fittings, etc. Also because of my stockpile of stuff, I’m more in the mindset of "what can I make with what I have by being creative" instead of "what do I need to get to make this system function by throwing money at the problem". The engineering concern of balancing man hours vs cost or complexity is not at play here. This is just a hobby I enjoy and not a engineering project office environment.

Solar wrote:
Thu Nov 11, 2021 5:04 am
If you want to make your own I would suggest putting orings on the screw shaft to allow it to pass through opposite wall for external adjustment.
I completely agree and this is the idea behind the v2 design. It’s very different compared to the initial design and probably doesn’t deserve the name inline anymore :D

Maybe I should have noted that the left side of the v2 is open to atmosphere and allows external adjustment of the spring force, where pa is the atmospheric pressure (or where the gauge pressure is equal to zero). The drawing in this area is more illustrative for simplicity, there would be a separate part for keeping the regulator body in place and another for tensioning the spring.
“The combined synergy of a man and rifle is matchless.
The steadiness of hand, the acuity of vision and finally
the art of knowing how to make the rifle an extension of the
body all equate to the ultimate synthesis of man and machine.”
User avatar
hectmarr
Corporal 5
Corporal 5
Argentina
Posts: 960
Joined: Sat May 07, 2016 3:49 pm
Location: Argentina
Has thanked: 170 times
Been thanked: 170 times
Contact:

Sat Nov 13, 2021 10:16 am

This little pressure regulator, I made it.
As the areas on the two faces of the piston, (6.3 mm) are equal, the high pressure compressed air, (arrow in dark blue), that enters produces the same force in both directions, and the piston is balanced, without any math.
The displacement of the piston is only subject to the force of the spring, which is adjusted with the screw on the right of the drawing, and the force of the air produced on the left side, (arrow in soft blue).
It works very well, at the entrance it can load up to about 30 bar and at the exit, it regulates between 3 and 30 bar.
In the drawing there are the two positions: 1- when high pressure air is entering, 2- when the force of the regulated air overcomes that of the spring, and the piston moves to the right and does not let more air pass.
P1010371.JPG
reg. pres. 1.png
reg. pres. 1.png (6.88 KiB) Viewed 738 times
rEG. PRES. 2.png
rEG. PRES. 2.png (5.32 KiB) Viewed 738 times
User avatar
Solar
Corporal
Corporal
United States of America
Posts: 538
Joined: Tue May 17, 2005 11:53 pm
Has thanked: 1 time
Been thanked: 12 times

Sat Nov 13, 2021 3:35 pm

That's a great design.
User avatar
FighterAce
Specialist 2
Specialist 2
Croatia
Posts: 294
Joined: Fri Oct 23, 2009 1:28 pm
Location: Croatia/Zagreb
Has thanked: 1 time
Been thanked: 4 times
Contact:

Sun Nov 14, 2021 3:15 am

hectmarr wrote:
Sat Nov 13, 2021 10:16 am
This little pressure regulator, I made it.
That looks really nice! I like how the piston is acting like a spool valve, making the output pressure depend only on the spring force. The spring must be very light for 3bar output. Does the input HP pressure actually have no effect on the output LP pressure with your design?

My only slight concern is with this corner acting like a cheese grater against the O ring:
regconc.png
regconc.png (4.11 KiB) Viewed 689 times
Perhaps this could be mitigated with a really small input port on the HP side, smaller than the O ring diameter.

How small did you make the hole going through the piston?
“The combined synergy of a man and rifle is matchless.
The steadiness of hand, the acuity of vision and finally
the art of knowing how to make the rifle an extension of the
body all equate to the ultimate synthesis of man and machine.”
User avatar
hectmarr
Corporal 5
Corporal 5
Argentina
Posts: 960
Joined: Sat May 07, 2016 3:49 pm
Location: Argentina
Has thanked: 170 times
Been thanked: 170 times
Contact:

Sun Nov 14, 2021 10:17 am

Actually the one I show in the photo has only two o'ring, which are 2 mm thick. The inlet hole is very small, 0.75 mm and is polished on the inside, which added to the lubrication, a little silicone, which does not come off, does the job.
It works as a shut-off valve for the "HPA" bottle, which I use, (a co2 tube that I can fill up to 60 bar).
When the spring screw is completely loosened, the piston is positioned to the right, in a position that does not allow air to pass to the left face of the piston, closes the air inlet and the regulated pressure outlet can be depressurized, leaving high pressure the entrance. It loses nothing, luckily.
The blue hose you see is only up to 12 bar. To use more pressure at the inlet, it is screwed directly into the "HPA" bottle.
The spring is about 4kg compressed to the maximum. Below 3 bar of regulation pressure, the piston has a hard time moving because the spring forces vs the regulated air on the left side is poor ... Note that friction increases a lot when the small o'rings are under a lot of Pressure. It would be the weak point of the regulator, but I never use such low pressure, for my things it is between 7 and 10 bar and in this range it works correctly.
Answering your question. The inlet pressure has no effect on the sideways displacement of the small piston, because the forces are the same and opposite. I imagine that all pressure regulators work the same, although the mechanical solutions are different.
I use it to power a hybrid rifle that operates at 8X .
Regulador presión casero dos oring.png
Regulador presión casero dos oring.png (4.25 KiB) Viewed 649 times
User avatar
FighterAce
Specialist 2
Specialist 2
Croatia
Posts: 294
Joined: Fri Oct 23, 2009 1:28 pm
Location: Croatia/Zagreb
Has thanked: 1 time
Been thanked: 4 times
Contact:

Mon Nov 15, 2021 3:26 pm

This last picture with the 2 O ring piston would be rather hard to fabricate... Brass could be drilled and then soldered shut, leaving the 0,75mm diameter path for the air. I plan on making the regulator body out of AlMgSi0,5 stock (6060 Al) so this is not an option.
hectmarr wrote:
Sun Nov 14, 2021 10:17 am
Note that friction increases a lot when the small o'rings are under a lot of Pressure. It would be the weak point of the regulator, but I never use such low pressure, for my things it is between 7 and 10 bar and in this range it works correctly.
It's down to pressure differential. If you have a HP bottle at 60bar and output pressure of 10bar, that's a 50bar difference acting on the O rings.

I would be running it at a much lower 9bar differential, so maybe 3 O rings wouldn't be an issue. Drilling a 0,75mm hole through the piston, using 3x1,5mm O rings leaves me about 6,6mm^2 at the critical cross section, holding back 15bar in the closed position. That equates to about 13MPa of tensile stress, low enough for aluminum.

On the subject of O ring friction, I found this research paper "Friction Forces in O-ring Sealing" which gives an analytical formula for determining friction forces in O ring seals. Problem is that the formula they submitted results in a friction force that is 3 times greater than they reported in the study. I spent a good few hours going through the math in this paper until I realized it was botched. I should really look for a better source of info on this subject :D
hectmarr wrote:
Sun Nov 14, 2021 10:17 am
I imagine that all pressure regulators work the same
All of the pressure regulator designs I've looked at so far don't work the same. I wish I had an answer why

Here is a good source for paintball pressure regulator designs: http://www.zdspb.com/tech/misc/maxflo.html
“The combined synergy of a man and rifle is matchless.
The steadiness of hand, the acuity of vision and finally
the art of knowing how to make the rifle an extension of the
body all equate to the ultimate synthesis of man and machine.”
User avatar
hectmarr
Corporal 5
Corporal 5
Argentina
Posts: 960
Joined: Sat May 07, 2016 3:49 pm
Location: Argentina
Has thanked: 170 times
Been thanked: 170 times
Contact:

Mon Nov 15, 2021 4:14 pm

It is not so difficult to make the air passage channel.
I drilled a hole in the body of the regulator "A" and then made a slot with the Dremel, as the drawing shows, but without breaking the inside of the body, where the piston moves.
In this way, there is a conduit through which air can pass between the body "A", and the threaded piece "B". I made a diagram to make it easier to understand.
In this particular case, it is a bronze body with a larger air passage hole, about 1.5 mm and there is no problem with the o'ring, if it meets the condition of these mirror polished inside, no inner edge. It is a body of evidence that I have photographed for you.
I think that increasing the diameter of the piston, in my design, the bid between the resistance of the o'ring vs force, would be favorable to the force. I mean that since the perimeter of a circle increases linearly with the diameter, and the area with the square, I can make the piston 12mm instead of 6mm. If the friction for a constant pressure differential increases as a function of the contact area of the o'ring with the cylinder wall, the friction for a 12 mm piston will be approximately double, (approximately because I do not take into account other factors, and both being o'ring of the same thickness), and as the area has increased 4 times, the force will be 4 times greater and everything will move more easily.
Resistance rises up the stairs and strength through the elevator.

detalle reg. pres. casero.png
detalle reg. pres. casero.png (3.16 KiB) Viewed 562 times
Regulador pistón casero.JPG
P1010375.JPG
P1010376.JPG
iknowmy3tables
Staff Sergeant
Staff Sergeant
United States of America
Posts: 1595
Joined: Fri Dec 15, 2006 3:57 pm
Location: maryland
Has thanked: 3 times
Been thanked: 9 times

Tue Nov 16, 2021 11:36 pm

sorry I'm very late to provide any useful contribution, Statics class is a long time ago did a slightly different force analysis on your original regulator design and got basically the same force formula just phrased F0=(pi/4)*(p1(d1-d2)+p2d2) if that any reassurance
also the pressures involved doesn't seem too exotic is there a reason you aren't buying a regulator like this? https://www.mcmaster.com/41735K12/
User avatar
FighterAce
Specialist 2
Specialist 2
Croatia
Posts: 294
Joined: Fri Oct 23, 2009 1:28 pm
Location: Croatia/Zagreb
Has thanked: 1 time
Been thanked: 4 times
Contact:

Wed Nov 17, 2021 12:26 pm

hectmarr wrote:
Mon Nov 15, 2021 4:14 pm
It is not so difficult to make the air passage channel.
Thanks for posting the pictures. Machining it from a solid block requires a different solution though, this is what I'm working on right now:

Regulator nacrt-Model01-00.png

I agree with your assumption of friction doubling for a piston of double diameter, but knowing its value is important in determining if it's relevant or not. Does your regulator have some issues in operation that would make you rather have a 12mm piston?
iknowmy3tables wrote:
Tue Nov 16, 2021 11:36 pm
sorry I'm very late to provide any useful contribution, Statics class is a long time ago did a slightly different force analysis on your original regulator design and got basically the same force formula just phrased F0=(pi/4)*(p1(d1-d2)+p2d2) if that any reassurance
also the pressures involved doesn't seem too exotic is there a reason you aren't buying a regulator like this? https://www.mcmaster.com/41735K12/
Have you taken friction into consideration somehow?

As for the commercial regulator, besides what I mentioned already, it's way too big defeating the second purpose of this project.
“The combined synergy of a man and rifle is matchless.
The steadiness of hand, the acuity of vision and finally
the art of knowing how to make the rifle an extension of the
body all equate to the ultimate synthesis of man and machine.”
iknowmy3tables
Staff Sergeant
Staff Sergeant
United States of America
Posts: 1595
Joined: Fri Dec 15, 2006 3:57 pm
Location: maryland
Has thanked: 3 times
Been thanked: 9 times

Wed Nov 17, 2021 1:19 pm

I haven't accounted for friction that would require more information than I have access too. It would just involve adding a friction component to the equilibrium a freeze frame in time, one when it's fully open one when it's closed but it also involves an arbitrary increase in spring compression when it's open.
In everyman terms and all you really need to know is friction from the seals would retard opening and closing creating less precise air regulation. That increases with the most orings you add. You can avoid most of the friction by using a diaphragm and gaskets seal like an LP regulator.
You can also use an air spring in your regulator if you want to avoid precise spring force calculations
Post Reply