Pizza Oven Project

Hey Guys,

Now to start out, I have to say that I am an absolute beginner in such "hacking" projects.

My Goal is to modify my Pizza oven and have an Arduino control the Temperature of the Oven.

This is the type of Oven just so you can imagine what I am talking about.

It has a Heating element in the top and below the Stone. I want to set a Temperature goal for both and see when my top element has reached the wanted temperature. If possible , I want to put everything in the oven (theres technically enough room in the back, but im not sure about the heat), as a Safety Precaution I want to have a 3. Temperature Sensor directly on the Breadboard to measure the temperature near the Arduino and if it reaches a certain temperature it should turn off (not sure which threshold I will set for that). Last but not least I want to replace the Light between the two knows in the Picture so it lights up if the desired Temperature is reached (this is like a nifty extra, if this wont work hardware wise im fine with that).

Therefore I think I need a 2 Channel relay to control each Heating element. In addition I need 2 Temperature Sensors (one in the top, one in the bottom). To Set the Temperature I want to use a Potentiometer, to display the Temperatures I want to use a 7 Segment 3 Digit display.

So I already went and bought some stuff (thinking it doesnt really matter, because most parts are pretty cheap but ive bought quite alot now :frowning: )

  1. Arduino Uno (not 100% sure which version it is)
  2. Potentiometer
  3. 7 Segment Display (4 Digits)
  4. 7 Segment Display (3 Digits)
  5. Thermistor
  6. Thermistor as a Security Backup
  7. RGB LED to display Status
  8. Resistor to read Temperature from Thermistor
  9. Resistor to read Temperature from Thermistor
    With the Resistors I wasnt sure if I needed 1/4 or 1/2 so I just bought both (20ct total so its not too bad).

Now I already know the basic Idea of what I want to do:

  1. Get Analog Signal from Potentiometer (what Temperature I want to Set my Oven).
  2. Compare this Integer Value (WishTemperature) with the inidivual Integer Values of the Temperature Sensors (top and bottom).
  3. If the Sensor Value is lower than the Wish Temperature the Relay should open and turn on the individual heater element.

The Display should (normally) show the current temperature of the top Sensor (its in the Oven room) so I know how warm it is. If I move the Potentiometer the Display should show the WishTemperature Integer Value for a second or two (doesnt matter, just a Delay function).

Last but not least, the RGB should show (in the best case) 3 different States, Red if both Sensors Values are lower than the WishTemperature, Yellow if one Sensor reports the correct temperature, and green if both are within the Temperature.

To sum it up, I have Issues with getting Information from the Temperature Sensors and I have Issues displaying the Integers on the Display. The rest is fine.

First, my issues with the Temperature Sensors:

As soon as I started playing around with the ones I just bought, I found out that they arent Temperature Sensors, but much rather Thermistors (so they just change their resistance with Temperature Difference). To get a reading from them you need another Reference Resistor (considering the Thermistors I have are PT100, I went for 100 Ohm Resistors).

One of the Tutorials I followed is the following: Using a Thermistor | Thermistor | Adafruit Learning System

In combination with the table from this Website and the Sensor Data I had I adapted it accordingly:

// which analog pin to connect
#define THERMISTORPIN A0         
// resistance at 25 degrees C
#define THERMISTORNOMINAL 109.73      
// temp. for nominal resistance (almost always 25 C)
#define TEMPERATURENOMINAL 25   
// how many samples to take and average, more takes longer
// but is more 'smooth'
#define NUMSAMPLES 5
// The beta coefficient of the thermistor (usually 3000-4000)
#define BCOEFFICIENT 3850
// the value of the 'other' resistor
#define SERIESRESISTOR 100    

int samples[NUMSAMPLES];

void setup(void) {
  Serial.begin(9600);
  analogReference(EXTERNAL);
}

void loop(void) {
  uint8_t i;
  float average;

  // take N samples in a row, with a slight delay
  for (i=0; i< NUMSAMPLES; i++) {
   samples[i] = analogRead(THERMISTORPIN);
   delay(10);
  }
  
  // average all the samples out
  average = 0;
  for (i=0; i< NUMSAMPLES; i++) {
     average += samples[i];
  }
  average /= NUMSAMPLES;

  Serial.print("Average analog reading "); 
  Serial.println(average);
  
  // convert the value to resistance
  average = 1023 / average - 1;
  average = SERIESRESISTOR / average;
  Serial.print("Thermistor resistance "); 
  Serial.println(average);
  
  float steinhart;
  steinhart = average / THERMISTORNOMINAL;     // (R/Ro)
  steinhart = log(steinhart);                  // ln(R/Ro)
  steinhart /= BCOEFFICIENT;                   // 1/B * ln(R/Ro)
  steinhart += 1.0 / (TEMPERATURENOMINAL + 273.15); // + (1/To)
  steinhart = 1.0 / steinhart;                 // Invert
  steinhart -= 273.15;                         // convert absolute temp to C
  
  Serial.print("Temperature "); 
  Serial.print(steinhart);
  Serial.println(" *C");
  
  delay(1000);
}

But when I look at the Serial Port there is some issue with the reading of the Sensor:

Average analog reading 1023.00
Thermistor resistance inf
Temperature -273.15 *C

This message keeps repeating. Basically there must be some sort of issue with the Resistor. This both happens with the 1/4 and 1/2W version of the resistor.

Next my issue with the Display:

I am using the Tutorial from this Website: Arduino 4-Digit 7 Segment Display 74HC595 module - Ardumotive Arduino Greek Playground

If I adapt it accordingly (remove the 4. Digit and correct the Pins) this is the result:

#include <ShiftRegister74HC595.h>
// create shift register object (number of shift registers, data pin, clock pin, latch pin)
ShiftRegister74HC595 sr (3, 2, 3, 4); 
const int pot = A0;
int value,digit1,digit2,digit3,digit4; 
uint8_t  numberB[] = {B11000000, //0
                      B11111001, //1 
                      B10100100, //2
                      B10110000, //3 
                      B10011001, //4
                      B10010010, //5
                      B10000011, //6
                      B11111000, //7
                      B10000000, //8
                      B10011000 //9
                     };
                        
void setup() { 
  //blink();
  Serial.begin(9600);
}

void loop() {
  //Read from Analog1
  value=analogRead(pot)/2.038;
  //Split number to digits:
  digit3=(value / 10) % 10 ;
  digit2=(value / 100) % 10 ;
  digit1=(value / 1000) % 10 ;
  //Send them to 7 segment displays
  uint8_t numberToPrint[]= {numberB[digit3],numberB[digit2],numberB[digit1]};
  sr.setAll(numberToPrint); 
  //Reset them for next read
  digit1=0;
  digit2=0;
  digit3=0;
  Serial.print(pot); 
  
  delay(1000); // Read and print every 1 sec
}

//Blink
void blink(){
  for(int i = 0; i<2; i++){
    sr.setAllHigh(); // set all pins HIGH
    delay(1000);
    sr.setAllLow(); // set all pins LOW
    delay(1000);
  }
}

Now this script would directly display my Potentiometer readings (I would need more) but to start out this would work.

Now I am not sure why, but if I run the Script now the display shows random Values, if I go from 100% to 0% the values jump from 770 -> 220 -> 430 -> 0 -> 150 in a seemingly random fashion. Using the Serial Port, the only value which is displayed is 14 ?

Now I would be very glad if someone could help me out with either Issues, maybe you could point me in the right directions or tell me what I am doing wrong. Thank you guys so much

you provided a lengthy description of your pizza oven, but your code has a problem displaying values on 7-segment displays using shift registers.

someone familiar with the library you're using may be able to help if you correct the title of your thread to accurately describe the problem

Pizza might attract more attention than trouble with shift registers.

a7

gcjr:
you provided a lengthy description of your pizza oven, but your code has a problem displaying values on 7-segment displays using shift registers.

someone familiar with the library you're using may be able to help if you correct the title of your thread to accurately describe the problem

Sorry it was late last night, I actually have 2 different Issues which I didnt describe properly (I fixed it now). 1. is the Temperature Sensor reading. 2. Is Displaying the Integer value on the Display.

I didnt want to create 2 different threads so I thought its better to just create a single bigger topic, but I can split it up.

I would focus on each problem separately. How do you have your thermistor wired up? Can you provide a schematic - even a picture of a hand drawn one?

You normally have +5V connected to one side of your reference resistor, the other side connected to your thermistor and then then final side of the thermistor connected to ground. You would then connect A0 to the point between your reference resistor and thermistor. You should be getting readings around 512 at room temperature.

I also noticed your reference resistor is a 5% type which won't give you very accurate results unless you calibrate your system. Do you have an ohm meter to measure the resistance of your components?

A 100 Ohm thermistor is not going to give you very much temperature range.
Paul

blh64:
I would focus on each problem separately. How do you have your thermistor wired up? Can you provide a schematic - even a picture of a hand drawn one?

You normally have +5V connected to one side of your reference resistor, the other side connected to your thermistor and then then final side of the thermistor connected to ground. You would then connect A0 to the point between your reference resistor and thermistor. You should be getting readings around 512 at room temperature.

I also noticed your reference resistor is a 5% type which won't give you very accurate results unless you calibrate your system. Do you have an ohm meter to measure the resistance of your components?

This is the Setup on my breadboard. Blue Wire is 5v, Purple is GND, the white braided wire go to and from the Thermistor. The White Wire is connected to A0
I have a Multimeter which can be selected to different Ohm levels, the lowest is 200 Ohm. Not sure if thats enough. If not I would just buy a different resistor(can you recommend one?, Which resistance should I use?)

Paul_KD7HB:
A 100 Ohm thermistor is not going to give you very much temperature range.
Paul

I dont understand, is a higher resistance going to yield me a higher accuracy?
What would you recommend? blh64 said that the resistors have a high tolerance (5%) so I am thinking about switchting anyways

The wiring looks correct. What resistance do you measure from A0 to ground? From A0 to 5V? Both should be around 100 ohms.

As for the accuracy, having a 10K ohm thermistor and a 1% 10K divider resistance will help to reduce the magnitude of the errors in the system (wire resistance, ADC accuracy, etc.) as well as lower the total amount of current flowing through your thermistor which will warm it up slightly. All of this is detailed in the adafruit link you provided. Did you read the entire article?

klakma:
I dont understand, is a higher resistance going to yield me a higher accuracy?
What would you recommend? blh64 said that the resistors have a high tolerance (5%) so I am thinking about switchting anyways

Has nothing to do with accuracy. Has EVERYTHING to with range. If your thermistor changes 10% over your temperature range, what is 10% of 100 compared with 10% of 10,000?
Read the specs!!!
Paul

Hello,
Be careful what you do: Your oven should have an overtemperature protection and Arduino is not a legally accepted technology to implement such safeties; this needs to be done by a special overtemperature sensor/relay that is dedicated to the job and triggers a general shut-off (kind of emergency stop function).
Best Regards,
Johi.

blh64:
The wiring looks correct. What resistance do you measure from A0 to ground? From A0 to 5V? Both should be around 100 ohms.

As for the accuracy, having a 10K ohm thermistor and a 1% 10K divider resistance will help to reduce the magnitude of the errors in the system (wire resistance, ADC accuracy, etc.) as well as lower the total amount of current flowing through your thermistor which will warm it up slightly. All of this is detailed in the adafruit link you provided. Did you read the entire article?

Im sorry for not responding, was very busy the last days.
If I check A0 to GND or 5V both stay at 1 in my Multimeter, altough im not sure what you mean? simply check the connection between A0 and GND or 5V ? because thats what I did (I didnt include the Sensor etc).
The thing is though, A0 definetely works, if I connect the Potentiometer to A0 I get a proper reading etc which works perfectly.

If you are measuring 1 (?) does that mean infinite resistance, as in open circuit? You should be reading about 100 ohms since those are the values of the resistor and thermistor. Maybe your breadboard isn't making the connections? They are not super reliable.

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