Hello, this is my first post on here
I'm pretty new on arduino and I'm not a pro on electronics at all, so I hope that you guys will help me with ideas.
I have home heating system with radiators all over the place. The idea is to control the flow temperature by messuring the temperature outside and then adjust the 3-way (makes flow hoter or colder) valve to match the desired water flow temp in the radiator system. Heating source is always on and produces stable 65-70c but this is not the temperature I want on my system when it's +10c outside, it should be about +30c on the system only
The valve I'm running is an ESBE (ESBE | VRG130 + ARA600 3-point, Rotary unit) 60 second version (60 seconds fully open from closed to open state and the same the opsotive way), running via 220v. The valve has 3 wires - neutral, clock way and counter-clock way. Also, I have 2xDS18B20, one placed outside, other one on the flow pipe after 3-way valve. I have already made this thing that can be connected to arduino and is possible to control the valve - open it or close for X seconds.
For example, I have the Setpoint +30c when it's +10c outside. So, the big question is - HOW? I have looked at PID library but I dont realy undrstand if this will work for me too. As I understand, the PID generates an Output based on the error factor. So far I understand, but how can I use this mystic Output value to drive my motor one way or another or XX seconds? Also, I dont want the motor to run continuously, it should also have a little rest after any movement for say 5 seconds.
And is it possible to not take any movement action if the flow temperature is in the range +/-0.5c of the desired?
You can use the PID output to tell you how much heating it wants. You can model that as a range from 0 to 60 which is the number of seconds the valve was told to open from closed. i.e. 0 is fully closed, 60 is fully open. You can control the output range with SetOutputLimits.
Keep track in your sketch of how open the valve is and use the output to adjust it to what the PID wants.
If I understand right, I should use PID to only determine the values and then make for example another function that moves the valve close or open? I just cannot understand where should I put my open/close digitalwrites in the loop.
Indeed, PID does the computation, then you use the output value to control the valve. It needn't be another function, although I'd probably make it so. Once the PID has given you your output value, assuming it's from 0 to 60, compare it with the value you are keeping track of that represents the current position of the valve.
If there is a need for more heat, say the valve is at 30 and the PID wants 35, trigger the open valve signal, delay for 5 seconds, turn it off, adjust your valve position variable. To cool down, the same thing on the close valve wire.
Ok, I got the idea. Actualy, I dont need to track the position because, I'm only mesuring the flow temp and comparing it to the desired one. I dont care what position is the valve as long as it moves at all and gives me more heat or shuts off if the heat is too much
In that case, I don't think the PID does anything for you. You can just open the valve a bit if the interior temp is too low and close it if it's too high. Easy to put in your hysteresis control in that case.
You might consider moving the valve a lot if you're a long way from the set point and use finer movements when you're close - much what the PID would do for you, but simpler.
I'd think your five second sampling interval is probably too frequent.
arneefreeman:
Ok, I got the idea. Actualy, I dont need to track the position because, I'm only mesuring the flow temp and comparing it to the desired one. I dont care what position is the valve as long as it moves at all and gives me more heat or shuts off if the heat is too much
Hello @arneefreeman,
How about your project? Did you achieve the desired result? Do you still use PID to calculate valve position?
I'm going to do something similar, but using esp8266.