Bake Mate - Pi Chef Blog #6 - Measuring Oven Temperature

 

Status Update:

I was busy last week with exams (hence the missing blog post), and couldn't spend much time on the project this week either. What remains is the code for recipe step screens, which I hope to work on sometime soon.

 

Testing the thermostat:

I got a chance to field test the thermocouple on Saturday. The back of the oven has an opening to allow for a little airflow (based on what I've read).

I passed the thermocouple cable through the hole and into the oven, and looped it around the temperature sensing element (for the gas thermostat) and placed it so that the tip of the wire is in the middle of the oven. This was easy to do because the wire is stiff, and once it is bent into position, stays put.

 

 

 

The rest of the setup remained more or less same: The MAX31856 was connected to the Raspberry Pi 3 via bitbanged SPI, and the Pi display HAT was connected to the hardware SPI. I powered the setup from a USB power bank.

 

 

 

 

The rest was simple: boot up the Raspberry Pi and run the sketch. The Pi 3 is connected to the WiFi network at home, so used SSH to start a VNC server and used a VNC viewer to access it from my computer. The VNC viewer uses IP:0 (port 0) to view an exact copy of what's being displayed on the 2.4" HAT (low resolution, but great for monitoring what's on the display), and starting additional instances of the VNC server creates independent desktops at a higher resolution (better for navigating and moving around files).

 

I didn't have much time to work on a nice UI, so I used the previous example script that prints the temperature to the Python console.

 

The oven was fired up, and the gas knob was set at Gas Mark 3 (which corresponds to approximately 165°C). After letting it heat up for a couple of minutes, I checked the temperature: it was only 142°C. I had long suspected that the oven's gas thermostat wasn't working correctly and required calibration, and this confirmed it.

 

I set the gas knob to Gas Mark 5, and sure enough, the temperature rose to around 165°C in a short while.

The oven heats up pretty quickly when the thermostat turns on the gas (which is accompanied by a hissing sound): around 1°C every two seconds.

 

After this, I opened the oven door to place something inside, and noticed that the temperature dropped almost immediately to 125°C. I let the oven heat up once again to around 160°C, and as soon as I opened the door, it dropped more than 30°C. What's interesting is that on the lowest setting (below Gas Mark 1), the oven 'idles' at approximately 130°C, which means that opening the door decreases the temperature to below the temperature at the lowest setting. So much for preheating the oven!

 

The tip of the thermostat is placed around midway vertically, but towards the back of the oven, which means that the temperature towards the front will be even lower when the door is opened.

 

With the cookies in the oven, the temperature was set to Gas Mark 3 (as the recipe suggested), but after looking at the temperature readout from the thermocouple, I increased it to Gas Mark 5 to compensate for the 20°C to 30°C error.

 

Watching the temperature was more interesting than I thought it would be: the oven heats up at roughly 1°C every 2 seconds when the gas on fully on, and cools at around 1°C every 15 to 20 seconds depending on the temperature (exponential curves!).

One thing to keep in mind is that since opening the door causes a drastic drop in temperature, every time the door is opened to check on whatever is baking, the losses are big. Assuming a baking temperature of 170°C, it's better to set the oven knob to the lowest position and let the oven cool naturally from 170°C to 130°C for a couple of minutes.

 

I was really interested in the rate of heating and cooling of the oven, so I went to my computer, did a quick search, opened VNC viewer, made a copy of the demo sketch and added a few lines of code to log the temperature to a CSV file every second. I restarted the script, and sure enough a CSV file was generated, and the file size increased every second, which meant that it was working.

 

I collected two sets of data (I've attached the CSV files if anybody is interested!):

  • From around 4PM to 5.30 PM, roughly 5600 data points 

  • From around 5.30 PM to 7.30PM, roughly 7000 data points

Things to note:

  • Oven temperature drops by a lot when the door is opened. I don't think that preheating the oven to any temperature above Gas Mark 1 make much of a difference.
  • Exponential heating and cooling curves!(Newton's law of cooling). Look at the end of the graphs: it takes nearly an hour for the oven to cool (with the door closed) from ~120°C to ~40°C.
  • The oven's inbuilt thermostat had significant error - probably from years of wear & tear. It would be interesting to attach a servo to the gas knob to build a closed loop temperature control system. Much easier (and safer) to do thi swith an electric oven + TRIAC/SSR. I plan on adding an alert system to let the user know when the temperature goes out of a certain set range.
  • Based on how long it takes to cool from the set temperature to 130°C (when the door is opened), I could make it generate an alert at a certain time to tell the user to turn down the temperature (to increase efficiency?). All I need to do is calculate the heating & cooling time constants (which can be done from these graphs), and plug the data into a simple formula.

 

Next on the list:

 

  • I really need to get down to completing the Python program within the next two weeks. Writing that code won't be a lot of fun, and other distractions won me over for the last couple of weeks. If I manage to complete that, I might have time to attempt a stretch goal!
  • The first stretch goal is to use the LED matrix on the Sense HAT as a visual indicator. I did some checking, and couldn't find anything on the actual I2C protocol format, however the Python library is open source. I might have to try using a logic analyzer to log data, but since the display HAT's touchscreen controller also used the same I2C bus, it will be complicated.