BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

My BBQ cooking monitor - ESP8266 dual K-probe via MAX31855 & OLED display


#61

“digital out” = “signal out” = “data out”
“clock” = clk/sck
“chip select” = unique identifier for each sensor

These are the three pins per sensor, first two are shared, CS determines the sensor…


#62

Get the sensor working first the add the oled…


#63

Yeah - I thought those photos would give the wrong idea.

I had originally put together a protoype with that had everything but not the k-probes and MAX boards. I have the Blynk UI close to being finished. I had it reading temporarily from two DHT sensors while I waited for the parts to arrive. I’ve since disconnected everything and added just the one MAX board.

Strange. I’ll give it another go tonight! I’m sure I had it nailed…

Thanks for responding :slight_smile:


#64

Brendan,

I am using a Quad Max31856…but it should be similar. I have two of the probes connected in my code, as well I am using a Adafruit Huzzah ESP8266 Feather with their with their motor shield to control a blower and also a servo to use for a damper. But here is how I connected my K-tc code together. You can look up the Huzzah to compare pinouts with the ESP8266 you are using.

#include <MAX31856.h>
#define SCK 14 //SPI setup for Huzzah ESP8266 Feather Chipset.
#define SDI 13
#define SDO 12

#define NUM_MAX31856 2 //Defines number of probes used in cooker.
//Chip selects for Quad MAX31856.
#define CS0 0 //Probe #1…Pit Probe.
#define CS1 2 //Probe #2…Food Probe #1.

**Remember I have four sensor and using two of them with two chip selects.

MAX31856 *TemperatureSensor[NUM_MAX31856] = {
new MAX31856(SDI, SDO, CS0, SCK),
new MAX31856(SDI, SDO, CS1, SCK),

***I have a routine to INIT the TC’s that runs from Setup()

 void Init_TCs() {
        ** Initializing the MAX31855's registers and Holding variables
          for (int i=0; i<NUM_MAX31856; i++) {
            TemperatureSensor[i]->writeRegister(REGISTER_CR0, CR0_INIT);
            TemperatureSensor[i]->writeRegister(REGISTER_CR1, CR1_INIT);
            TemperatureSensor[i]->writeRegister(REGISTER_MASK, MASK_INIT);
          }
        }

** Here is my routine to read the TC’s. Yours wont look like this, because I am taking 10 readings of the TC’s and running through a 10 slot FIFO and doing an average to filter out bumps. Also, I wrote a Lift Lid routine that turns off the PID, when the lid goes up.

void readTempSensors(){
	  for (int i=0; i<NUM_MAX31856; i++) {
	    Probe[i] = TemperatureSensor[i]->readThermocouple(FAHRENHEIT);
      if (Probe[i] == NO_MAX31856) continue;
      print_Temps(Probe[i],i);
      TempAvg[i].addValue(Probe[i]); 
      Probe_Avg[i] = TempAvg[i].getAverage();
      tempBelowTarget = pullTemp - Probe[1];
    }
    Serial.println("");
    Blynk.virtualWrite(V11, Probe_Avg[0]);
    Blynk.virtualWrite(V12, Probe_Avg[1]);
    
    if (startFood == 1) {
      Blynk.virtualWrite(V7, tempBelowTarget,"'F");
    } else {
      Blynk.virtualWrite(V7, "'F");
    }

    Fill_FIFO();  //Fill 10 position FIFO Table for Lid Open Detection
    Check_Lid_Open();  //See if the Lid has been opened and then go to manual
}

#65

Hi Dave,

I’m just curious to know if the Arduino code you posted originally, can be used with the 1.3" SH1106 OLED display that you use, or does it need modifying? I discovered I also have one of those larger screens in a box of stuff and I’d rather use it.

Cheers.

Jon.


#66

Hey mate, how’d you go? I’m using the 1.3 screen OK with a verrry similar project & code , but might have made some tweeks…

Lmk.


#67

hi can someone pls help me, I’ve uploaded the code and have it connected to WiFi however that’s all i get. the oled and temp probs work with other sketches, I’m using a wemos d1 mini. the serial monitor only displays

Cooking heat & food temp MONITOR
File name: C:\Users\the rest of the file name

Thanks


#68

Yeah you might need to check the libraries version currency and stuff like that… I won’t be able to check my one for a few days, so won’t be able to confirm the code is still good.


#69

i started from scratch and installed all libraries again but no change, If you could cheek when you have a chance that would be greatly appreciated. I cant wait to get this going.

Thanks


#70

Have you modified the code with your WiFi etc?


#71

Did you buy already the beef? :yum:


#72

yes i modified the code with my wifi details and blynk key… and yep i have brisket and ribs for the weekend


#73

Maybe you can post your code?


#74

the only part of the code i changed was

const char* ssid = “MY SSID”;
const char* password = “MY PASSWORD”;
char authBlynk[] = “MY BLYNK”;

otherwise it was a direct copy and paste
there wern’t to many options for the libraries i had to get from the net so i assume i have the right ones ie SimpleTimer.h, MAX31855.h, TimeLib.h, RunningMedian.h. but if somone was willing to upload there working libraries ill give that a shot


#75

Code is for local server only,

If you are not running local server - read the whole thread… Look for “blynk cloud”


#76

Can’t believe I missed that, I must have went through the code 50 times, anyways I changed it to work with the cloud and all is working. Turns out in my rush to make this I bought the max6675 not the one described, hopefully I can get it to work with these otherwise I’ll get the right one.
Thank you very much for your help


#77

super!

yes, the MAX type sensor libraries are very close… you should be able to work around any issues by substituting the proper library… i think the variable declarations are very similar…