# MySensors BBQ Thermometer

Contents

Thinking about additional uses of the rather easy MySensors Framework I came across a less common but really tasty purpose: why not build a BBQ thermometer which sends it’s data to the MySensors Gateway which is then visualized in Grafana.

## Thermistors

The sensors of BBQ thermometers are usually NTC thermistors which means, that you can measure a resistant which decreases as the temperature rises. E.g. you might measure 100kΩ at 25°C and 6kΩ at 100°C. The common model to calculate the actual temperature with a given resistance is the Steinhart-Hart equation1.

$$\frac {1}{T}=A+B\ln(R)+C[ln(R)]^{3}$$

If you want to calculate the temperature in celsius and not kelvin, you need to subtract 273.15:

$$T = \frac{1}{A+B\ln(R)+C[ln(R)]^{3}} - 273.15$$

The three variables A, B and C depend on the used sensor and can be calculated with minor effort. There are several online calculators2 which require you to measure the temperature and resistance on three different levels (e.g. 70°, 80° and 100°). I used a waterproof DS18b20 on a spare Arduino.

Resistance (Ω)Temperature (°C)
1673870
1180080
6300100

I picked the cheapest thermometer on Amazon3, which coincidentally was also available with two sensors and calculated those values:

VariableValue
A0.2476197866e-3
B2.943226015e-4
C-2.129189836e-7

## MySensors Node

Now that we know, how to calculate the temperature from a given resistance, we can build a simple MySensors Node.

The required hardware for the MySensors Node is similar to normal nodes (Arduino & nRF24L01), except that you need an additional resistor. It’s value depends on the used thermistor and should be chosen to match roughly the thermistors resistance at a temperature, that’s in the middle of your required range.

My thermistor has a resistance of ~107kΩ at 25°C and ~6kΩ at 100°C and I want to measure temperatures in the range of 70°C to 140°C. So I picked a 10kΩ resistor which gives a good resolution in this range.

The used circuit is a voltage divider where R1 is the thermistor and R2 your resistor.

If you don’t want to implement the Sketch on your own, feel free to use my BBQ Thermometer sketch.