ramp temperatur

Hello every body .Hope that every thing good. I am new here; so I need your help please
I want to do a program which modify the temperature in ramp. So i used :

  • 2 thermocouples K and the thermocouple’s library MAX6675
  • the Arduino Card MEGA 2750 and a coil’s contact wich will be excited by the courant of the ARDUINO card. this contact will increase the courant and communicate it to a heating resistence .This one will vary the temperature.
  • So this is the program that i made and i would like to know ; how i can modify it to get a RAMP TEMPERATURE , which is stabilised at 320 celsius degree.
    #include"max6675.h" // Ze call the termocouple’s library
    //we difine the different pin of the thermocouple ‘’Four’’ to Arduino

int ktcSO=8;// Output pin that carries each bit

int ktcCS=9;// Input pin that tells the Arduino board that it is time for the thermocouple to read and send the data
int ktcCLK=10;// Pin that indicates when a new data bit is entered

// We do the same for the ‘’creuset’’ thermocouple

int ktcaSO=11;
int ktcaCS=12;
int ktcaCLK=13;

// The pins are associated with their thermocouple respectively

Max6675 ktc(ktcSO,ktcCS,ktcCLK);
MAX6675 ktca(ktcaSO,ktcaCS,ktcaCLK);

void setup() {
// We start the connection

Serial.begin(9600);
pinMode(7,OUTPUT);// We define pin 7 To transmit information to the system

delay(50);

Serial.println("CLEARSHEET");// We delete the Excel table

Serial.println("LABEL,Temp Four, Temp creuset,Timer");// We define the 2 columns of the table Temp Four and Temp creuse

}

void loop() {
// put your main code here, to run repeatedly:
exxcel();
four();
void excel(){
Serial.println((String)"DATA,"+ktc.readCelsius()+","+ktca.readCelsius()+","+"TIMER");
// The temperature of the thermocouples is added to each column; ktc.readCelsius reads the temperature

delay(2000);//

void four (){

// If the oven temperature is less than 320 (changeable), the output is set to the LOW state, which turns on the heating collar.

if(ktc.readCelsius()<=320){
digitalWrite(7,HIGH);
delay(10);//
}
// If the oven temperature is above 320 (changeable), the output is set to the LOW state, which turns off the heating collar

if(ktc.readCelsius()>=320){
digitalWrite(7,LOW);
delay(10);//

}

ramp temperatur.pdf (165 KB)

Try this, http://forum.arduino.cc/index.php/topic,148850.0.html

Number 7 will be very helpfully for others and people tend to help more when that's all sorted.

Good morning every one. i have made a programm with arduino ;wich help to increase the temperature and to stabilize it.

unfortunatly when i run the programm the temperatur decreases and it does not stabilize PLEASE CAN SOMEBODY HELP?

// #include"max6675.h" // on appelle la bibliothèque d'amplification des thermocouples

#include <max6675.h>
ktc.readCelsius();
double temp;
float i;

//we associate the thermocouple oven pins to the different pins of the Arduino board
int ktcSO=8;//Output pin that carries each bit
int ktcCS=9;//Input pin that tells the Arduino board that it's time for the thermocouple to read and send the data
int ktcCLK=10;//Pin that indicates when a new data bit is entered
//We do the same for the crucible thermocouple
int ktcaSO=11;
int ktcaCS=12;
int ktcaCLK=13;

MAX6675 thermocouple(ktcCLK, ktcCS, ktcDO);
int vccPin = 7;
int gndPin = 2;

//The pins are associated with their respective thermocouple

//Max6675 ktc(ktcSO,ktcCS,ktcCLK);
//MAX6675 ktca(ktcaSO,ktcaCS,ktcaCLK);

void setup() {
// We start the connection
Serial.begin(9600);
pinMode(vccPin, OUTPUT); digitalWrite(vccPin, HIGH);
pinMode(gndPin, OUTPUT); digitalWrite(gndPin, LOW);
pinMode(7,OUTPUT);//We define pin 7 To transmit information to the system

delay(50);

Serial.println("CLEARSHEET");//We delete the Excel table
Serial.println("LABEL,Temp Four, Temp creuset,Timer");//We define the 2 columns of the table Temp Four and Temp crucible

}

void loop() {
// put your main code here, to run repeatedly:

exit
excel();
four();
}
void excel(){
Serial.println((String)"DATA,"+ ktc.readCelsius()+","+ktca.readCelsius()+","+"TIMER");
//The temperature of the thermocouples is added to each column; thermo.readCelsius reads the temperature
delay(2000);//this is done every 2 seconds
}

void four (){

//If the oven temperature is below 320 (changeable), the output is set to the LOW state to turn off the collar.
if( ktc.readCelsius()<=320){

temp = ktc.readCelsius();

if( temp <=i);{
digitalWrite(7,HIGH);
}
if (temp >=i+1);{
digitalWrite(7,LOW);
i=i+0.5
}
}

//If the oven temperature is greater than 320 (changeable), the output is set to the LOW state, which turns off the collar
if(ktc.readCelsius()>=321){
digitalWrite(7,LOW);
delay(10);//we check the temperature every 10ms
}
}

}

Bringamosa:
Try this, http://forum.arduino.cc/index.php/topic,148850.0.html

Number 7 will be very helpfully for others and people tend to help more when that's all sorted.

did you get a chance to read reply #1 ?

HOW TO USE THIS FORUM

#7 is very helpful.

learn about PID and use PI only since this is temperature.

get rid of delay. Think of delay as racing someone as fast as you can, downhill, then stopping dead in your tracks every 2 seconds.

look up blink without delay or BWD
delay() will kill any chance of control, even is something as slow as temperature control

the instructions and examples for PID should include ramping to temperature.