Our first Arduino Christmas Turkey

#“Our first Arduino Christmas Turkey”

Take one turkey, an oven with the temperature markings rubbed-off, a food thermometer with a broken probe and you have a recipe for either incineration or salmonella.

Enter an Arduino Uno, a K-Type thermocouple, a sample MAX31855 IC, some dodgy soldering from a few weeks ago, an Adafruit library and a Sparkfun LCD and you get this:

2013-12-25 12.43.45

All rustled up in 15 minutes.

Code and circuit to follow.

I haven’t bothered to average out the values so using a bit of human judgement on the instantaneous ones.

UPDATE: So the turkey ended up very dry. I’m not sure if the cooking time was excessive or the thermocouple was reading low. I wasn’t impressed with its accuracy at room temperature (+/- 2C at least) but I suspect it may have been 10C or more off at 180C. Hmm, just tried it on boiling water and it read 100-104 so perhaps I just cooked the turkey for far too long.

Also, if you want to try this, do yourself a favour and get the Adafruit MAX31855 breakout board. Soldering to the chip directly was a pain in the ass.

CODE (based on the Adafruit and Sparkfun sample code):

[sourcecode] /*************************************************** 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 "Adafruit_MAX31855.h" #include <SoftwareSerial.h> #include<stdlib.h>

int thermoCLK = 5; int thermoCS = 4; int thermoDO = 3;

// Initialize the Thermocouple Adafruit_MAX31855 thermocouple(thermoCLK, thermoCS, thermoDO); SoftwareSerial mySerial(6,2); // pin 2 = TX, pin 3 = RX (unused)

void setup() { mySerial.begin(9600); Serial.begin(9600); delay(500); mySerial.write(254); // move cursor to beginning of first line mySerial.write(128); mySerial.write(" "); // clear display mySerial.write(" "); mySerial.write("Hello, Thermocouple!");

// wait for MAX chip to stabilize delay(1000); }

char tempstring[16]; void loop() { // basic readout test, just print the current temp mySerial.write(254); // move cursor to beginning of first line mySerial.write(128); mySerial.write(" "); // clear display mySerial.write(" ");

double c = thermocouple.readCelsius(); if (isnan(c)) { mySerial.write("T/C Problem"); } else { mySerial.write("C = "); mySerial.write(dtostrf(c,4,1,tempstring)); Serial.println(c); mySerial.write(" "); }

delay(1000); } [/sourcecode]

Conor O'Neill

Tech guy who likes running slowly

Bandon, Cork, Ireland https://conoroneill.net