Hi, Im new with Arduino. And this is my first project, it's bit big job but....
I'm building a temperature controller. It should opens or closes servo controlled hot air flap to keep set temperature within 1-2 degrees of celcius degrees.
Main functions:
NTC temperature sensor, one or two.
Display for current temperature and set temperature.
2 buttons or potentiometer to adjust set temperature.
Basic Futaba servo for flap control.
All is working now except servo by intelligent temperature control (i can move servo with Arduino, but..)
I don't have idea how to go with servo control. Is there any simple way to make some thermostatic program or do i have go with PID library? I would like to keep all simple at first if possible. Servo movement should be smooth and slow.
It will help you to perform some thermal experiments with your system to come up with a control strategy.
Does the system reach temperature with the flap wide open? Does it get too hot with the flap barely open? Is there some flap position which keeps the chamber at the desired stable temperature? Does the thermal load change? Is the target temperature constant? Is there a time varying profile?
Can you modify the underlying heat source and air flow, or do you just have the flap?
Answers to these questions will help guide you to how simple you can keep your control strategy.
This is a temperature controller for small room to keep requested temperature (almost)stable. Maybe this helps to figure out what is going on. Heater's lowest power is often too hot and temperature varies very much depending on outside temperature and so on. I think Arduino can help with this issue.
There is no any flap installed yet. I'm just planning and building it. Flap position can be everything between 0 and 100% to keep requested temperature. Thermal load will change and outside conditions also (day,night,sun..)
Heat source air flow and temperature is stable. Controlling hot air flow with flap may be best solution.
cattledog:
It will help you to perform some thermal experiments with your system to come up with a control strategy.
Does the system reach temperature with the flap wide open? Does it get too hot with the flap barely open? Is there some flap position which keeps the chamber at the desired stable temperature? Does the thermal load change? Is the target temperature constant? Is there a time varying profile?
Can you modify the underlying heat source and air flow, or do you just have the flap?
Answers to these questions will help guide you to how simple you can keep your control strategy.
If you close the flap to prevent any heated air entering the room, where does the heated air go?
Does the heater have other outlets?
If not and you are controlling the only air flow from the heater, as you restrict the air flow to the room, you may also be slowing the air flow through the heater.
Slowing the air flow means that the air will increase in temperature, (if you don't turn the heater down), hence the restricted air going into the room will be increased in temperature.
This system have Y-pipe and 2 outlets. One outlet is coming to this room and other not. Heater is diesel air heater (webasto)
I'm thinking following:
At system startup, flap = 100% open
loop:
Read temperature from sensor (tempC) and compare it to set temperature. (setC)
if tempC is lower than setC, keep 100% flap open
if tempC is higher than setC, adjust flap -40% (for example, we need also wait about 5-10min and read tempC again and do corrections to flap)
if tempC == setC, do not do anything. (maybe there can put some tolerance, ie. within 2 degrees)
And so on.... It may be a good idea to put some negative exponential to servo when we are near tempC and setC, so servo control is not so agressive then.
So, how badly im off?
TomGeorge:
Hi
Welcome to the forum.
If you close the flap to prevent any heated air entering the room, where does the heated air go?
Does the heater have other outlets?
If not and you are controlling the only air flow from the heater, as you restrict the air flow to the room, you may also be slowing the air flow through the heater.
Slowing the air flow means that the air will increase in temperature, (if you don't turn the heater down), hence the restricted air going into the room will be increased in temperature.
I'd distinguish the cases of initial heat-up or cold-down, with the flap fully open or closed, and a finer flap angle control to hold the set temperature. A PID controller may not cover properly the full range of all parameters (set temperature, outside temperature etc.) and the non-linear flap characteristic.
Your "adaptive" approach sounds good to me. You may want to improve it by measuring two temperatures, near the flap and far away. The "near" sensor should measure the mixed air temperature (in + room), so that you can know how fast or how much the temperature will increase. With a conventional (oven...) heating this were the heating device temperature. This temperature should react very quickly on changes of the flap angle, so that you can adjust the angle to a meaningful value quickly, sorting out the non-linear flap characteristic and ingoing temperature. The "far" sensor will provide the feedback for the overall (intended) temperature.
Hi,
Yes, the adaptive approach would be the best.
Because it is air and you are adding or restricting already heated air, the system could get quite dynamic and decreasing the response steps close to set point would help.