# Pressure regulator project

**URL:** <https://forum.arduino.cc/t/pressure-regulator-project/984633>\
**Category:** General Guidance\
**Created:** [April 24, 2022, 10:24pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633 "2022-04-24T22:24:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bogdan3105](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bogdan3105/32/773000_2.png) [@bogdan3105](https://forum.arduino.cc/u/bogdan3105)\
**Post date:** [April 24, 2022, 10:24pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/1 "2022-04-24T22:24:15Z")

</div>

So, i have a project to do, a proportional pressure regulator that contains 2 proportional valves controlled with PWM, the problem is that i don't really have any experience using arduino, but from my reseach this seems the easiest way to reach my target. On short, i need the pressure on the outlet of the pressure regulator (measured with a pressure sensor) to be the same with a preseted signal, for that i use the 2 proportional valves , 1 for inlet the pressure if the pressure its lower than the set value, and one to exhaust the pressure if the pressure its higher than the set value. The electromagnets inside the valves need to be powered with 12 V for opening the respective valve. What i need from you guys its to give me some ideea of what parts i need and if this is possible to be done with around 100$ budget. Thank you all for helping me and sorry for my writing, english its not my first language.

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [April 24, 2022, 10:40pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/2 "2022-04-24T22:40:15Z")

</div>

That's doable. You can use logic level N channel MOSFETs switching the low side of the electromagnets.  
180 ohm between the MOSFET gate and the controller, 10 kOhm from gate to GND.

---

<div class="post-metadata">

**Author:** ![bogdan3105](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bogdan3105/32/773000_2.png) [@bogdan3105](https://forum.arduino.cc/u/bogdan3105)\
**Post date:** [April 24, 2022, 10:42pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/3 "2022-04-24T22:42:18Z")

</div>

What kind of controller do you recommand?

---

<div class="post-metadata">

**Author:** ![blh64](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/blh64/32/605986_2.png) [@blh64](https://forum.arduino.cc/u/blh64)\
**Post date:** [April 24, 2022, 10:43pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/4 "2022-04-24T22:43:42Z")

</div>

Easily done with a Uno. Shields fit on it easily. Nano is the same, but smaller form factor if space is a concern.

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [April 24, 2022, 10:45pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/5 "2022-04-24T22:45:43Z")

</div>

> [@bogdan3105](#):
>
> 2 proportional valves , 1 for inlet the pressure if the pressure its lower than the set value, and one to exhaust the pressure if the pressure its higher than the set value.

Do you understand how pressure regulators regulate pressure? Doesn't seem so. They regulate by RELEASING more flow or reduce the flow. They do not work in tandem that way you have described.

---

<div class="post-metadata">

**Author:** ![bogdan3105](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bogdan3105/32/773000_2.png) [@bogdan3105](https://forum.arduino.cc/u/bogdan3105)\
**Post date:** [April 24, 2022, 10:57pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/6 "2022-04-24T22:57:22Z")

</div>

> [@Paul\_KD7HB](#):
>
> pressure regulators regulate pressure? Doesn't seem so. They regulate by RELEASING

How i said,english its not my first language, my valve use a plunger to move the plain poppet seat, the poppet blocks the outlet orrifice of the valve with the tension from a spring, the plunger its attracted by the electromagnet and it rises the poppet , and the flow can pass trough. In simulation i managed to do this by using PID for the inlet valve and compare the set signal with the actual pressure ,if higher then the outlet valve its oppened. Please correct me if i made any mistake

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [April 24, 2022, 11:00pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/7 "2022-04-24T23:00:34Z")

</div>

> [@Railroader](#):
>
> 10 kOhm from gate to GND.

10k from **Arduino pin** to ground.

 ![MOSFET_low_side_driver](https://europe1.discourse-cdn.com/arduino/original/4X/f/0/d/f0db9d28923b1224c467b7c3d3d228d8ddd30738.png)

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [April 24, 2022, 11:21pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/8 "2022-04-24T23:21:46Z")

</div>

> [@bogdan3105](#):
>
> ,if higher then the outlet valve its oppened. Please correct me if i made any mistake

IF pressure is higher, you need to keep the inlet valve closed for a longer period of time and that one valve will do the regulation,

---

<div class="post-metadata">

**Author:** ![gonpezzi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/gonpezzi/32/763557_2.png) [@gonpezzi](https://forum.arduino.cc/u/gonpezzi)\
**Post date:** [April 24, 2022, 11:33pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/9 "2022-04-24T23:33:54Z")

</div>

> [@Paul\_B](#):
>
> 10k from **Arduino pin** to ground.

No, I'm on the same side as @Railroader , from gate to GND,

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [April 25, 2022, 12:10am UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/10 "2022-04-25T00:10:11Z")

</div>

> [@gonpezzi](#):
>
> No, I'm on the same side as @Railroader , from gate to GND

Why would you think that? 🙄

---

<div class="post-metadata">

**Author:** ![gonpezzi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/gonpezzi/32/763557_2.png) [@gonpezzi](https://forum.arduino.cc/u/gonpezzi)\
**Post date:** [April 25, 2022, 12:20am UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/11 "2022-04-25T00:20:23Z")

</div>

If the transistor is somewhat far from the gate resistance, the cable or union track can behave as a small capacity that I don't know why it can be charged, leading the transistor to a total or partial conduction. The closer the TR and its resistance to the GND, the better.

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [April 25, 2022, 1:14am UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/12 "2022-04-25T01:14:00Z")

</div>

Regarding the voltage dividing effect 180/10k makes no significant loss of gate voltage when active. Pulling the gate low if output is high z will also work fine.

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [April 25, 2022, 1:40am UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/13 "2022-04-25T01:40:43Z")

</div>

Did your simulations show that you system will oscillate wildly when the two pressures are close to the same value?

---

<div class="post-metadata">

**Author:** ![bogdan3105](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bogdan3105/32/773000_2.png) [@bogdan3105](https://forum.arduino.cc/u/bogdan3105)\
**Post date:** [April 25, 2022, 9:33am UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/14 "2022-04-25T09:33:53Z")

</div>

It does not, it barelly oscilates with a range of 0.0001 bar, regardin your previous answear, you can't lower the pressure in a system just by closing the inlet valve, pressure it's not a consumable, it won't dissapear just because you blocked its source, you may think about proportional electromagnets, that can have positions between full open and full closed, but mine are normal electromagnets, who can be use in "all or nothing" positions, thats why i need to use PWM to control them

 ![Screenshot_20220425-123324_Chrome](https://europe1.discourse-cdn.com/arduino/original/4X/5/9/c/59cfe5554a3c8f582389413805c206e5722e6996.jpeg)

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [April 25, 2022, 10:03am UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/15 "2022-04-25T10:03:46Z")

</div>

> [@gonpezzi](#):
>
> the cable or union track can behave as a small capacity that I don't know why it can be charged, leading the transistor to a total or partial conduction. The closer the TR and its resistance to the GND, the better.

Ah well, that makes no sense to me I am afraid. 🙄

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [April 25, 2022, 2:22pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/16 "2022-04-25T14:22:32Z")

</div>

I am always referring to the OUTPUT pressure. You can use PWM to a single valve by varying the width.timing of the on pulse as well as the off pulse times.

---

<div class="post-metadata">

**Author:** ![bogdan3105](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bogdan3105/32/773000_2.png) [@bogdan3105](https://forum.arduino.cc/u/bogdan3105)\
**Post date:** [April 25, 2022, 3:46pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/17 "2022-04-25T15:46:35Z")

</div>

So what are you saying its that i can use one single valve by varying the voltage that goes through the electromagnet with PWM and modifing the pull force of the electromagnet this way,without reaching values higher than the desired one?

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [April 25, 2022, 3:53pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/18 "2022-04-25T15:53:19Z")

</div>

No, not varying the voltage or the current, ONLY the open/close times! That will produce the exact same result as the spring-loaded mechanical pressure regulator that everyone uses now. The mechanical regulators vary the spring pressure to vary the output pressure and your device will accomplish an identical result by changing the on/off ratio. Due to the inertial of the solenoid, the result will be a steady pressure, at some point.

---

<div class="post-metadata">

**Author:** ![hammy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hammy/32/238813_2.png) [@hammy](https://forum.arduino.cc/u/hammy)\
**Post date:** [April 25, 2022, 3:54pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/19 "2022-04-25T15:54:36Z")

</div>

The one issue I foresee is that there is likely to be some hysteresis and non linearity in operation if you use them with fast PWM to control how far open they get ; which might make life difficult - you might be better off with valves simply controlled by motors.  
Operating them relatively slowly so they go fully open during pulses will need a big volume between and after the valves for smoothing and make control very difficult . They will wear out quickly too !

Before you get into coding , just vary the voltage to the valves and see how well they function .

BTW if you google I/P converters they use valves the size of Reed switches to to load a regulator

---

<div class="post-metadata">

**Author:** ![Ballscrewbob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ballscrewbob/32/950458_2.png) [@Ballscrewbob](https://forum.arduino.cc/u/Ballscrewbob)\
**Post date:** [April 29, 2022, 7:11pm UTC](https://forum.arduino.cc/t/pressure-regulator-project/984633/20 "2022-04-29T19:11:41Z")

</div>

Your other topic on the same subject deleted.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.  
Could you take a few moments to Learn How To Use The Forum

> [@](#):
>
> Hello, Welcome to the Arduino Forum. This guide explains how to get the best out of this forum. Please read and follow the instructions below. Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is frustrating for you and frustrating for us.
> 
> [How to get the best out of this forum](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966)

It will help you get the best out of the forum in the future.

- Your OS and version can be valuable information, please include it along with extra security you are using.

- Always list the version of the IDE you are using and the board version if applicable.

- Use quote or add error messages as an attachment NOT a picture.

- How to [insert an image](https://forum.arduino.cc/t/a-thread-with-tips-and-tricks-for-the-new-discourse-based-arduino-forum/849827/3) into your post. ( Thanks @sterretje )

- Add your sketch where applicable but please use CODE TAGS ( **\</\>** )

- Add a SCHEMATIC were needed even if it is hand drawn

- Add working links to any specific hardware as needed ( **NOT** links to similar items)

- Remember that the people trying to help cannot see your problem so give as much information as you can

**COMMON ISSUES**

- Ensure you have **FULLY** inserted the USB cables.

- Check you have a [COMMON GROUND](https://forum.arduino.cc/index.php?topic=653831.msg4406618#msg4406618) where required. ( Thanks @Perry)

- Where possible use USB 2.0 ports or a USB 2.0 POWERED HUB to rule out USB 3.0 issues.

- Try other computers where possible.

- Try other USB leads where possible.

- You may not have the correct driver installed. [CH340/341](http://www.wch.cn/download/CH341SER_EXE.html) or [CP2102](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers) or FT232 [VCP Drivers - FTDI](https://ftdichip.com/drivers/vcp-drivers/)

- There may be a problem with the board check or remove your wiring first.

- Remove any items connected to pins 0 and 1.

**COMPUTER RELATED**

- Close any other serial programs before opening the IDE.

- Ensure you turn off any additional security / antivirus just to test.

- There may be a problem with the PC try RESTARTING it.

- You may be selecting the wrong COM port.

- Avoid cloud/network based installations where possible OR ensure your Network/Cloud software is RUNNING.

- Clear your browsers CACHE.

- Close the IDE before using any other serial programs.

- Preferably install IDE’s as ADMINISTRATOR or your OS equivalent

**ARDUINO SPECIFIC BOARDS**

- CH340/341 based clones do not report useful information to the “get board info” button.

- NANO (Old Types) some require you to use the OLD BOOTLOADER option.

- NANO ( **ALL Types** ) See the [specific sections](https://forum.arduino.cc/index.php?board=135.0) lower in the forum.

- NANO ( **NEW Types** ) [Install your board CORE’s.](https://forum.arduino.cc/index.php?topic=642505.0)

- Unless using EXTERNAL PROGRAMMERS please leave the IDE selection at default “AVRISP mkII”.

- Boards using a MICRO usb connector need a cable that is both DATA and CHARGE. Many are CHARGE ONLY.

**CREATE editor install locations.**

- On macOs ~/Applications/ArduinoCreateAgent-1.1/ArduinoCreateAgent.app/Contents/MacOS/config.ini

- On Linux ~/ArduinoCreateAgent-1.1/config.ini

- On Windows C:\Users[your user]\AppData\Roaming\ArduinoCreateAgent-1.1

_ **Performing the above actions may help resolve your problem without further help.** _

**Language problem ?**

**Try a language closer to your native language:**

- [中文 (Chinese)](https://forum.arduino.cc/index.php?board=99.0)

- [Deutsch - German](https://forum.arduino.cc/index.php?board=31.0)

- [Español - Spanish](https://forum.arduino.cc/index.php?board=32.0)

- [Français - French](https://forum.arduino.cc/index.php?board=33.0)

- [অসমীয়া, বাংলা, बड़ो - India](https://forum.arduino.cc/index.php?board=82.0)

- [Italiano - Italian](https://forum.arduino.cc/index.php?board=34.0)

- [Nederlands - Dutch](https://forum.arduino.cc/index.php?board=77.0)

- [Portugues - Portuguese](https://forum.arduino.cc/index.php?board=35.0)

- [Россия - Russia](https://forum.arduino.cc/index.php?board=120.0)

- [Scandinavia Swedish, Suomi - Finnish, Norsk - Norwegian](https://forum.arduino.cc/index.php?board=36.0)

**Thanks to all those who helped and added to this list.**

[Next page](https://forum.arduino.cc/t/pressure-regulator-project/984633.md?page=2)
