Pid servo control


I am looking for a cheap way to controll flow of whater.
the aplication goes like this:

An strong servo(do not woury aboute power consamption) will be conected to a valve. The valve will be conected to a flow meter whit an analog output voltag 0-5v. 0v representes 0l/min and 5v represents 50l/min

whit an other analog voltage signal I will set the flow of wather.

so I need two analog voltage inputs, one digital input(to start control of flow or shut the valve comletly) and an servo output

My question is: Would it bee possible to control this system whit an Micro Maestro 6-Channel USB Servo Controller

ore is it bether to use an mini maestro??

and how complicated is the code for a PID conttrol algorithem??( I am not exactly an programer)

thank you very much for help

uros r.

Hello, Uros.

Yes, you should be able to control your system using the internal scripting on a Maestro. The Micro Maestro 6-Channel USB Servo Controller is sufficient. However, the Maestro’s scripting language is very limited and you say you are not a programmer, so I suspect that the programming will be a big challenge.

Programming a PID algorithm is not particularly complicated. You can see an example of one here, written in C, in the main() function: … pid/test.c


thnk you very much for helping me out.

I will buy one of these and just give it a try thay ar not that expensive.

I will need help for shore