Culture / Edge / IoT / Tools

Off-The-Shelf Hacker: Throw a Thermocouple on the Grill

18 May 2019 6:00am, by

The plan was to upgrade the old high-temperature thermocouple rig and then talk about integrating it with an on-screen analog gauge showing the readings. The gauge, written in Processing, looks steampunky and matches the aesthetics of the wearables and portable systems I build. It runs on a Pi or my Linux notebook.

Well, I got sidetracked testing the new and improved thermocouple module, a component to measure temperatures at 500º F and beyond. On a whim, I plugged the revised device into a USB port on my Raspberry Pi steampunk badge and schlepped the whole works out to my BBQ grill. The badge runs Raspbian Linux, has a 3.5-inch color touch screen and a 5-volt cell phone power pack. We were cooking hamburgers for Mother’s Day and I wanted to see if I could get a good sense of the actual cooking temperatures inside the Char-Griller grill.

Consequently, we’ll cover the on-screen analog gauge setup in the near future.

New and improved thermocouple-USB module with the Arduino Nano

Several interesting “real-world” observations from the thermocouple/grill building and testing sessions came up and I wanted to share them with readers.

First observation: My daughter’s boyfriend seemed dutifully impressed with my geekish inventor eccentricities. You made a couple of points humoring me, kid. Keep up the good work.

Building the Sensor Module

The new “high-temperature USB sensor module” uses a thermocouple, a universal amplifier, an Arduino Nano and a USB cable.

The original thermocouple project was a bit unwieldy. It had all the same parts except that a full-sized Arduino NG board served as the microcontroller, instead of today’s miniaturized Arduino Nano. Minimalization is a top evolutionary objective for my projects moving beyond the version 1.0 level. It is born out of necessity. I always have to haul around a bunch of gear for my tech-talk conference demos. Slashing weight, size and complexity reduces failures and is so much easier on the old back. Upgrading to “nano” part versions promotes a neat and compact mindset.

Close-up of the thermocouple — Arduino Nano USB module

Converting over to the Nano wasn’t hard. Since the 22-gauge solid core wires were already soldered directly to the amplifier board, it was a simple matter of cutting them off, one at a time and moving them over from the Arduino NG board. That way I didn’t have to look up the pin-outs again. Here’s the connections if you are building from scratch.

amplifier board Arduino Nano
VIN 5 V
3 Vo [not used]
GND GND
SCK D13
SDO D12
SDI D11
CS D10
FLT [not used]
DRDY [not used]

The wires are rigid enough to hold the amp board above or below the Nano. Soon, I’ll design a little steampunk themed case to protect the boards.

Measuring with the High-Temp Sensor Module

Using the module is straightforward. I plugged the USB connector into a port on the steampunk badge and ran a script to view the readings.

Getting data over USB on a Linux machine is sometimes a little quirky. Occasionally, you’ll plug in the cord and get a nice stream of numbers without fuss. Other times you’ll sit there wondering why nothing happens. For me, this usually means that the port settings are off. Running the “stty” command solves the problem.

On the conference badge, I just wrote a little script program to run stty before reading the values with the “cat” command.

I saved the code into a text file named hitemp.sh, made it executable and then copied it to the “Desktop” directory on the badge. Now I can just click the file, on the touchscreen, run it in a terminal and watch the temperature readings stream by.

Routing the data over USB makes it easy to also suck the values into an on-screen analog gauge Processing program, as we’ll discuss in another story.

Lessons from the Grill

With hardware prototypes, I always recommend testing in real-world circumstances. In other words, outside of the lab. Testing on a hot Sunday afternoon, with a BBQ grill seemed like a reasonable thing to do at the time. For an off-the-shelf hacker, anyway.

Gadgets strung together with tape, wires and glue, even at version 2.0 or 3.0, often point out potential sticky spots for future usability of the device. Each evolution solves AND generates new challenges that may need addressing.

For example, at one point the input pins on the thermocouple board touched one of the brass thumbscrews on the steampunk badge. An “out-of-range” message appeared on the readout. I noticed the message first then found that the pins were shorted. Moving the pins away from the thumbscrew returned the data to normal. How cool. The thermocouple board could actually tell you what’s wrong. Even better, the board didn’t blow. Similarly, when I inadvertently disconnected the thermocouple probe from the input pins, a “Thermocouple Open Fault” message appeared. I reconnected the leads and the values returned to a normal range.

We’ll have to look into incorporating module fault self-reporting features in new projects.

In a matter of seconds the readings went to 600, then 700, then 800 and kept going. I quickly opened the lid and pulled the probe out as the reading flew past 901!

Clearly, some heat shrink tubing will need to be added around the thermocouple input pins to strengthen and insulate the connection to the board. Maybe some kind of a standard socket for commercial “production” thermocouples should be considered, as well.

Another thing that happened is that I accidentally tested the high end of the thermocouple range. The mass of the end of the thermocouple is very small. It’s just two dissimilar wires welded together, after all.

Initially, the thermocouple end was placed on top of the warming grill and the lid gently closed. Right away the reading shot up to about 350 degrees F. The built-in mechanical grill gauge registered 275 degrees. Keep in mind it was mounted at the very top of the grill hood. The warming grill was about eight vertical inches above the charcoal. The grates were in between the warming grill and the coals, as well.

Next, let’s see what kind of fiery death a hamburger faces. We placed the probe end on top of the grate (grilling) surface and watched the data readout.

In a matter of seconds the readings went to 600, then 700, then 800 and kept going. I quickly opened the lid and pulled the probe out as the reading flew past 901! The K-type thermocouple is good up to 900 degrees F. Thankfully, nothing bad happened and the readings quickly returned to sane levels. The measurement was taken about 4 inches above the hot natural wood charcoal, on top of the grate.

Needless to say, I’ll need a higher temperature thermocouple. Here are some rated up to 1800 degrees C. That’s, 3270 degrees F! My grill probably doesn’t get that crispy, although it would be fun to see how far beyond 900 degree F, it actually goes.

Keep Cooking

Going off plan is a great way to discover new things. Today’s physical computing hardware modules are building blocks to bigger projects and applications. Take advantage of mixing and matching, whatever you have in your lab to find new applications and discover your own new things.

We are about to celebrate the 50th anniversary of humans landing on the Moon. That was a monumental project planning process, that even today, seems almost beyond comprehension to me. They did it by trying things, seeing what worked and then making adjustments to get to positive results.

Off-the-shelf hackers, at all levels, can do the same thing. The magic is in the doing and trying.

Catch Dr. Torq’s Off-The-Shelf Hacker column, each Saturday, only on The New Stack! Engage him directly or leave him a message for consulting, speaking appearances and commissioned projects at doc@drtorq.com or 407-718-3274.

A newsletter digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.