Using arduino for PID algorithm to control flowrate through a motorised valve

Hello everyone, I am new here and quite new to using Arduino also. I took a few courses to gain good knowledge about using Arduino. I'm currently on a project and I want to use Arduino to control the flow through a motorized valve. The logic goes thus:

  1. The Arduino will have two feedbacks, one for the flow rate (from the flow transmitter), and the other for the position of the motor.
  2. The Arduino will receive a setpoint from a PLC (Gx works 2) and compute the PID algorithm to adjust the position of the motor for a desired flow rate.
  3. The PLC will act as a Supervisory control device.

Kindly share ideas on how to go about this. Thanks in anticipation.

You need to know what you need to power the valve and control it .
You need to swot up on PID control and look at examples using it on Arduino .
Have a good think about the application , is the Arduino the way to go , if it’s as a learning home project great. For a factory type type setup you can buy controllers quite cheap which won’t need cases and boards making up , the development time and maintenance /documentation needed which will end up costing far more .

Typical - cheaper ones around

Welcome to the Arduino forum. I am sure you will eventually have nice project.
You told us how you will measure the flow, but not the exact sensor, link to data sheet.
You did NOT tell us how you will determine the position of the motor, not what the motor is, nor how you will control it.

Paul

You can ignore the feedback for the position of the motor. It is not needed. Just have the PID drive the motor to get the flow rate you want.

Note: The 'Setpoint' and 'Input' have to be in the same units. Do you know what units the PLC will be using? Do you know how to convert the signal from the flow sensor into the same units?

Do you know what kind of motor is driving the valve? Do you know how to drive that kind of motor?

Why PID particularly? Is there any reason you can't find out the flow rate for different valve settings by experiment?

The motorized valve I will be using has integrated circuit for driving the motor, and also has feedback output of 4-20mA. I will be using a PWM to voltage converter to convert the pwm signal to 0-10v for driving the motor.

If You send a link to the data sheet of the motor helpers can surely suggest better and easier options.