hello everyone!
i am new-really new to adruino and it's features and possibilities,
recently i recieved a task from the college i am studying at.
the task is to perform a PID temperature control using arduino.
i recieved an arduino starters kit with a simple temperature sensor.
i have an idea in mind and was wondering if you guys can help me make it work.
i want to do as follows:
use an electrical cooling/heating board-when i get the temperature sensor besides hot water say about 40 deg celcius-the electrical board will use about 60% of it's cooling ability (it depends on how much current it gets right?) and at the same time a BLUE led will illuminate also at 60% of it's illumination ability.
if i put the temp sensor besides hoter water say at 60 deg celcius the electrical cooling board will work at full 100% power and the blue led will illuminate at 100% also.
and i wanna make the opposite too,meaning that when i put the temp sensor near water at about 10 deg celcius the electrical board will work with
reverse polarity and will produce HEATING at about 60% power while a RED led will also work with 60% power and so on-i believe you got the idea..
now i was thinking of doing that by choosing a "border" temperature say at 20 deg celcius which of course below the electric board and the red led will operate according to how low below this temperature value the sensor recieved.
i was also thinking that when on cooling mode output number 1 (which connected to the electrical board) will give + - polarity while output no 2 is off,and when on heating mode output number 2 will give - + polarity while output number 1 is off.
thats the main idea,i would really appreciate if someone can direct me on how should i make it work.
thanks ahead,
rami.
I assume your 'electrical cooling/heating board' is some sort of Peltier. In that case you need to consider what you're going to use as a heatsink and consider what's going to happen as your heatsink gets very hot/cold.
Apart from the practical issues relating to getting the heating/cooling working, the behaviour you describe relating the heating and indicators to temperature describes a simple proportional control and wouldn't involve PID. Given that you describe the project as a temperature control being set as an academic task, I think it's pretty unlikely that a simple proportional control is going to be adequate and you probably do actually want a PID algorithm, but make sure you understand what that is before you go any further because it's not what you described.
Once you confirm that's what you want, you'll find that there is a PID library for Arduino so most of the hard work has already been done for you.
thank you for the reply peter.
can you give me a good example for a PID controlled system using temperature control?
like:an air condition set to 27 deg with autofan(one before the lowest fan level) is a PID controlled system?
Start with P control.
Switch the fan fully on when the temperature goes above the SV and fully off when it goes below.
You could also use a resistor or a power transistor as a heater.
Then introduce a region around the set value in which the controller looks at the integral of the last of error and decides how much to heat or cool depending on that result (fan faster or slower or heater current). Outside of this region (called proportional band), proportional control is active and the fan goes fully on or fully off.
derivative action looks at the current gradient of the change in temperature and would attempt to slow the cooling before the process variable(actual temperature) drops below the set value. or vice versa.
If you google for Arduino PID you will find a ton of examples. There is a PID library for the Arduino which comes with various examples and explanations. I suggest you research the PID algorithm in general to understand what it is and how it works, then look at the documentation for the Arduino PID library.
i think thats what i am gonna do.
i will start with p control as shadow suggested and will study the PID algorithm.
thanks for the help guys!