BBQ Temp Controller Build

  • I'm in the process of building a BBQ temp controller, and was trying to figure out the best way to remotely monitor/control it. After coming across this website a month or so ago, I'm now running OpenHAB on a RPi2 and have a couple temp sensors deployed around my house.

    This project is a little more involved, and I'm sure I'm going to run into roadblocks along the way. My goal is to have a sitemap in OpenHAB that will allow me to set and monitor my desired grill temp, which will control a small fan on my BBQ using a PID algorithm, as well as display the temps of the meat probes so I can know how things are going.

    I currently have the sitemap setup in OpenHAB, and have had the code working for the thermocouple temp probes that I will be using for the grill and meat temps. Today I will start trying to get the two to work together, based on the MySensors Serial API. I'll be using the NRF24L01+ radio modules for this. I'll post my code periodically, and hopefully will have some chime in on how to make it work or improve it.

  • Below is a very rough sketch of what I have so far. This is not working or tested even yet, but it does compile in Arduino IDE. I will breadboard the sensors I have in the next couple of days and get the basics working, then I will have to figure out how to send the temperatures over to my gateway. Next will be configuring for receiving commands from the gateway/controller to allow me to set my target temperature on the Arduino. Any recommendations are welcomed.

    This program is my attempt at creating a BBQ controller for my Big Green Egg using
    an arduino to monitor grill and meat temps as well as control a fan to
    regulate the grill temperature.
    Components used:
    - Arduino UNO
    - 10CFM Brushless DC Blower
    - Level Shifter
    - K-type Thermocouple
    - K-type Grill Probe
    - K-type Meat Probe
    Pin assignments:
    - Selftest
      - Fan 0-100-0
      - Check for Probes
    - Set Grill Temp
    - Setup Display
      - Grill Temp
      - Probe 1
      - Probe 2
      - Fan Status
      - Elapsed Time
    - Measure Temperature
      - Grill
      - Probe 1
      - Probe 2
    - Analyze Temperature
      - PID Contol
    - Control Fan
      - PWM Value
      - On/Off
    //-------------------------------- Classes ------------------------
    //-------------------------------- Includes -----------------------
    #include <MySensor.h>
    #include <OneWire.h>
    #include <DallasTemperature.h>
    #include <SPI.h>
    #include <PID_v1.h>
    //-------------------------------- Defines ------------------------
    #define oneWirePin 9
    #define TempPrecision 9
    #define MAX_ATTACHED_DS18B20 16
    OneWire oneWire(oneWirePin); //Setup oneWire instance to communiate with any oneWire devices
    DallasTemperature sensors(&oneWire); //Pass our oneWire referenceto Dallas Temperature.
    DeviceAddress Probe0, Probe1, Probe2, Probe3; //Define arrays to hold device addresses.
    MySensor gw;
    unsigned long SLEEP_TIME = 15000;
    float lastTemperature[MAX_ATTACHED_DS18B20];
    int numSensors = 3;
    boolean receivedConfig = false;
    boolean metric = true;
    MyMessage msg(0,V_TEMP);
    void sketchInfo () {
      gw.sendSketchInfo("Temperature Sensor","1.0");
    void setupProbes () {
      sensors.getAddress(Probe0, 0);
      sensors.getAddress(Probe1, 1);
      sensors.setResolution(Probe0, TempPrecision);
      sensors.setResolution(Probe1, TempPrecision);
    // Cycle fan from 0-100-0% power over 10 seconds.
    void selftestFan () {
    // Verify which probes are connected and report status for 10 seconds
    void selftestProbes () {
    void printTemperature(DeviceAddress deviceAddress)
      float tempC = sensors.getTempC(deviceAddress);
      //Display Temp in °C
      //Serial.print("Temp C: ");
      //Display Temp in °F
      Serial.print(" F ");
    void printData(DeviceAddress deviceAddress)
      //Serial.print("Device Address: ");
      //Serial.print(" ");
    void sendTemps () {
      for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
        float temperature = static_cast<float>(static_cast<int>((gw.getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) /10.;
    void setup() {
    void loop() {
      // put your main code here, to run repeatedly:

  • Cool project! Following.

  • Contest Winner

    I've been watching this one, but will watch this one evolve too.

    Waiting to see if they get a web app done.

  • @BulldogLowell
    That looks like an interesting project as well. This originally started very similar to that one, and I was planning on using a local LCD on it for the display. I quickly realized that the local LCD would not give me the "warm fuzzy" that checking this remotely would give me. When I started going towards a web interface design, I then realized that I really didn't need the local LCD at all.

    I'm not at all good with the programming piece, but I've gotten by so far. We'll see how this works out.

  • @Tango2 Check this link, it is something I built for my Big Green Egg BBQ.
    It looks like it could be my sensors material.
    Maybe this may help.

  • @5546dug That's an interesting build. I've come across several using a PID controller similar to that, however they have mostly been on electric smokers. My original intent was to do a PWM fan that could be speed controlled, but it was very hard (impossible) for me to find a blower type fan that was PWM-capable. My very initial testing showed that an on/off model would work as well but I haven't tried this on the Big Green Egg yet.

    My main concern is being able to feed a temp from my phone back to the arduino controlling this, and being reliable if for some reason wireless connectivity was lost from the arduino. I don't think this should be too hard, but will probably take some trial and error on my part.

Log in to reply





Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.