Combine Display+Controls with Pizza oven

Hello Guys,

im not sure if what im asking is possible but please bear with me.
My Project is basically to modify a Pizza Oven I bought (google "G3 Ferrari".

I want to add the following features:

  1. More accurate Temperature Settings (with no limits more or less)
  2. The Stone should be able to turn if I want to
  3. I want a Display to show the current Status
  4. I want a Keypad/something similar to control the oven

Now steps 1 and 2 are very easy (well, atleast the programming). I control the Temperature by connecting the 2 Heat shields to a Relay and by adding two Temperature Sensors (one in the Top and one in the bottom). Now I measure the Temperature and if its not in the range of my wished Temperature the Relay opens/closes.

The Motor is just a simple motor connected to a controller which is basically a switch (on/off, bool).

Now that you are suitably informed about my Project, lets talk about my Problem.

As a Display/Keypad I got the "1602 LCD Keypad Shield" (like https://create.arduino.cc/projecthub/electropeak/using-1602-lcd-keypad-shield-w-arduino-w-examples-e02d95)

Now I dont want to use the labelled buttons like they are displayed, but rather to directly control the oven. Basically:

  1. If there were no User Inputs for X Seconds show the current Temperatures (I have no idea how to write this since there is no "wait for", timer or similar function)
  2. The "Select" Button should switch between "Standard" Mode (where you only select one temperature (which is for both top and bottom relay/etc)
  3. The "Left" Button should then switch if you want to change the steps between temp selection (not implemented yet but easy), change the upper temp, lower temp, or "Standard Temp".
  4. Up and Down then let you change the values selected from 3.
  5. "Right" Button will always either turn the Motor on or Off (easy)

Now I dont know how to combine the functions of the Keypad and the other "regular functions" (like controlling the relay). Because the Keypad functions rely on waiting until the user actually does something and the relay/Temp sensor has to be continuosly controlled.

Currently this is my Code:

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

// digital IO pins.
#define Relais1 0
#define Relais2 1
#define DO   2
#define Motorpin 3
#define CS1  12
#define CS2  13
#define CLK  11
int Array1[10];
int Array2[10];
int I=0;
float Avgc1;
float Avgc2;
bool feineinstellungen;
int Temperatur;
int SollTempOben;
int SollTempUnten;
int TempToleranzUnten;
int TempToleranzOben;
bool Motor;
int TempSel;


#include <LiquidCrystal.h>
// select the pins used on the LCD panel
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

// read the buttons
int read_LCD_buttons()
{
 adc_key_in = analogRead(0);      // read the value from the sensor
 // 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;




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


// initialize the Thermocouple
Adafruit_MAX31855 thermocouple1(CLK, CS1, DO);
Adafruit_MAX31855 thermocouple2(CLK, CS2, DO);

void setup() {

//LCD INI
{
 lcd.begin(16, 2);              // start the library
 lcd.clear();
 lcd.print("Pizzamaster 3000 Startup"); // print a simple message
}

delay(5000);
  
  //Temperatursensoren
  Serial.begin(9600);

  while (!Serial) delay(1); // wait for Serial on Leonardo/Zero, etc
  lcd.setCursor(0,0);
  lcd.print("MAX31855 1 test");
  // wait for MAX chip to stabilize
  delay(500);
  lcd.setCursor(0,0);
  lcd.print("Initializing sensor 1...");
  if (!thermocouple1.begin()) {
  lcd.setCursor(0,0);
    lcd.println("ERROR.1");
    while (1) delay(10);
  }
  lcd.setCursor(0,0);
  lcd.print("DONE SENSOR 1");

  lcd.setCursor(0,1);
  lcd.print("MAX31855 2 test");
  // wait for MAX chip to stabilize
  delay(500);
  lcd.setCursor(0,1);
  lcd.print("Initializing sensor 2...");
    if (!thermocouple2.begin()) {
  lcd.setCursor(0,1);
    lcd.print("ERROR.2");
    while (1) delay(10);
  }
  lcd.setCursor(0,1);
  lcd.print("DONE SENSOR 2");
TempSel=1;


//Relaissteuerung
pinMode(Relais1, OUTPUT);
pinMode(Relais2, OUTPUT);
if (feineinstellungen==false) {
TempToleranzUnten=5;
TempToleranzOben=3;
}
 lcd.clear();
lcd.print("Pizzamaster 3000 READY");

}
void loop() {

//Display
 lcd_key = read_LCD_buttons();  // read the buttons

 switch (lcd_key)               // depending on which button was pushed, we perform an action
 {
   case btnRIGHT:
     {
     if (Motor==false) {
lcd.clear();
lcd.print("Motor an");
digitalWrite(Motorpin, HIGH);
Motor=true;
     }
      if (Motor==true){
lcd.clear();
lcd.print("Motor aus");
digitalWrite(Motorpin, LOW);
Motor=false;
      }
     break;
     }
   case btnLEFT:
     {
     TempSel=TempSel+1;
     if (TempSel==4) {
      TempSel=1;
     }
     switch (TempSel){
     case 1:
     {
       lcd.clear();
     lcd.print("Temperatur");
     }
     case 2:
     {
       lcd.clear();
     lcd.print("Temperatur");     
     lcd.setCursor(1,1);
     lcd.print("Oben");
     }
     case 3:
     {
     lcd.clear();
     lcd.print("Temperatur");
     lcd.setCursor(1,1);
     lcd.print("Unten");
     }
     break;
     }
     }
   case btnUP:
     {
     switch (TempSel){
     case 1:
     {
     Temperatur=Temperatur+5;
      lcd.clear();
     lcd.print(Temperatur);
     }
     case 2:
     {
     SollTempOben=SollTempOben+5;
      lcd.clear();
     lcd.print(SollTempOben);     
     }
     case 3:
     {
     SollTempUnten=SollTempUnten+5;
      lcd.clear();
     lcd.print(SollTempUnten);     
     }
     break;
     }
     }
   case btnDOWN:
     {
     switch (TempSel){
     case 1:
     {
     Temperatur=Temperatur-5;
      lcd.clear();
     lcd.print(Temperatur);
     }
     case 2:
     {
     SollTempOben=SollTempOben-5;
      lcd.clear();
     lcd.print(SollTempOben);     
     }
     case 3:
     {
     SollTempUnten=SollTempUnten-5;
      lcd.clear();
     lcd.print(SollTempUnten);     
     }
     break;
     }
     }
   case btnSELECT:
     {
     if (feineinstellungen==false) {
       lcd.clear();
     lcd.print("Feineinstellungen AN");
     feineinstellungen=true;
     }
     else{
       lcd.clear();
     lcd.print("Feineinstellungen AUS");
     feineinstellungen=false;
     }
     break;
     }
 }

  //Temperatursensor
   while(I!=9) {
   double c1 = thermocouple1.readCelsius();
   double c2 = thermocouple2.readCelsius();
   if (isnan(c1)) {
     Serial.println("Something wrong with thermocouple 1!");
   } else {
   if (isnan(c2)) {
     Serial.println("Something wrong with thermocouple 2!");
   }
   delay(100);
   }
   Array1[I]=c1;
   Array2[I]=c2;
   I=I+1;
   }
   I=0;
   Avgc1=(Array1[0]+Array1[1]+Array1[2]+Array1[3]+Array1[4]+Array1[5]+Array1[6]+Array1[7]+Array1[8]+Array1[9])/10;
   Avgc2=(Array2[0]+Array2[1]+Array2[2]+Array2[3]+Array2[4]+Array2[5]+Array2[6]+Array2[7]+Array2[8]+Array2[9])/10;
   //Avgc1 is the average of the last 10 readings for Sensor 1
   //Avgc2 is the average of the last 10 readings for Sensor 2

//Relaissteuerung
if (feineinstellungen==false) {
if (Avgc1<(Temperatur-TempToleranzUnten)) {
  digitalWrite(Relais1, HIGH);
}
if (Avgc1>(Temperatur+TempToleranzOben)) {
  digitalWrite(Relais1, LOW);
}
if (Avgc2<(Temperatur-TempToleranzUnten)) {
  digitalWrite(Relais2, HIGH);
}
if (Avgc2>(Temperatur+TempToleranzOben)) {
  digitalWrite(Relais2, LOW);
}
}
else {
if (Avgc1<(SollTempUnten-TempToleranzUnten)) {
  digitalWrite(Relais1, HIGH);
}
if (Avgc1>(SollTempOben+TempToleranzOben)) {
  digitalWrite(Relais1, LOW);
}
if (Avgc2<(SollTempUnten-TempToleranzUnten)) {
  digitalWrite(Relais2, HIGH);
}
if (Avgc2>(SollTempOben+TempToleranzOben)) {
  digitalWrite(Relais2, LOW);
}
}

}

Right now the structure can be described like this:

  1. Complete Setup etc (I think the order of the Steps doesnt really matter here)
  2. Loop:
    2.1 The Keypad + Display Integration with multiple Switch Cases to react according to the user Inputs
    2.2 The Temperature Sensor readings being saved into an Array (to get an averaged reading)
    2.3 The Relay either opening or closing

My actual Issue is writing Code so that the Display reacts to my Keypad Inputs, while simultaneausly controlling the Relay/Temp Sensors.
The Display works for the Setup Phase, but basically breaks when it enters the Loop section.

If you are looking for help creating a massive convoluted do-all in one logic mess, count me out. The correct way is to create the display function that looks at the variables to be shown perhaps every second and have that function only deal with the display.
Then have a function that ONLY deals with your keypad input and nothing else, no display, no temp, no nothing else. Get that to work so the variables will have the values for your display function to show.
Same with the temperature measuring function. Same with the power control function.
Tie them all together with the loop() function and you have a program is is 99% tested already.
Paul

1 Like

The processor should never wait for anything. Check the keypad 20 times a second. You won't miss any input and you can do lots of other things between checks. See the Several things at a time tutorial.

1 Like

Use more loops

for (I = 0; I < 10; I++) {

  double c1 = thermocouple1.readCelsius();
  double c2 = thermocouple2.readCelsius();

  if (isnan(c1)) {
    Serial.println("Something wrong with thermocouple 1!");
  } else {
    if (isnan(c2)) {
      Serial.println("Something wrong with thermocouple 2!");
    }
    delay(100);
  }
  Array1[I] = c1;
  Array2[I] = c2;
}

Avgc1 = 0;
Avgc2 = 0;

for (I = 0; I < 10; I++) {

  Avgc1 += Array1[I];
  Avgc2 += Array2[I];
}

Avgc1 /= 10.0;
Avgc2 /= 10o.;

Use less storage

Avgc1 = 0;
Avgc2 = 0;

for (I = 0; I < 10; I++) {

  double c1 = thermocouple1.readCelsius();
  double c2 = thermocouple2.readCelsius();

  if (isnan(c1)) {
    Serial.println("Something wrong with thermocouple 1!");
  } else {
    if (isnan(c2)) {
      Serial.println("Something wrong with thermocouple 2!");
    }
    delay(100);
  }
  
  Avgc1 +=  c1;
  Avgc2 +=  c2;
}

Avgc1 /= 10.0;
Avgc2 /= 10.0;

Read more code.

Use functions.

This temperature thing I'm compelled to tinker with while I wait for cocktail hour to officially begin could be a function. Use of functions to subordinate code that works reliably makes the main line code easier to read.

So the main line, loop() here in Arduino-land, will read more like an outline of your story than a run-on paragraph.

HTH

a7

1 Like

thank you for the super quick response.

I finally finished all the Hardware and im only onto the code now.

I for now settled on "only" controlling the temperature via 2 channel relay and having 2 temperature sensors. The Relay part works and I can control the upper and lower heater manually via my keypad.

But for the life of me I cannot get the 2 Thermocouples to output any useful Value. To simplify my experimentations, I am simply using the Adafruit example for my Thermocouple, which I extended to work with 2 thermocouples.
The Issue is, that both Thermocouples only output 0 as a Value.

Does anyone have a Clue why this does not Work? Could this be Hardware related; that the Arduino UNO doesnt have enough Power to run 2 Max31855k, 2 Channel Relay and a 1602 Keypad Shield?

/***************************************************
  This is an example for the Adafruit Thermocouple Sensor w/MAX31855K

  Designed specifically to work with the Adafruit Thermocouple Sensor
  ----> https://www.adafruit.com/products/269

  These displays use SPI to communicate, 3 pins are required to
  interface
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  BSD license, all text above must be included in any redistribution
 ****************************************************/

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

// Default connection is using software SPI, but comment and uncomment one of
// the two examples below to switch between software SPI and hardware SPI:

// Example creating a thermocouple instance with software SPI on any three
// digital IO pins.


#define DO   2
#define CSO 3
#define CSU A2
#define CLK A1
// initialize the Thermocouple
//(CLKU, CSU, DU)
Adafruit_MAX31855 thermocoupleO(CLK, CSO, DO);
Adafruit_MAX31855 thermocoupleU(CLK, CSU, DO);

// Example creating a thermocouple instance with hardware SPI
// on a given CS pin.
//#define MAXCS   10
//Adafruit_MAX31855 thermocouple(MAXCS);

// Example creating a thermocouple instance with hardware SPI
// on SPI1 using specified CS pin.
//#define MAXCS   10
//Adafruit_MAX31855 thermocouple(MAXCS, SPI1);

void setup() {
  Serial.begin(9600);

  while (!Serial) delay(1); // wait for Serial on Leonardo/Zero, etc

  Serial.println("MAX31855 test");
  // wait for MAX chip to stabilize
  delay(500);
  Serial.print("Initializing sensor...");
  if (!thermocoupleO.begin()) {
    Serial.println("ERROR.");
    while (1) delay(10);
  }
 
    if (!thermocoupleU.begin()) {
    Serial.println("ERROR.");
    while (1) delay(10);
  }
  Serial.println("DONE.");

}

void loop() {

   double co = thermocoupleO.readCelsius();
   if (isnan(co)) {
     Serial.println("Something wrong with thermocouple Oben!");
   } else {
     Serial.print("C O.= ");
     Serial.println(co);
   }
  
      double cu = thermocoupleU.readCelsius();
   if (isnan(cu)) {
     Serial.println("Something wrong with thermocouple Unten!");
   } else {
     Serial.print("C U.= ");
     Serial.println(cu);
   }


   delay(1000);
}

By the Way, I cleaned up my Code itself and changed some stuff, this is it right now. If anyone can give me some more Pointers I would be glad. I used a tool called "TcMenu" to build my Menu. Hence the getvalue/setvalue variables.
Essentially, I want to Set a "goal" temperature. Then in a sub Menu I want to be able to set a lower and upper tolerance for this goal temperature. I also added a "manual" mode so I can turn on/off the relay channels by hand (this is the only part which isnt dependend on the temperature Sensors, so it works).
Anyways, this is it:

#include "ArduinoTemp_menu.h"
#include <SPI.h>
#include "Adafruit_MAX31855.h"


// digital IO pins.
#define RelaisO A5
#define RelaisU A4
#define DO   2
#define CSO 3
#define CSU A2
#define CLK A1
int I = 0;
bool feineinstellungen;
int SollTemp;
int SollTempOben;
int SollTempUnten;
int TempToleranzUnten;
int TempToleranzOben;
int TempSel;
float Timer;
double co;
double cu;

const int numReadings = 10;
int readings1[numReadings];      // the readings from the analog input
int readIndex1 = 0;              // the index of the current reading
int total1 = 0;                  // the running total
int readings2[numReadings];      // the readings from the analog input
int readIndex2 = 0;              // the index of the current reading
int total2 = 0;                  // the running total
double averageo = 0;                // the average
double averageu = 0;                // the average

Adafruit_MAX31855 thermocoupleO(CLK, CSO, DO);
Adafruit_MAX31855 thermocoupleU(CLK, CSU, DO);

void setup() {
  Serial.begin(9600);

  while (!Serial) delay(1); // wait for Serial on Leonardo/Zero, etc

  Serial.println("MAX31855 test 1");
  // wait for MAX chip to stabilize
  delay(500);
  Serial.print("Initializing sensor...");
  if (!thermocoupleO.begin()) {
    Serial.println("ERROR. 1");
    while (1) delay(10);
  }
  Serial.println("DONE. 1");

  Serial.println("MAX31855 test 2");
  // wait for MAX chip to stabilize
  delay(500);
  Serial.print("Initializing sensor 2...");
  if (!thermocoupleU.begin()) {
    Serial.println("ERROR. 2");
    while (1) delay(10);
  }
  Serial.println("DONE. 2");


  //Relaissteuerung
  pinMode(RelaisO, OUTPUT);
  pinMode(RelaisU, OUTPUT);
  TempToleranzUnten = 5;
  TempToleranzOben = 3;
  menuFeineinstellungenTempTolUnten.setCurrentValue(TempToleranzUnten);
  menuFeineinstellungenTempTolOben.setCurrentValue(TempToleranzOben);
  Serial.println("Pizzamaster 3000 READY");

  setupMenu();
  menuSollTemp.setCurrentValue(20);

  for (int thisReading = 0; thisReading < numReadings; thisReading++) {
    readings1[thisReading] = 0;
    readings2[thisReading] = 0;
  }
  digitalWrite(RelaisO, HIGH);
  menuFeineinstellungenHeizOben.setCurrentValue(1);
  digitalWrite(RelaisU, HIGH);
  menuFeineinstellungenHeizUnten.setCurrentValue(1);
}

void loop() {

  taskManager.runLoop();
  temperaturereading();
  getSensorData();
  relaiscontrol();
}

//==================================================================================================

void getSensorData() {
  float SollTemp = menuSollTemp.getCurrentValue();
  //float TempToleranzUnten = menuFeineinstellungenTempTolUnten.getCurrentValue();
  //float TempToleranzOben = menuFeineinstellungenTempTolOben.getCurrentValue();
  //float SollTempUnten = menuFeineinstellungenTempUnten.getCurrentValue();
  //float SollTempOben = menuFeineinstellungenTempOben.getCurrentValue();
  menuIstTempU.setCurrentValue(averageu);
  menuIstTempO.setCurrentValue(averageo);
}

//==================================================================================================

void temperaturereading() {
  co = thermocoupleO.readCelsius();
  cu = thermocoupleU.readCelsius();

  // subtract the last reading:
  total1 = total1 - readings1[readIndex1];
  // read from the sensor:
  readings1[readIndex1] = co;
  // add the reading to the total:
  total1 = total1 + readings1[readIndex1];
  // advance to the next position in the array:
  readIndex1 = readIndex1 + 1;

  // if we're at the end of the array...
  if (readIndex1 >= numReadings) {
    // ...wrap around to the beginning:
    readIndex1 = 0;
  }

  // calculate the average:
  averageo = total1 / numReadings;




  // calculate the average:
  averageu = total2 / numReadings;

  // subtract the last reading:
  total2 = total2 - readings2[readIndex2];
  // read from the sensor:
  readings2[readIndex2] = cu;
  // add the reading to the total:
  total2 = total2 + readings2[readIndex2];
  // advance to the next position in the array:
  readIndex2 = readIndex2 + 1;

  // if we're at the end of the array...
  if (readIndex2 >= numReadings) {
    // ...wrap around to the beginning:
    readIndex2 = 0;
  }

  // calculate the average:
  averageu = total2 / numReadings;

  Serial.print("Temperatur Oben:");
  Serial.println(averageo);
  Serial.print("Temperatur Unten:");
  Serial.println(averageu);

}

//==================================================================================================

void relaiscontrol() {
  //Relaissteuerung
  if (menuFeineinstellungenFeinTemp.getCurrentValue() == 0) {
    if (averageo < (SollTemp - TempToleranzUnten)) {
      digitalWrite(RelaisO, LOW);
    }

    if (averageo > (SollTemp + TempToleranzOben)) {
      digitalWrite(RelaisO, HIGH);
    }

    if (averageu < (SollTemp - TempToleranzUnten)) {
      digitalWrite(RelaisU, LOW);
    }

    if (averageu > (SollTemp + TempToleranzOben)) {
      digitalWrite(RelaisU, HIGH);
    }
  }

  if (menuFeineinstellungenManuellHeizen.getCurrentValue() == 1 && menuFeineinstellungenHeizOben.getCurrentValue() == 0) {
    digitalWrite(RelaisO, HIGH);
  }
  if (menuFeineinstellungenManuellHeizen.getCurrentValue() == 1 && menuFeineinstellungenHeizUnten.getCurrentValue() == 0) {
    digitalWrite(RelaisU, HIGH);
  }
    if (menuFeineinstellungenManuellHeizen.getCurrentValue() == 1 && menuFeineinstellungenHeizOben.getCurrentValue() == 1) {
    digitalWrite(RelaisO, LOW);
  }
  if (menuFeineinstellungenManuellHeizen.getCurrentValue() == 1 && menuFeineinstellungenHeizUnten.getCurrentValue() == 1) {
    digitalWrite(RelaisU, LOW);
  }
  
/*
  if ((menuFeineinstellungenHeizOben.getCurrentValue() == 0) && (menuFeineinstellungenHeizUnten.getCurrentValue() == 0) && (averageo < (SollTempUnten - TempToleranzUnten))) {
    digitalWrite(RelaisO, HIGH);
  }
  if ((menuFeineinstellungenHeizOben.getCurrentValue() == 0 && menuFeineinstellungenHeizUnten.getCurrentValue() == 0 && averageo > (SollTempUnten + TempToleranzOben)) {
    digitalWrite(RelaisO, LOW);
  }
  if (menuFeineinstellungenHeizOben.getCurrentValue() == 0 && menuFeineinstellungenHeizUnten.getCurrentValue() == 0 && averageu < (SollTempOben - TempToleranzUnten)) {
    digitalWrite(RelaisU, HIGH);
  }
  if (menuFeineinstellungenHeizOben.getCurrentValue() == 0 && menuFeineinstellungenHeizUnten.getCurrentValue() == 0 && averageu > (SollTempOben + TempToleranzOben)) {
    digitalWrite(RelaisU, LOW);
  }
  */
}

//==================================================================================================

That's good.

Did you get that original example to prove that the thermos used only one at a time work properly? That is before you added to the code and hardware?

Can you try simply assigned a value like 42.0 to the second thermo, that is leave it in your test code but do not call it:

//replace

   double co = thermocoupleO.readCelsius();

//with 

   double co = 42.0;

Also, can you power your hardware other than through the UNO? It is not meant to be able to supply much power externally; it is best just to plan on not using it. A bit of hanging out will show that power problems pop up perennially in these parts.

a7

2 Likes

I was looking back to see what all you thermocouples consist in.

Do you have a spare pin to use for the second thermocouple's data line? It shouldn't be your problem, but it is an easy experiment.

Also, in the function temperaturereading, the only timethe values of co and cu change is when you actually read the thermocouples. Which you only do once, before all your calculations. Once you get the thermos reporting properly, you can fix that where you use co and cu like:

    readings1[readIndex1] = thermocoupleO.readCelsius();;

// and

    readings2[readIndex2] = thermocoupleU.readCelsius();

Those readings will be taking as rapidly as possible - are you convinced you need all that math?

a7

1 Like

Okay WOW thank you for the super quick response. I cannot answer everything right now but I will try to answer everything.

Did you get that original example to prove that the thermos used only one at a time work properly? That is before you added to the code and hardware?

Can you try simply assigned a value like 42.0 to the second thermo, that is leave it in your test code but do not call it:

I understand your Idea, I will try it out this weekend and update you.

Also, can you power your hardware other than through the UNO? It is not meant to be able to supply much power externally; it is best just to plan on not using it. A bit of hanging out will show that power problems pop up perennially in these parts.

True, I noticed flickering etc. with the Display when plugging in different devices. I just ordered a 5v transformer which I will plug into my breadboard. This will then simply power both the Arduino but also the Relay etc.

Do you have a spare pin to use for the second thermocouple's data line? It shouldn't be your problem, but it is an easy experiment.

In Total I have 5 spare pins for the two thermocouples. Considering that I definetely need 2x CS lines (Input Lines into the Arduino, so one from each thermocouple) and a CLK and DO Pin, I have one Pin unused. So I could also use an Individual CLK or DO for the two thermocouples. I have tried switching the Pins around though and it doesnt seem to be an issue.

Those readings will be taking as rapidly as possible - are you convinced you need all that math?

This is the Part where I am not sure. I simply want an averaged reading which uses some of the readings of the last second or two. Without an averaged reading I think the Accuracy is too low to properly control the Temperature.

If you have a better Idea to realise this I would be very glad :wink:

I think I roughly have this down now @klakma , although it's a work in progress so I won't show it yet.

But I think you/ I might have too many buttons. (I understand it's on a shield)

The way I have it set up currently is that you can set a target temperature for the top thermistor or the bottom thermistor, or both together.

So...

  • If you have the top therm selected, up/down will adjust the target temp for the top.
  • If you have the bottom therm selected, up/down will adjust the target temp for the bottom.
  • If you have the global temp selected, up/down will adjust the target temp for both the top and bottom.
  • The left button cycles through the selections and wraps to the start so: global/top/bottom... global/top/bottom etc.
  • The right bottom toggles on/off the servo.

I now don't have a use for the 'select' button. Are there any other functions you wish to have on this? Once it's all working a timer/alarm would be cool to add.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.