Any advice for explaining a problem/general tips are most welcome.
Hi,
I am trying to build an automatic controller for my distillation unit (whiskey still). It is a 200L vessel with a reflux cooler at the top, then a condenser to the outlet. When we run a brew through it probably takes us 6-7 hours and we are constantly (checking every 5 mins once its stable) adjusting the reflux water flow (with a manual ball valve), while monitoring the
temperature at the reflux outlet.
I have purchased a mechanical ball valve which has a geared DC motor to adjust the water flow rate, it has limit switches at the fully closed and fully open ends of movement. I intend to use a PID controller with input from a thermocouple (MAX6675) as feedback, but need to be able to apply power to the valve to get it to the correct position/flow rate.
I'm trying to see if my position control idea is too flawed and i should just add a potentiometer or if it really may be possible.
My idea was to jog the valve with a fixed duration pulse so it just slightly opens or closes a set amount each time. In reality because of increasing friction due to seal surface contact as the valve closes, more pulses are required to close the valve than open it. Also the gearbox has some slack when changing direction, a pulse is needed to take up that slack so the next movement is to the same set amount.
I'm not confident at this stage that getting accurate control is possible.
I'm just learning about PID control and have never implemented it, but i understand that it should adapt to external changes on the system, maybe even control instrument drift (thermocouple seems to be stable at least).
Sorry the code has lots of irrelevant stuff for the problem at hand. Most of the code i'm trying to fix is just above the commented out PID control in the loop.
from:
"if (mode ==0) {"
Hope this makes sense. Any advice for how to explain my problems/general tips are most welcome.
In short is a position control possible on a ball valve (see link below) without a potentiometer?
Casey
Mechanical Ball Valve link:
brew_w_lcd2.ino.ino (17.7 KB)