Smoking Meat with the Internet of Things

Background

In the height of summer, I was getting into using my old Weber Kettle Grill as a smoker to do some low and slow cooking. I already had a remote grill thermometer and was using that to monitor the internal food temperature while I did other things around the house. After a few failed cooking attempts, I came to realize how important monitoring the internal grill temperature was. My thermometer didn’t do that, and I was about to order one from Amazon, when I asked myself, how hard could this be to build? Even better, could I build something that could tell me it was done? Or when it needed attention?

Project Plan

At a high level, my plan was to use two temperature probes — reusing one I had, and another from Amazon — connected to an Arduino. The Arduino would calculate the temperature readings and then send them up to Parse.com where it would store and monitor the data. When the temperature hits a certain threshold, it would send a push notification to my devices. I’d also have an iOS app on the phone where I could check the current temperatures whenever I wanted.

Part List

Here is a list of all the parts I used to put together the circuit.

Circuit Design

The central component to this device is the Arduino UNO. The UNO is a programmable microprocessor that can take in a number of digital and analog inputs. Using the Arduino IDE, we can write C code to control those inputs to read in signals or send out digital signals. For our example, the probes we’re going to use are analog inputs and will be plugged into the analog input pins 0 and 1.

Connecting to Internet

There are a number of options for getting an Arduino talking to the internet. Even Arduino has a network enabled board called the YUN that has wifi/ethernet built into it. The YUN sounds awesome, but it’s also much more expense than the UNO. I wanted to keep this as low-cost as possible, so I searched for some other options. I read a bunch about the ESP8266 chip as a potential option. The ESP8266 is a programmable microcontroller with a wifi antenna built in. It even has it’s own GPIO pins and can be programmed via the Arduino IDE. But what makes this chip special is that it comes with a Serial->Wifi command set. Meaning I can send it commands from the Arduino using a serial interface to tell it to do things on the internet. You can read more about the AT commands here. The downside to using an ESP8266 is that it requires a bit of a more complicated setup as it requires 3.3v, whereas the Arduino usually powers 5v. Rather than mess around with voltage regulators, I found an option fromSparkFun, where they took an ESP8266 and placed it onto a stackable Arduino board with built in voltage regulation, all for 15 bucks. Perfect.

Connecting to Parse

Our circuit is now setup to send our temperature data somewhere. I’ve chosen to use Parse.com as it’s super simple to setup and free for our purposes. Parse provides cloud storage of the data with the ability to do push notifications and has API’s available to access the data from pretty much anywhere. Parse will store the data we’re sending, and we’ll configure it to send a push notification when our food is ready. In order to get our device talking to Parse, we’ll specifically use their REST API to POST the data to.

Reading the Data from Parse

Now that we have our data stored, let’s make a simple application to read that data. One of the benefits of using Parse is that they have information on connecting up a ton of different clients to it, whether you want to use JavaScript, Android, iOS, etc. For my example, I wanted to build an iOS app and tie in push notifications. It’s worth noting that in order to do push notifications with iOS you need to have a paid Apple developer account ($100) to generate an application and certificate that Parse requires for setup. We’ll talk more about notifications a bit further down.

Push Notifications

To finish this off, I wanted to be able to get a push notification when my food hit a certain temperature. Parse makes it pretty simple for you to enable push notifications for your application. You can just follow their tutorial to get things set up, but the general gist is that you have to use iTunes Connect to set up your application there and generate a certificate that will let Parse utilize the Apple push notification system.

Temperature Trigger

There are a few places in code that we could determine when a temperature hits a certain threshold, but the easiest place to put this logic is in a `beforeSave` trigger using the Parse cloud code. A trigger is a piece of code that runs at a specific points, in this case it’ll run before a record is saved.

Conclusion

The beauty of making something like this is that you can swap out different components and change things for improvement. This is by no means the best way to do everything. It’s just a digest of what I did to build it. With the basics in place, you could eventually build this system to be more robust by doing things like: adding additional notifications for temperature changes alerts, adding charts of temperatures over time, or being able to look at previous times you’ve cooked.

Senior Software Engineer at Invitae analyzing genomes during the day and building random apps at night, check them out at www.kevinkaz.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store