Audible Cooking Thermometer

Problem

I always find tracking the internal temperature of the things being cooked tedious . Sometimes I have to stop what I am doing to check on it, sometimes I have to look at it the whole time if the food can easily be overcooked. If I forget to check, there is a risk of overcooking and therefore bad texture and taste.

Solution

A device that actively tracks the internal temperature of the food and reminds the user when needed can solve this problem. The device is composed of a temperature sensor, a transducer speaker, and a screen. The temperature sensor of the device will be stuck into the middle of the meat or broth to measure the rate of rise in temperature.

The components of the device

If the rising rate is too large that might lead to overcooking, the device plays “Mi Re Do” to remind the user to turn down the gas. Text will be displayed on the screen if the user needs further information. In the same fashion, if the rising rate is too small, the device plays “Do Re Mi”. The user can stop the sound by pressing the device. In addition, specific instructions can be set for different foods. For the demo, an reminder to flip the fish for stir-frying salmon comes up when the temperature reaches a specific value. The device will play a melody when the food is cooked when the temperature reaches its ideal value. However, the device will only be successful if the algorithm of the cooking temperature for different foods is well developed.

Proof of Logic

Because I am not sure if the sensor can be used on real meat, and because it will take a longer time, I changed the rate of temperature rise in each cooking stage and did a demonstration with my hand instead. I stimulate the cooking process by holding the temperature sensor and raises its temperature from room temperature (about 23 Celcius) to 32 Celcius.

Overall setup of the prototype
Schematics
//libary
#include <OneWire.h>
#include <DallasTemperature.h>
#include "pitches.h"
#include <Wire.h>
#include <LiquidCrystal_I2C.h>


//definition
#define ONE_WIRE_BUS 5
#define SPEAKER 7
#define CONFIRM_BUTTON 2

//Attachment
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
LiquidCrystal_I2C screen(0x27, 16, 2);



//Global variable
float Celcius = 0;
float Fahrenheit = 0;
float room_temp = 0;
int start_time = 0;

const bool isInterrupt = true;
bool confirmbuttonState = false;
bool isDone = false;

static const float salmon_flip_over_temp = 28;  //This is the default temperature for flipping salmon
static const float done_temp = 32;  //This is the temperature when the salmon is "cooked".
bool flip = false;

float last_read = 0;
float current_read = 0;
float rise_over_time = 0;


//Varibles for the timer of recording data, record data every 2 seconds
unsigned long clock_data = 0; // variable for timing
const int INTERVAL1 = 2000; // milliseconds between updates

//Functions
void read_temperature() {
  sensors.requestTemperatures();
  Celcius = sensors.getTempCByIndex(0);
  Fahrenheit = sensors.toFahrenheit(Celcius);
  Serial.print(" C  ");
  Serial.print(Celcius);
  Serial.print(" F  ");
  Serial.println(Fahrenheit);
}

void ConfirmButtonPressed()
{
  if (digitalRead(CONFIRM_BUTTON) == LOW) {
   confirmbuttonState = true;
  }
}



void temp_rise(float rise_over_time, float lowerbound, float upperbound) {
  if (rise_over_time > upperbound) {
    screen.clear();
    screen.setCursor(3, 0);
    screen.print("Turn Down");
    while (confirmbuttonState == false) {
      tone(SPEAKER, NOTE_E4, 200);
      delay(350);
      tone(SPEAKER, NOTE_D4, 200);
      delay(350);
      tone(SPEAKER, NOTE_C4, 200);
      delay(1000);

    }

    confirmbuttonState = false;
    screen.clear();
  }

  if (rise_over_time < lowerbound) {
    screen.clear();
    screen.setCursor(4, 0);
    screen.print("Turn Up");
    while (confirmbuttonState == false) {
      tone(SPEAKER, NOTE_C4, 200);
      delay(350);
      tone(SPEAKER, NOTE_D4, 200);
      delay(350);
      tone(SPEAKER, NOTE_E4, 200);
      delay(1000);

    }

    confirmbuttonState = false;
    screen.clear();
  }
}

//The song to play when cooking is finished
void fly_me_to_the_moon() {
  tone(SPEAKER, NOTE_C5);
  delay(500);
  tone(SPEAKER, NOTE_B4);
  delay(500);
  tone(SPEAKER, NOTE_A4);
  delay(500);
  tone(SPEAKER, NOTE_G4);
  delay(250);
  tone(SPEAKER, NOTE_F4);
  delay(1000);
  tone(SPEAKER, NOTE_G4);
  delay(250);
  tone(SPEAKER, NOTE_A4);
  delay(500);
  tone(SPEAKER, NOTE_C5);
  delay(500);
  tone(SPEAKER, NOTE_B4);
  delay(500);
  tone(SPEAKER, NOTE_A4);
  delay(500);
  tone(SPEAKER, NOTE_G4);
  delay(500);
  tone(SPEAKER, NOTE_F4);
  delay(250);
  tone(SPEAKER, NOTE_E4);
  delay(1250);
  if (confirmbuttonState == true){
    return;
  }
  
  noTone(SPEAKER);
  delay(250);
  tone(SPEAKER, NOTE_A4);
  delay(250);
  tone(SPEAKER, NOTE_G4);
  delay(500);
  tone(SPEAKER, NOTE_F4);
  delay(500);
  tone(SPEAKER, NOTE_E4);
  delay(250);
  tone(SPEAKER, NOTE_D4);
  delay(1000);
  tone(SPEAKER, NOTE_E4);
  delay(250);
  tone(SPEAKER, NOTE_F4);
  delay(500);
  tone(SPEAKER, NOTE_A4);
  delay(250);
  tone(SPEAKER, NOTE_F4);
  delay(250);
  tone(SPEAKER, NOTE_GS4);
  delay(750);
  tone(SPEAKER, NOTE_F4);
  delay(500);
  tone(SPEAKER, NOTE_E4);
  delay(500);
  tone(SPEAKER, NOTE_D4);
  delay(250);
  tone(SPEAKER, NOTE_C4);
  delay(1750);


  noTone(SPEAKER);
  delay(1000);
}

//This function is called when the "salmon" option is selected
void stirfry_salmon() {
  //check the rate of temperature rise every 2 seconds
  if (millis() >=  clock_data) {
    sensors.requestTemperatures();
    Celcius = sensors.getTempCByIndex(0);
   

    current_read = Celcius;
    rise_over_time = (current_read - last_read) / 2;

    //Print information onto the lcd screen
    int minute = (millis() - start_time) / 60000;
    int second = (millis() - 60000 * minute) / 1000;

    //Serial.print(minute);
    //Serial.println(second);


    screen.setCursor(0, 0);
    screen.print("Salmon");
    screen.setCursor(0, 1);
    screen.print((String)"Temp:" + current_read + "C");
    screen.setCursor(7, 0);
    screen.print((String)"Time:" + minute + ":" + second);




    //Check whether it is time to flip the fish
    if (current_read >= salmon_flip_over_temp && flip == false) {
      screen.clear();
      screen.setCursor(6, 0);
      screen.print("Flip");
      screen.setCursor(7, 1);
      screen.print("it");
      while (confirmbuttonState == false) {
        tone(SPEAKER, NOTE_C5, 200);
        delay(350);
        tone(SPEAKER, NOTE_B4, 200);
        delay(350);
        tone(SPEAKER, NOTE_A4, 200);
        delay(350);
        tone(SPEAKER, NOTE_G4, 200);
        delay(350);
        tone(SPEAKER, NOTE_A4, 200);
        delay(350);
        tone(SPEAKER, NOTE_B4, 200);
        delay(350);
        tone(SPEAKER, NOTE_C5, 200);
        delay(1000);
      }

      confirmbuttonState = false;
      screen.clear();
      flip = true;
    }

    //Checked if the fish is already cooked
    if (current_read >= done_temp) {
      screen.clear();
      screen.setCursor(5, 0);
      screen.print("Cooked");
      while (confirmbuttonState == false) {
        fly_me_to_the_moon();
      }

      confirmbuttonState = false;
      screen.clear();
      isDone = true;
      return;
    }

    //Every cooking stage has a different "standard" rate of temperature rise
    //0-10s The first stage of cooking
    if (millis() - start_time <= 10000) {
      temp_rise(rise_over_time, 0.12, 0.7);
    }

    //10-16s The second stage of cooking
    if (millis() - start_time > 10000 && millis() - start_time <= 16000 ) {
      temp_rise(rise_over_time, 0.12, 0.19);
    }

    //16-24s The third stage of cooking
    if (millis() - start_time > 16000 && millis() - start_time <= 24000 ) {
      temp_rise(rise_over_time, 0.6, 0.9);
    }

    //>24s The fourth stage of cooking
    if (millis() - start_time > 10000 && millis() - start_time <= 16000 ) {
      temp_rise(rise_over_time, 0, 0.3);
    }



    last_read = current_read;
    clock_data = millis() + INTERVAL1 ;
    //Serial.print(Celcius);
    //Serial.print("     ");
    Serial.print(current_read);
    Serial.print("     ");
    Serial.println(rise_over_time);
  }
}

void setup()
{
  //Initialization
  Serial.begin(9600);
  sensors.begin();
  screen.init();
  screen.backlight();

  //Setting the pinMode
  pinMode(CONFIRM_BUTTON, INPUT_PULLUP);

  //Attach interrupt
  if (isInterrupt) {
    attachInterrupt (digitalPinToInterrupt(CONFIRM_BUTTON), ConfirmButtonPressed, FALLING);
  }


  //Record the room temperature
  sensors.requestTemperatures();
  Celcius = sensors.getTempCByIndex(0);
  room_temp = Celcius;
  last_read = room_temp;

  //test-field
  //tone(SPEAKER, NOTE_A4,200);
  //screen.setCursor(0, 1);
  //screen.print("2nd row text");
  start_time = millis();

 

}

void loop(void)
{
  if (isDone == false) {
  stirfry_salmon();
  }
  
}

 

Author: Zerui Huo

Hi I am a junior majoring in civil engineering. I would like to do a minor in physical computing. I like playing video games.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.