i want to build a temperature control with arduino Due using all analog inputs; it means control of 12 area with thermocouple,every area should have lim max and lim min alarm relay output, and if all areas are at the setpoint then we have a led meanning all areas are ok aftre 5 min of a delay..
iwant to use 4 buton for comand and an LCD for dialog with the system.. i just need a help for coding program & the PID controle... please any help??
I'm a technician automatised systems and elecronics ,i work for a company that transforme plastics...so there we have extruders an injection machines...iwant to control the barel temp, it usualy contain aproximatively 12 areas (some times less some times more )...the rotation of the screw must be conditionned withe the set point of usual temp (160 to 400 max)..and each area must have alarm min,alarm max programmable,,
Sounds like a cool project! I'm a glassblower and I made a temperature controller for my annealing kiln with an Arduino. I'm using the Adafruit MAX31855K breakout board with a type K thermocouple for my temperature sensor. Instead of the typical LCD and buttons system for control and monitoring I have the controller connected to my LAN via a W5100 Ethernet controller module. So control, monitoring and logging are all done on my computers. I find this to be a much better interface. I ended up writing my own crude PID code so that I would have a better understanding of all the code running on my system but since you may require precise temperature control in your system you might consider using Brett Beauregard's PID library:
Terry King is using that library in his project.
So obviously our applications are quite different but feel free to ask if you have any specific questions and maybe we'll be able to help you out.
fontom36:
i gess that i should use a library for an AD595 ??
It's really not necessary. The AD595 output is about 10mV/°C so you can get the temperature like this:
const float temperature = analogRead(AD595pin) * (3300.0 / 1023) / 10; // Temperature in degrees Celsius (3300 mV analog voltage reference, 1023 max analogRead() value @ default 10 bit resolution, 10mV/C)
Note that since the maximum analog input voltage of the Due is 3.3V and the AD595 can output up to 12V you would need to reduce the output voltage of the AD595(and adjust the above code accordingly) if you're going to be reading temperatures >330°C, otherwise you may damage your Due.
Mr pert, nice line of code! that's what i need that kind of explanation thank you very much, i will study that line carefully & i will make a simulation...
Mr allanhurst,the use of the 4051 is an intresting idea, but i gess that will give a slow response...the speed of chips and so on..) it may affect the regulation or not??!!
Mr ard_newbie,yes thanks for the 13th embedded sensor, i plain to use that for the temperatur reference ,for those links that level of coding is little advanced than my knowledge looool...i will try to get some thing from them...the 3.3v problem i will use a voltage divider a bridge of 2 resistances is that what i can use??
A single thermocouple amp - eg MAX6675, and 4 4051's or 2 4097's would cater for up to 16 thermouples, and only use 8 or 7 I/O pins on an arduino. Regulation would not be affected.
Yes - it would be a bit slower - perhaps up to 1mS/reading . Is that a problem? The time constant of your measured temperatures will be many seconds at best
can you give me a help for making this project realasable? i have the components and i can do all the electronic assembly i have no idea where from i can begen with the code lool
You can download drivers for the MAX6675 shield ( or , indeed whichever you use) , which make them easy to use.
Are you using 4051's or 4097's ? as a mux - it makes a bit of difference.
regards
Allan...
edit..
The due runs at 3.3v , but the muxes need 5v to switch the inputs, so will need level translation and a 5v supply - could you manage with another arduino eg a mega running on a 5v supply?
4067's could also be used
However you do it , a PCB would be a much neater and more reliable construction method than breadboards.
How do you intend to set and display the temperatures?
Mr allan, i will make a PCB of cours...i want to use a dot matrix LCD SEIKO G2436 (240/64) for the display & i want to use 6 button for commands like that ; 4 buttons for directions ,up down left right , and 1 button for Menu/ok last buton is ExIT or escape
i want to have a set point entry to command the main output relay for each area
also,i want to have a set point for alarm MIN and alarm MAX,both with relay output statut for each area too.
finally i want a relay output indicating that all of the 12 setpoints (heaters) are ok (no alarm temp MIN).
friends,sorry for my bad english loool,i hope i was able telling you my story with my project