Author Topic: Oven controller (arduino based)  (Read 18401 times)

Offline rschilp

  • Jr. Member
  • **
  • Posts: 37
  • Country: nl
Oven controller (arduino based)
« on: August 30, 2013, 02:17:01 PM »
Always wanted a metal treating oven, but the ones made for the purpose are WAY over my budget. After looking around for a while I found that Ceramics ovens are cheap, they can often be had around here for Euro50 (USD70) (and sometimes even less) have good temperature range, mostly 1,200C+ (~2,200F)and nice volume. The welcome fact that my wife and kids like working with ceramics doesn't hurt either.

So recently I picked up a 1 cubic foot front load oven (30x30x31cm) with a 1,200C temp rating with a truckload of clay and ceramics supplies for Euro100.

Problem is these are manual control only, no computer and the computers that go with them are WAY expensive and limited functionality.

So I decided to build my own control system. These are the parts I decided to use:
- Arduino UNO
- DF Robot 16x2LCD + 5 buttons
- SSR-40 DA solid state relays
- Adafruit MAX13855 + k-type thermocouple

Today I received the parts and did some coding and it works!!.. although I haven't build an enclosure yet or hooked it up to the actual oven.

The software I wrote has the following options:
- Manual: set/change temperature at will, in in/de-crements of 100C and 5C, while showing the heating activity and time
- Timed: set a temperature, the system will get the oven to the temp, keep it there for a set time and show progress in temp and time and show cooldown temp and time after the process completes
- Anneal: set a temperature, the system will get the oven to temp, and decrease temperature slowly
- Biscuit (Ceramics stuff)
- Glaze (Ceramics stuff)

I'll post updates as I complete the last details and post the code once I've had the change to do a final debug.
Soldered it all together.

Offline rschilp

  • Jr. Member
  • **
  • Posts: 37
  • Country: nl
Re: Oven controller (arduino based)
« Reply #1 on: August 30, 2013, 02:28:29 PM »
A project is not a project without pictures, so here is one on the kitchen table while testing.


Offline AdeV

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2434
  • Country: gb
Re: Oven controller (arduino based)
« Reply #2 on: August 30, 2013, 08:03:09 PM »
Arduinos & thermocouples are great, aren't they? I was messing around with one a couple of years ago, measuring exhaust gas temperature from a loaded slow-speed diesel engine. Great fun, and I still plan to turn it into a highly instrumented genset one day.

I got my thermocouple from Farnell, along with a bunch of MAX6675 chips (IIRC). Once I'd soldered one to a DIP socket (makes it easier to handle), it worked brilliantly.
Cheers!
Ade.
--
Location: Wallasey, Merseyside. A long way from anywhere.
Occasionally: Zhengzhou, China. An even longer way from anywhere...

Offline bhowden

  • Jr. Member
  • **
  • Posts: 30
Re: Oven controller (arduino based)
« Reply #3 on: August 31, 2013, 05:19:08 PM »
Did you incorporate any PID routines to avoid over shooting the temp?  My head usually starts spinning when I look at that stuff.  It is also worth checking the temp range of the thermo couple.  LOTS of K type themocouples are only good to a few hundred degrees.  The one you want looks like a stack of ceramic donuts with no metal on the part in the oven (other than the actual junction and leads).  Donuts can be added or removed to change the length.  I ended up buying a PID controller off ebay.  Landed at my doorstep from Hong Kong it was around $20.  For a little more money you can get them to ramp up and down along with other interesting features.  The same source in Hong Kong carries all sorts of solid state relays for a very reasonable price.  In my case I needed two to switch both sides of the 220 volts as kilns here are wired using the neutral to get multiple heat settings.

Brian

Offline rschilp

  • Jr. Member
  • **
  • Posts: 37
  • Country: nl
Re: Oven controller (arduino based)
« Reply #4 on: September 01, 2013, 12:33:24 AM »
Brian, thanks for the reply, yes I considered all of these items.

The current thermocouple is a cheapy only rated to 400c, the one in the mail from Hong Kong is the real thing upto 1300c.

With this setup I can do up and down slope settings, save multiple preset programs and more, just what I need to de metal and ceramics projects using a single controller.

Offline David Jupp

  • Sr. Member
  • ****
  • Posts: 308
  • Country: gb
  • Teesside - UK
Re: Oven controller (arduino based)
« Reply #5 on: September 01, 2013, 05:48:47 AM »
Just a brief point - may not be critical for this project.

K type thermocouples are widely used, but can suffer problems - ageing/drift for example.  More modern alternative constructions tend to suffer less problems.

Offline rschilp

  • Jr. Member
  • **
  • Posts: 37
  • Country: nl
Re: Oven controller (arduino based)
« Reply #6 on: September 01, 2013, 08:09:18 AM »
David, what other kinds are available? and are they affordable for a project like this?

Thanks,

Rob

Offline David Jupp

  • Sr. Member
  • ****
  • Posts: 308
  • Country: gb
  • Teesside - UK
Re: Oven controller (arduino based)
« Reply #7 on: September 01, 2013, 08:28:22 AM »
There are several other types - N,T,S,J,R and others.  Some have limited useful temperature range, or might be more or less suitable for particular duty.  Check the web or speak to thermocouple vendor for more information.

If a few degrees of error isn't a major problem, then type K should be OK - after all they are still very widely used.  If you need very precise measurement, there are potential subtle calibration/stability issues that you should look into.  The issues can be overcome, but doing so tends to drive up the cost of the element.

I wouldn't expect cost to be a big factor when purchasing say 1 or 2 quantity of differing types - availability may drive your choice though.

You might also want to look into cold junction compensation (potentially a bigger issue than the type K foibles).

Offline rschilp

  • Jr. Member
  • **
  • Posts: 37
  • Country: nl
Re: Oven controller (arduino based)
« Reply #8 on: September 04, 2013, 01:22:00 AM »
Hooked the thing up yesterday and it works great. I used the switching circuit of the oven to control it, just like the factory controller would.

The k-type thermocouple did produce a few stray readings, but with some minor code adjustments these are now no longer an impact.

Did a simple program yesterday getting the oven up to 955c (1751f) and letting it cool down after, this was to bake some ceramics to the biscuit stage.

Have a few updates to make to the code to clean up some screen artifacts, change the time display to hh:mm format and some other minor interface issues, but overall a very successful project. I'm going to make an enclosure for the arduino and screen without the relays and thermocouple parts and make those external with easy connectors so I can use the arduino for other projects and keep the enclosure as small as possible.

Offline pardydon

  • Jr. Member
  • **
  • Posts: 7
Re: Oven controller (arduino based)
« Reply #9 on: February 07, 2014, 01:21:57 AM »
I have done a very similar project. I use it for pottery. I have it working now. I am interested in your approach to the programming. I have simply used the same approach as it was used manually. My glaze firings are very successful. 
I noticed your comment about some problems with the thermocouple readings. I had some problems with my thermal couple readings above 1600 F and I discovered that they went away when I power the Arduino and the max chip from a separate power supply. When I was using my laptop to power the Arduino I got random readings of 0 mixed in with the proper readings. I got no further bad readings when I used a small power supply to directly power the Arduino and the max chip. I can see from your photo that you have almost the identical hardware that I am using. I'm very glad to see someone else doing the same things I am.
« Last Edit: February 07, 2014, 06:01:44 PM by pardydon »

Offline Dawai

  • Full Member
  • ***
  • Posts: 124
  • Country: us
Re: Oven controller (arduino based)
« Reply #10 on: February 10, 2014, 09:36:14 PM »
By the way, that oven will do "wax burnout" for castings too.. (sideways hobby for casting small parts for your blades)

I built a similar system for my casting rig years ago. THE wax burnout took 12 hours to perform, a computer-file controlled heat steps, as it got to the 1 hour mark, the electro melt kicked on and metal was molten at the time when the wax was gone from the crucible-mold. I didn't have arduino's then, it was turbo basic on a pc.

Advantage to using the arduino is you can buy a $12 (your money is different cause I don't recognize that flag) HC-05 bluetooth adapter, and read it on your "android phone or tablet, or computer wirelessly".

Now that is cool.. you are no longer tied to the system watching it.
I Hung a 24 foot Ibeam this morning in the ceiling by myself, programmed a Arduino this afternoon for a solar project, Helped a buddy out with a electrical motor connection issue on the phone, then cut up a chicken for Hotwings. I'd say it has been a "blessed day" for myself and all those around me.

Offline pardydon

  • Jr. Member
  • **
  • Posts: 7
Re: Oven controller (arduino based)
« Reply #11 on: February 11, 2014, 01:22:53 PM »
I am currently modifying a second kiln to be operated with an Arduino. I am very interested in the Bluetooth adapters to send my temperature readings to my smartphone.I am sure that many many people have the similar old kilns they would like to convert to computer control. there are people using them for glass slumping and people using them to heat treat metal I am using it for ceramics.I would like to see the code that the original person who posted this used and compare that to what I am doing. when I get done with my modifications to the second Kiln I would like to tackle the bluetooth challenge. Perhaps you can direct me to a tutorial for that.
I am in Canada. rschilp is in Holland.

Offline rschilp

  • Jr. Member
  • **
  • Posts: 37
  • Country: nl
Re: Oven controller (arduino based)
« Reply #12 on: February 12, 2014, 05:29:43 AM »
Ok, took me a few days to have time to get on here..

The code works great, although I haven't made many changes since I got it working, I've used the kiln for pottery and glaze, metal hardening and softening and wax mold removal.. everything I could think of doing.

The code is included below.

Code: [Select]
/*
Pin information
Analog 0 = Button
Digital 0 = MAX31885 CLK
Digital 1 = MAX31885 CS
Digital 2 = MAX31885 DO
Digital 4 = LCD DB4
Digital 5 = LCD DB5
Digital 6 = LCD DB6
Digital 7 = LCD DB7
Digital 8 = LCD RS
Digital 9 = LCD Enable
Digital 10 = LCD Backlight
Digital 13 = Heater relays
*/

/* 2013 by Rob Schilperoort
parts inspired by dfrobot LCD Keypad shield example
parts inspired by AdaFruit MAX31885 Example
*/

#include <LiquidCrystal.h>
#include "Adafruit_MAX31855.h"

int thermoDO = 2;
int thermoCS = 1;
int thermoCLK = 0;

Adafruit_MAX31855 thermocouple(thermoCLK, thermoCS, thermoDO);

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

// define some values used by the panel and buttons
int lcd_key     = 0;
int adc_key_in  = 0;
#define btnRIGHT  0
#define btnUP     1
#define btnDOWN   2
#define btnLEFT   3
#define btnSELECT 4
#define btnNONE   5

int heatmode    = 0;
#define Manual    0
#define Timed     1
#define Anneal    2
#define Harden    3
#define Biscuit   4
#define Glaze     5

int targettemp = 0;
const int maxtemp = 1200;
int backlight = 0;
int err = 0;

// read the buttons
int read_LCD_buttons()
{
 adc_key_in = analogRead(0);      // read the value from the sensor
/*
lcd.setCursor(8,0);
lcd.print("Key:    ");
lcd.setCursor(11,0);
lcd.print(adc_key_in);
*/
 // my buttons when read are centered at these valies: 0, 144, 329, 504, 741
 // we add approx 50 to those values and check to see if we are close
 if (adc_key_in > 1000) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result
 // For V1.1 us this threshold
 /*
 if (adc_key_in < 50)   return btnRIGHT;
 if (adc_key_in < 250)  return btnUP;
 if (adc_key_in < 450)  return btnDOWN;
 if (adc_key_in < 650)  return btnLEFT;
 if (adc_key_in < 850)  return btnSELECT;
 */
 // For V1.0 comment the other threshold and use the one below:

 if (adc_key_in < 50)  {delay(150); return btnRIGHT;}
 if (adc_key_in < 195) {delay(150); return btnUP;}
 if (adc_key_in < 380) {delay(150); return btnDOWN;}
 if (adc_key_in < 555) {delay(150); return btnLEFT;}
 if (adc_key_in < 790) {delay(150); return btnSELECT;} 

 
 return btnNONE;  // when all others fail, return this...
}

void printheatmode() {
   switch (heatmode)
   {
      case Manual:
      {
         lcd.print("Manual  ");
         break;
      }
      case Timed:
      {
         lcd.print("Timed  ");
         break;
      }
      case Anneal:
      {
         lcd.print("Anneal ");
         break;
      }
      case Harden:
      {
         lcd.print("Harden ");
         break;
      }
      case Biscuit:
      {
         lcd.print("Biscuit");
         break;
      }
      case Glaze:
      {
         lcd.print("Glaze  ");
         break;
      }
   }
}

void heatto(int temp)

  lcd.setCursor(8,1);
  lcd.print("->  ");
  lcd.print(temp);
  digitalWrite(13,HIGH);
 
  unsigned long stamp = millis();
 
  double c;
  while (c<temp)
  {
     lcd.setCursor(13,0);
     lcd.print(lround((millis()-stamp)/60000));
     lcd.setCursor(0,1);
     c = thermocouple.readCelsius();
     if (isnan(c))
     {
       lcd.print("Error");
       c=0;
     }
     else
     {
       lcd.print(lround(c));
       lcd.print("   ");
     }
     delay(1000);
  }
  digitalWrite(13,LOW);
}

void maintain(int temp, int time)
{

  int variation = (temp/50);
  lcd.setCursor(0,1);
  lcd.print("                ");
  lcd.setCursor(8,1);
  lcd.print("=             ");
  lcd.setCursor(10,1);
  lcd.print(temp);
 
  unsigned long endtime = (time*60*1000)+millis();
  double c;
 
  while (millis()<endtime)
  {
    lcd.setCursor(13,0);
    lcd.print(lround((endtime-millis())/60000));
    c = thermocouple.readCelsius();
    lcd.setCursor(0,1);
    if (isnan(c))
    {
      lcd.print("Error");
      c=0;
    }   
    else
    {
      lcd.print(lround(c));
    }
   
    if (c>(temp+variation))
    {
      digitalWrite(13,LOW);
    }
   
    if (c<(temp-variation))
    {
     digitalWrite(13,HIGH);
    }
    delay(500);
  }
  digitalWrite(13, LOW);
}

void coolslow(int rate)
{
}

void monitor()
{
  lcd.setCursor(0,1);
  lcd.print("Cooldown        ");
 
  unsigned long stamp = millis();
  double c;
 
  int select = 0;
  while(select==0)
  {
    lcd.setCursor(13,0);
    lcd.print(lround((millis()-stamp)/60000));
   
    lcd.setCursor(11,1);
    c = thermocouple.readCelsius();
    if (isnan(c))
    {
      lcd.print("Error");
      c=0;
    }
    else
    {
      lcd.print(lround(c));
      lcd.print("   ");
    }
   
    lcd_key = read_LCD_buttons();  // read the buttons
 
    switch (lcd_key)               // depending on which button was pushed, we perform an action
    {
      case btnSELECT:
      {
        select = 1;
        break;
      }
    }
  }
}

void manualmode() {
  int select = 0;
  unsigned long stamp = millis();
  while (select==0)
  {
    lcd.setCursor(13,0);
    lcd.print(lround((millis()-stamp)/60000));
   
    double c = thermocouple.readCelsius();
    lcd.setCursor(0,1);
    if (isnan(c))
    {
      lcd.print("Error");
      c=0;
    }
    else
    {
      lcd.print(lround(c));
      lcd.print("    ");
    }
 
    lcd.setCursor(11,1);
    lcd.print(targettemp);
    lcd.print("   ");
   
    if (targettemp>c)
    {
      lcd.setCursor(8,1);
      lcd.print("+");
         digitalWrite(13,HIGH);
    }
    else
    {
      lcd.setCursor(8,1);
      lcd.print("=");       
         digitalWrite(13,LOW);
    }   
 
  lcd_key = read_LCD_buttons();  // read the buttons
 
  switch (lcd_key)               // depending on which button was pushed, we perform an action
  {
   case btnRIGHT:
     {
     if (targettemp<(maxtemp-99))
     {
        targettemp = targettemp + 100;
     }
     else
     {
         targettemp = maxtemp;
     }
     break;
     }
   case btnLEFT:
     {
     if (targettemp>99)
     {
        targettemp = targettemp - 100;
     }
     else
     {
        targettemp = 0;
     }
     break;
     }
   case btnUP:
     {
       if (targettemp<(maxtemp-4))
     {
        targettemp = targettemp + 5;
     }
     break;
     }
   case btnDOWN:
     {
     if (targettemp>4)
     {
        targettemp = targettemp - 5;
     }
     else
     {
        targettemp = 0;
     }
     break;
     }
     case btnSELECT:
     {
       select=1;
       break;
     }
   }
  }
}

void timedmode()
{
  lcd.setCursor(0,1);
  lcd.print("Target Temp:");
  targettemp=500;
  int select = 0;
  while(select==0)
  {
    lcd.setCursor(13,1);
    lcd.print(targettemp);
    lcd.print("   ");
    lcd_key = read_LCD_buttons();  // read the buttons
 
    switch (lcd_key)               // depending on which button was pushed, we perform an action
    {
      case btnRIGHT:
      {
        if (targettemp<(maxtemp-99))
        {
           targettemp = targettemp + 100;
        }
        else
        {
            targettemp = maxtemp;
        }
        break;
      }
      case btnLEFT:
      {
        if (targettemp>99)
        {
          targettemp = targettemp - 100;
        }
        else
        {
          targettemp = 0;
        }
        break;
      }
      case btnUP:
      {
        if (targettemp<(maxtemp-4))
        {
          targettemp = targettemp + 5;
        }
        break;
      }
      case btnDOWN:
      {
        if (targettemp>4)
        {
          targettemp = targettemp - 5;
        }
        else
        {
          targettemp = 0;
        }
        break;
      }
      case btnSELECT:
      {
        select = 1;
        break;
      }
    }
  }
  lcd.setCursor(0,1);
  lcd.print("Duration:       ");
  int duration=0;
  select = 0;
  while(select==0)
  {
    lcd.setCursor(10,1);
    lcd.print(duration);
    lcd.print("   ");
    lcd_key = read_LCD_buttons();  // read the buttons
 
    switch (lcd_key)               // depending on which button was pushed, we perform an action
    {
      case btnRIGHT:
      {
        if (duration<(999-59))
        {
           duration = duration + 60;
        }
        else
        {
            duration = 999;
        }
        break;
      }
      case btnLEFT:
      {
        if (duration>59)
        {
          duration = duration - 60;
        }
        else
        {
          duration = 0;
        }
        break;
      }
      case btnUP:
      {
        if (duration<(999-4))
        {
          duration = duration + 5;
        }
        break;
      }
      case btnDOWN:
      {
        if (duration>4)
        {
          duration = duration - 5;
        }
        else
        {
          duration = 0;
        }
        break;
      }
      case btnSELECT:
      {
        select = 1;
        break;
      }
    }
  }
 
  lcd.setCursor(0,1);
  lcd.print("         ");
 
  heatto(targettemp);
  maintain(targettemp,duration);
  monitor();

}

void annealmode()
{
   lcd.setCursor(0,1);
  lcd.print("Anneal Temp:");
  targettemp=400;
  int select = 0;
  while(select==0)
  {
    lcd.setCursor(13,1);
    lcd.print(targettemp);
    lcd_key = read_LCD_buttons();  // read the buttons
 
    switch (lcd_key)               // depending on which button was pushed, we perform an action
    {
      case btnRIGHT:
      {
        if (targettemp<(maxtemp-99))
        {
           targettemp = targettemp + 100;
        }
        else
        {
            targettemp = maxtemp;
        }
        break;
      }
      case btnLEFT:
      {
        if (targettemp>99)
        {
          targettemp = targettemp - 100;
        }
        else
        {
          targettemp = 0;
        }
        break;
      }
      case btnUP:
      {
        if (targettemp<(maxtemp-4))
        {
          targettemp = targettemp + 5;
        }
        break;
      }
      case btnDOWN:
      {
        if (targettemp>4)
        {
          targettemp = targettemp - 5;
        }
        else
        {
          targettemp = 0;
        }
        break;
      }
      case btnSELECT:
      {
        select = 1;
        break;
      }
    }
  }
 
  heatto(targettemp);
  maintain(targettemp,10);
  coolslow(60);
  monitor();
 
}

void hardenmode()
{
 
}

void biscuitmode()
{
   lcd.setCursor(0,1);
  lcd.print("Temperature:");
  targettemp=955;
  int select = 0;
  while(select==0)
  {
    lcd.setCursor(12,1);
    lcd.print(targettemp);
    lcd.print("     ");
    lcd_key = read_LCD_buttons();  // read the buttons
 
    switch (lcd_key)               // depending on which button was pushed, we perform an action
    {
      case btnRIGHT:
      {
        if (targettemp<(maxtemp-99))
        {
           targettemp = targettemp + 100;
        }
        else
        {
            targettemp = maxtemp;
        }
        break;
      }
      case btnLEFT:
      {
        if (targettemp>99)
        {
          targettemp = targettemp - 100;
        }
        else
        {
          targettemp = 0;
        }
        break;
      }
      case btnUP:
      {
        if (targettemp<(maxtemp-4))
        {
          targettemp = targettemp + 5;
        }
        break;
      }
      case btnDOWN:
      {
        if (targettemp>4)
        {
          targettemp = targettemp - 5;
        }
        else
        {
          targettemp = 0;
        }
        break;
      }
      case btnSELECT:
      {
        select = 1;
        break;
      }
    }
  }

  lcd.setCursor(0,1);
  lcd.print("                ");         
  heatto(targettemp);
  maintain(targettemp,10);
  monitor();


void glazemode()
{
   lcd.setCursor(0,1);
  lcd.print("Temperature:");
  targettemp=1055;
  int select = 0;
  while(select==0)
  {
    lcd.setCursor(12,1);
    lcd.print(targettemp);
    lcd.print("     ");
    lcd_key = read_LCD_buttons();  // read the buttons
 
    switch (lcd_key)               // depending on which button was pushed, we perform an action
    {
      case btnRIGHT:
      {
        if (targettemp<(maxtemp-99))
        {
           targettemp = targettemp + 100;
        }
        else
        {
            targettemp = maxtemp;
        }
        break;
      }
      case btnLEFT:
      {
        if (targettemp>99)
        {
          targettemp = targettemp - 100;
        }
        else
        {
          targettemp = 0;
        }
        break;
      }
      case btnUP:
      {
        if (targettemp<(maxtemp-4))
        {
          targettemp = targettemp + 5;
        }
        break;
      }
      case btnDOWN:
      {
        if (targettemp>4)
        {
          targettemp = targettemp - 5;
        }
        else
        {
          targettemp = 0;
        }
        break;
      }
      case btnSELECT:
      {
        select = 1;
        break;
      }
    }
  }
 
 
  lcd.setCursor(0,1);
  lcd.print("                ");
 
  heatto(targettemp);
  maintain(targettemp,10);
  monitor();
}

void setup() {
  lcd.begin(16, 2);              // start the library
  lcd.clear();
  lcd.print("Thermocontroller");
  lcd.setCursor(0, 1);
  lcd.print("v1 2013");
  pinMode(13,OUTPUT);
  digitalWrite(13,LOW);
  pinMode(10,OUTPUT);
  digitalWrite(10,HIGH);
  delay(1000);
  int c = thermocouple.readInternal();
}

void loop() {
  lcd.clear();
  lcd.print("Select mode:");
  heatmode=0;
  int select = 0;
  while(select==0)
  {
     lcd_key = read_LCD_buttons();  // read the buttons
 
     switch (lcd_key)               // depending on which button was pushed, we perform an action
     {
        case btnUP:
          {
             heatmode++;
             break;
          }
        case btnDOWN:
          {
             heatmode--;
             break;
          }
        case btnSELECT:
          {
             select=1;
             break;
          }
      }
      if(heatmode==6) heatmode=0;
      if(heatmode==-1) heatmode=5;
      lcd.setCursor(0,1);
      printheatmode();
  }
 
  lcd.clear();
  printheatmode();
    switch (heatmode)
   {
      case Manual:
      {
         manualmode();
         break;
      }
      case Timed:
      {
        timedmode();
         break;
      }
      case Anneal:
      {
        annealmode();
         break;
      }
      case Harden:
      {
        hardenmode();
         break;
      }
      case Biscuit:
      {
        biscuitmode();
         break;
      }
      case Glaze:
      {
        glazemode();
         break;
      }
   }
 
}


Offline Dawai

  • Full Member
  • ***
  • Posts: 124
  • Country: us
Re: Oven controller (arduino based)
« Reply #13 on: February 12, 2014, 10:38:42 AM »
Thank you for sharing your work.
I am not familiar with the thermocouple input device there.. I'll have to research it.
I Hung a 24 foot Ibeam this morning in the ceiling by myself, programmed a Arduino this afternoon for a solar project, Helped a buddy out with a electrical motor connection issue on the phone, then cut up a chicken for Hotwings. I'd say it has been a "blessed day" for myself and all those around me.

Offline AdeV

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2434
  • Country: gb
Re: Oven controller (arduino based)
« Reply #14 on: February 12, 2014, 12:47:50 PM »
Thank you for sharing your work.
I am not familiar with the thermocouple input device there.. I'll have to research it.

It's the replacement for the old MAX6675 chip, which is a K-type thermocouple amplifier/A-to-D converter with SPI interface & built in cold-junction compensation. It's a cracking piece of kit, but a tad pricey at around $10 per piece ($6 in bulk). It's also a sod to hand-solder as it's only available in surface mount form...
Cheers!
Ade.
--
Location: Wallasey, Merseyside. A long way from anywhere.
Occasionally: Zhengzhou, China. An even longer way from anywhere...

Offline pardydon

  • Jr. Member
  • **
  • Posts: 7
Re: Oven controller (arduino based)
« Reply #15 on: February 12, 2014, 08:48:56 PM »
re the comment about the max 31855 . I used the chip on a board from adafruit . about $18. Nice bit of work from them , very easy to use.  Returns a temp compensated reading.
Thanks to rschilp for the code....very similar to my approach.  I will learn from your code as you are much better  at it  than I am . I have a background in electronics but the coding is new to me.  I find it just amazing what is possible with open source and sites like this one....

Offline Dawai

  • Full Member
  • ***
  • Posts: 124
  • Country: us
Re: Oven controller (arduino based)
« Reply #16 on: February 13, 2014, 05:50:49 AM »
This project kinda makes me want to build another Electromelt clone.  That was the handiest small casting device I've had yet.  (looks like the code would work as easily in there as a aluminum smelter, firewood boiler or...)

With enough ingenuity, people are doing anything & everything with the arduino's.
I Hung a 24 foot Ibeam this morning in the ceiling by myself, programmed a Arduino this afternoon for a solar project, Helped a buddy out with a electrical motor connection issue on the phone, then cut up a chicken for Hotwings. I'd say it has been a "blessed day" for myself and all those around me.

Offline rschilp

  • Jr. Member
  • **
  • Posts: 37
  • Country: nl
Re: Oven controller (arduino based)
« Reply #17 on: February 15, 2014, 04:54:07 AM »
I used the max 31855 from adafruit as well, although it is pricey, it is a very nice piece of equipment that makes working with the thermocouple so much easier.

It would be VERY easy to use the code as is or modify it make it useable for all kinds of temperature control situations. If you do modify the code, please share it in the public domain and post a link here where we can find the updated code so we can all benefit and learn.

The code has a nice way to set the maximum allowed variation (variable is called variation) and is currently set to 2% of target temp (target/50) that is a parameter you may want to play with for any process that has a larger or smaller tolerance. The current setup (code) will allow a process that maintains 1000C  to get down to as low as 980C before turning on the heat again.

Looking at the code it really needs a function to do timed ramp up and ramp down, allowing for slower warming and/or cooling then is the case with the heater on or off at 100% duty cycle. If I find some time in the next few weeks I may add that code, if I do I'll post the updated source here.

On the hardware side I don't control the power to the oven heating element directly, although the solid state relays I used is large enough to handle the load, I decided to open up my kiln and use the build in safety circuit (still 220v but draws much less amperage than the heater circuit) as the switching circuit, safer and cleaner solution in my opinion.

The kiln has two air vent holes, my future plan calls for the installation of some actuators on those for open/close functionality and a small computer type fan (very low cfm/pressure) on one to allow me to control evaporation and help cool the over faster than just turning the power off, and with the help of the fan (on/off/speed) control the rate of cooling.

Offline Dawai

  • Full Member
  • ***
  • Posts: 124
  • Country: us
Re: Oven controller (arduino based)
« Reply #18 on: February 21, 2014, 12:06:56 PM »
http://www.ebay.com/itm/1pc-KYOTTO-AC-Solid-State-Relay-SSR-KR2075AX-280VAC-75A-Variable-Resistor-IN-/130662445830?pt=LH_DefaultDomain_0&hash=item1e6c16b306

What I think you are asking? Proportional output HOW TO?? simply.. the SSRV listed there on ebay is a variable output solid state relay that takes a variable resistor pot to "turn on and adjust the level" of the output, up to 75 amps.

Last time I did this, I used a switching device a MOC3010 opto-triac driver and parallel resistors in line with the outputs.. by selecting them binary value increments (each successive resistor half previous) you could select a proportional output. with all on = 100%, etc.. simply, nothing to really build..  It did use up a few outputs. I think I had 4 steps on that one.

I did this with a vfd inverter recently too, used the "programmable logic binary inputs" on the vfd terminal strip to vary speeds with a plc.. relay output, hard contacts..  the brick PLC had no analog or pwm frequency output.

Perhaps this can help with "electrical logic" for someone elses' project. Kinda a sideways approach, but a cheap one, us hillbillies like cheap.
I Hung a 24 foot Ibeam this morning in the ceiling by myself, programmed a Arduino this afternoon for a solar project, Helped a buddy out with a electrical motor connection issue on the phone, then cut up a chicken for Hotwings. I'd say it has been a "blessed day" for myself and all those around me.

Offline pardydon

  • Jr. Member
  • **
  • Posts: 7
Re: Oven controller (arduino based)
« Reply #19 on: February 21, 2014, 11:50:50 PM »
Here is a very simple bit of code.

//output to element 25%
void heatLow(){
  digitalWrite(ledPin,HIGH);
  delay(2000);//on time 2 sec
  digitalWrite(ledPin,LOW);
  delay(6000);//off time 6 sec
}//end of function

Kiln  elements need many seconds to heat up. I use a SSR for each of three elements. The original manual   controls cycled on an eight second period so I just mimicked that.
Arduino can use timing or target temperature or ?? for whatever you want.
 

Offline rschilp

  • Jr. Member
  • **
  • Posts: 37
  • Country: nl
Re: Oven controller (arduino based)
« Reply #20 on: February 22, 2014, 02:08:58 AM »
Pardyon, that is exact solution I was going to use as well, why do hardware when a software solution will work with much more flexibility.

Offline pardydon

  • Jr. Member
  • **
  • Posts: 7
Re: Oven controller (arduino based)
« Reply #21 on: February 23, 2014, 12:38:24 PM »
Here is another more flexible bit of code

/ element power at ?% to a set temp
void heatKiln (float percentHeat, int targetTemp){
  //int f = thermocouple.readFarenheit();
  if ( tempVal() < targetTemp){

    digitalWrite(ledPin,HIGH);
    digitalWrite(ledPinTwo,HIGH);
    digitalWrite(ledPinThree,HIGH);
    delay((percentHeat/100) * 8000);//on time
    digitalWrite(ledPin,LOW);
    digitalWrite(ledPinTwo,LOW);
    digitalWrite(ledPinThree,LOW);
    delay(((100-percentHeat)/100)*8000);//off time
  }
}