# MySensors BBQ Thermometer

## Contents

##### Date

16.10.2017##### Reading time

2 Minutes##### Comments

0 comments##### Tags

- arduino
- mysensors

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 equation^{1}.

$$ \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 calculators^{2} 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) |
---|---|

16738 | 70 |

11800 | 80 |

6300 | 100 |

I picked the cheapest thermometer on Amazon^{3}, which coincidentally was also available with two sensors and calculated those values:

Variable | Value |
---|---|

A | 0.2476197866e-3 |

B | 2.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.

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

## Comments