Algorithm to maintain the vacuum

Hello world,
I am using a proportional valve which opens the vacuum respectively for the voltage from 0 to 5v (0v= valve close;5v=valve opens maximum). The issue here is the valve has to maintain the same vacuum for the preset using push button(0-650).

      for example if the preset value is 500 
      when the vacuum sensor senses vacuum above preset which is 500 the valve has to close proportionally until it reaches 500. likewise, when when the vacuum sensor senses vacuum below preset which is 500 the valve has to open proportionally until it reaches 500.

Isn't is wise to keep all you questions for this vacuum project in the same thread.
Now you have to tell us again that you started with an MPXV6115V sensor,
for which you haven't shown us any of your code yet.
Spreading all your questions over several treads (cross-posting) gets problematic quickly,
and then you will get more questions than answers.
Don't expect us to write code for you.
We are just here to help you on your way, and give hints or code-snippets when you get stuck.
Leo..

4 Likes

What have you done so far.

Here's a recent thread for an MPXV6115V.
Leo..

1 Like

thank you so much

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you also take a few moments to [url=https://forum.arduino.cc/index.php?topic=710766.0]Learn How To Use The Forum[/url].

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

thank you for your concern but the post I had posted is different from the previous one it is not a duplicate one. I respect each and everyone time here. kindly go through it.
Have a nice day

TOPIC MERGED.

Could you also take a few moments to Learn How To Use The Forum.

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 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 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 or CP2102 or FT232 VCP Drivers - FTDI
  • 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 lower in the forum.
  • NANO (NEW Types) Install your board CORE’s.
  • 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:

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

Looks like you need to write some code for a process control. You mention your vacuum valve is a 0 to 5 volt device. I may have this wrong but with the exception of the Due the Arduino boards do not have an analog out. They do have PWM which you can low pass filter but if you want accuracy and a true analog 0 to 5 VDC you may want to start looking for a DAC. A link to your valve would help and exactly which uC (Arduino) are you planning to use. Finally as already mentioned, post your code.

Ron

hi,
I wrote the code but facing issue with that. I am using two if condition 1st one is working fine but when it is going to 2nd condition the whole program stops.
button_counter.ino (1.8 KB)

Could you take a few moments to Learn How To Use The Forum.

1 Like

You post the code using code tags. Members want to look at it here, not download it. This should not be a complicated process. There have been links on how to use the forum, then you can expect good help.

Ron

1 Like

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