This post describes how I selected the components for the Sensor Hub. If you aren't familiar with my Cooker Connector project, check out my project overview here!
A Better Digital Thermometer
I got the idea for this project after I bought a digital probe thermometer to use with my smoker in the back yard. I did some online research and found the DOT by ThermoWorks, and I love it. It has a digital readout of the current temperature, it beeps when the temperature reaches a configurable alarm setting, and it comes with a probe that is designed to withstand high temperatures for a long time. It works well, but every few minutes I had to walk out the back door or go into the baby’s room to look at it through the window. Not exactly convenient. It was clear that I wanted an indoor or in-pocket display. ThermoWorks does make wireless thermometers, but they are expensive and don’t have the range I want. I had been considering what else would be helpful in a thermometer, like a graph of the temperature so I could see how fast the air temperature was rising or falling, a mobile alert, and a history of past cooks. I couldn’t find anything that would do all of these things, so I decided to build my own!
Thermistor Temperature Probes
I’m going to use the ThermoWorks Pro Series Thermistor Probes for my Cooker Connector. They are made specifically for high temperature ranges and for use inside a smoker, so they perfectly meet my criteria. They’re also inexpensive, accurate enough, and they are meant to be used with the DOT device, which I will use as my standard of truth for calibration. I need to be able to measure the internal temperature of the meat as well as the temperature of the air inside the smoker, so I bought one penetration probe and one air probe. My Sensor Hub will have multiple inputs and will be able to read from both at the same time.
Figure 1. My DOT thermometer, air probe, and penetration probe
Measuring Resistance with a Voltage Divider
A thermistor measures temperature by changing its electrical resistance in response to heat. To measure this resistance, I designed a simple voltage divider (Figure 2 below) that flows current through the thermistor and measures its voltage drop. In a later blog post, I’ll go over how to choose R2 to maximize resolution in the desired temperature range.
Figure 2. Voltage divider designed to measure the resistance of the thermistor
Analog-to-Digital Converter
The Sensor Hub will measure the voltage of V_ADC as an analog value, but the Raspberry Pi 3 only has digital inputs. Therefore, I’ll need to use an Analog-to-Digital Converter (ADC). I didn't know what kind to buy, so I'll walk you through the process I used to pick one. I like to buy almost all of my parts from DigiKey because they have an enormous catalog of every type of component you can imagine, they have good search and filter options, and you can read the spec sheets of everything before you buy it. Searching for ADC’s on their website, I see that they have over 15,000 options, so I’ll need to narrow down my search a bit.
To select an ADC, I need to consider my specific use case. It needs to talk to the Raspberry Pi using one of its supported serial protocols (SPI, I2C, and UART), and it needs to support the appropriate voltage level, 3.3V. Next, I need to determine how powerful of an ADC I’ll need for this application. I’m not reading a high-frequency signal: it’s just temperature data that will be changing maybe one degree per second, so I don’t need an expensive, fast ADC. I also need to consider the resolution of the ADC. The temperature range I’m measuring will be between 0 and 500 degrees Fahrenheit. Since ADC’s typically give integer values, this means that it will be rounding the voltage value to the nearest whole number. I could choose an 8-bit ADC, so that each temperature reading would fit in a single byte, but an unsigned 8-bit integer can only hold 256 distinct values. This means that in the best case, my Sensor Hub would have a resolution of less than 2 degrees Fahrenheit. This might seem like “good enough” resolution, but I can do better than that. Additionally, the resistance of a thermistor isn’t related to temperature with a linear function, so the distance between degrees won’t be evenly spaced on an integer scale. This will cause the resolution at the high and low ends of the range to be lesser than in the middle, so I’ll need to compensate for this as well. I decided to go with a 12-bit ADC, which will give me 4,096 possible integer values. In my next post, I’ll analyze the resolution over the full range. Lastly, I want to be able to measure the temperatures of multiple probes, so a multi-channel ADC is appropriate.
I landed on the MCP3204 from Microchip Technology. It’s a 12-bit, 4-channel multiplexed ADC that communicates using SPI and can operate at voltages between 2.7V and 5.5V. DigiKey has them for a little over $3 apiece.
Op-Amp Input Buffer
The MCP3204 documentation recommends buffering the input with an op-amp and a low-pass filter to reduce noise. To choose the op-amp, I again need to consider my use case. Since I’m using the Raspberry Pi’s power supply pins, I’ll need an op-amp that can operate with only a single, positive supply. It makes sense to choose an op-amp chip with 4 channels as well, since I have already chosen a 4-channel ADC. I ended up going with the LM324NE from TI, which DigiKey has for about $0.40 each.
Input Jack
The last special component I’ll need is a 2.5mm TS (Tip/Sleeve or "mono") mini headphone jack, which is what the ThermoWorks probes plug into. The least expensive part I could find on DigiKey was the MJ-2509N from CUI. It has an extra plug presence switch that I probably won’t use, but I got a handful of them for about $0.60 apiece.
That’s it for the special hardware for the Sensor Hub. I’ll also need some common components like resistors and capacitors, so I found some kits that contain a variety of sizes of each. I also picked up a few pre-assembled 2.5mm male connectors so that I can reverse engineer the DOT’s thermistor curve. More on that in my next post!
Top Comments