Page 1 of 2

K-Type / MAX6675 build in

Posted: 23 Sep 2016, 19:30
by rippchen
Hello,
can you buid in a K-Type Sensor Module like: http://www.14core.com/wiring-thermocoup ... e-nodemcu/
I want to use it for my Wood Oven.
Sorry about my English

Greetings from Germany and Thanks for the nice ESP Firmware

Re: K-Type / MAX6675 build in

Posted: 25 Sep 2016, 12:44
by moelski
Hi rippchen,

just ordered my Modul from ebay.
I think there should be first results at the end of next week. 8-)

And if it´s working I try to bring it to the GIT repo ...

Dominik

Re: K-Type / MAX6675 build in

Posted: 27 Sep 2016, 22:20
by moelski
Hi rippchen,

just finished the code for the MAX6675. It uses the hardware SPI feature of the ESP8266.
So you can´t use the ESP modules with limited GPIO like theESP-01.

As soon as I got a MAX 31855 I will implement the reading for that, too.

Attached are some pictures from my tests.

Regards
Dominik

Re: K-Type / MAX6675 build in

Posted: 27 Sep 2016, 23:04
by rippchen
Hi Dominik,
very fast build.

Roland

Re: K-Type / MAX6675 build in

Posted: 28 Sep 2016, 21:08
by moelski
Hi @all,

the new Plugin is available on Github Plugin Playground:
https://github.com/ESP8266nu/ESPEasyPlu ... couple.ino

Using the MAX6675 works for me.
Using the MAX31855 is experimental 8-) I don´t have such a board at the moment.
So it´s only implemented on the datasheet facts - hope that works :-)

Would be nice if anyone can verify the plugin.
Suggestions are welcome :-)

Dominik

Re: K-Type / MAX6675 build in

Posted: 29 Sep 2016, 20:09
by moelski
Hi @all,

just want to let you know that the first long time test (3,5 hours) was successful.
I monitored my oven temperature while making some rips :D

I used a Thermocouple with a MAX6675.

But see the pictures ;)

Dominik

Re: K-Type / MAX6675 build in

Posted: 30 Sep 2016, 11:14
by tozett
slow cooking?
thanks for the images, getting hungry ...
! :D

Re: K-Type / MAX6675 build in

Posted: 30 Sep 2016, 13:03
by Drum
Very nice, I see a new way to monitor my smoker and grill... Also what looks like an inexpensive way to fit more ribs in my smoker... ;)

Thanks!

Re: K-Type / MAX6675 build in

Posted: 30 Sep 2016, 13:18
by moelski
Hi Drum,
I see a new way to monitor my smoker and grill
Well the plugin was inspired by rippchen and he want´s to do the same :D

by the way ... The temperature was very precise. My oven was at 115 and the readings swing around this value (given by heating / cooling phases).
Also what looks like an inexpensive way to fit more ribs in my smoker
Look for the "VARIERA" at Ikea 8-)

Re: K-Type / MAX6675 build in

Posted: 30 Sep 2016, 14:40
by Drum
Look for the "VARIERA" at Ikea
I thought I saw something like that at Ikea. I will add it to my wife's list, Ikea is right next to the airport and she is traveling next week.

Timing is everything... :D

Re: K-Type / MAX6675 build in

Posted: 02 Oct 2016, 20:15
by r_255
How sweet is that..... now i can ditch the maveric !
gonna order one and give it a test run! thanks for the plugin


Input :
How about adding a fan controller + pid and make it a full bqq controller :lol:
Great for those long low and slow sessions.

Just like this....
http://heatermeter.myshopify.com/

happy esp easy bbq'ing

Re: K-Type / MAX6675 build in

Posted: 03 Oct 2016, 07:32
by moelski
Hi @all,

I´ver just uploaded an updated version of the Plugin with these changes:
  1. Added Max31855 calculation for negative values
  2. Added some Links and Information for ChipSelect (CS)
https://github.com/ESP8266nu/ESPEasyPlu ... couple.ino
How about adding a fan controller + pid and make it a full bqq controller
For sure that would be possible. My biggest problem is the missing smoker for testing (I only have a gas grill). :D

So give me an idea how to test it without a smoker and I will give it a try ;)

Re: K-Type / MAX6675 build in

Posted: 04 Oct 2016, 09:04
by r_255
Well i guess that might be a issue that can't be solved with software ;o)

I am thinking of creative solutions here, but so far i am not coming further than buying you a 'decent' bbq.
I am not sure if there are others that are willing to contribute?

Sure it would be cheaper to buy something already made, but to me it would be a good addition to the already great espeasy library.

:D
Yes i am smiling... but not kidding !

Re: K-Type / MAX6675 build in

Posted: 28 Oct 2016, 11:30
by frank
this is great. But for a noob like me how do you put the plug in in the software? (i found out already :oops: )

I am building an controller based on this for my BBQ. I have orderd the max6675.

Re: K-Type / MAX6675 build in

Posted: 02 Nov 2016, 16:32
by Drum
Hi Dominik,
MAX6675 just arrived this morning, Plugin seems to work perfect. Coexists with the BME280, OLED and PWM with no poblem.
Well under .5C difference between BME280 and MAX6675. Thanks for the connection info in the file!

You could use something like this if you can get the gas grill really low or even off completely they say.. https://www.amazon.de/Jaeger-Sparbrand- ... 08QKT3S54M

They also have some nice smokers, I have to get a new one too, after 8 years my $40 weber is rusting through on the bottom. Lasted a lot longer than the really expensive Outdoor Chef gas grill, but the weber doesn't have black granite.

By the way the "Ikea Rib Rack" works great in the smoker too... Smoked bacon, sausage and ribs last weekend.

Re: K-Type / MAX6675 build in

Posted: 03 Nov 2016, 13:59
by Drum
Disconnect the MAX and see what happens when it re-boots... I am in a continual boot loop,. no idea what the problem is, even went back to V120 but connects to wifi, INIT i2c INIT Pulse 10 and reboot. Tx-Rx trick is not working either.

Re: K-Type / MAX6675 build in

Posted: 07 Nov 2016, 16:31
by Drum
I was able to get it back by putting R143 built for NodeMCU on it. No idea why it worked, R143 for Huzzah had the same problem....

No idea what the difference is between the two boards

Re: K-Type / MAX6675 build in

Posted: 30 Nov 2016, 23:39
by BertB
@Dominik.
Hi, I have a WeMos D1 with ESPEasy 147 and only your SPI plugin and a MAX31855.
I followed your pinconfig as described in your plugin. Nevertheless, I only get NAN.
When I look with a logic analyser, I only see one or two clockpules coming from the D5 port.
Do I have to make other settings, except checking Init SPI in Hardware?

Re: K-Type / MAX6675 build in

Posted: 04 Dec 2016, 16:29
by BertB
It seems that some Chinese suppliers deliver the MAX31855 board with T- connected to ground.
I could not undo this, zo I reworked the code a bit.
For the MAX31855 it also shows the cold junction temperature.

Re: K-Type / MAX6675 build in

Posted: 13 Dec 2016, 20:49
by frank
the MAX6675 arrived from hong kong. But it isn't working. How do i connect it to an esp8266 12e devkit the cs is at gpio 15

Re: K-Type / MAX6675 build in

Posted: 20 Dec 2016, 15:35
by frank
frank wrote:the MAX6675 arrived from hong kong. But it isn't working. How do i connect it to an esp8266 12e devkit the cs is at gpio 15
I had some time and have got it working. It works great. Now i am going to try mutiple TK on the esp.

It works with 2 TK :D :D

Re: K-Type / MAX6675 build in

Posted: 24 Dec 2016, 20:11
by arista
I got this working pretty easily so Huge Thanks for You!

Steps to reproduce (you have to compile Esp Easy firmware by yourself, but do not be afraid if you are familiar to Arduino):

1) Follow these steps: http://www.letscontrolit.com/wiki/index ... are_Upload
- I use Mac so I copied the libs as advised in this doc: https://www.arduino.cc/en/Guide/Libraries#toc5
2) Copy https://raw.githubusercontent.com/ESP82 ... couple.ino to your ESPEasy directory, mine is: ~/Downloads/ESPEasy_R147_RC8/Source/ESPEasy
3) Open ~/Downloads/ESPEasy_R147_RC8/Source/ESPEasy/ESPEasy.ino in Arduino 1.8.0 IDE and compile/upload it into ESP8266

Works as expected. (Even better than I expected, I couldn't believe it would work out of the box!)

Re: K-Type / MAX6675 build in

Posted: 29 Dec 2016, 06:03
by moelski
@bertb:
zo I reworked the code a bit.
Did you put update the github code?

Code: Select all

Works as expected. (Even better than I expected, I couldn't believe it would work out of the box!)
8-)

Re: K-Type / MAX6675 build in

Posted: 29 Dec 2016, 21:00
by BertB
moelski wrote:@bertb:
zo I reworked the code a bit.
Did you put update the github code?

No, I do not know how to. Besides, it's far from decent. I only changed the MAX31855 part.
Per haps one of the real programmers can take it to the next level.
As long as you do not have a MAX31855 with the K- connected to ground, as I do, you will not need to ignore errors.
I also took out the SPI init lines as this is already done by ESPEasy and I show the cold junction temperature.

It works very good for me.

Here is my stuff:

Code: Select all

//#######################################################################################################
//######################## Plugin 120: Thermocouple (MAX6675 / MAX31855) ################################
//#######################################################################################################

// Plugin Description
// This Plugin reads the data from Thermocouples. You have to use an Adapter Board with a
// MAX6675 or MAX31855 in order to read the values. Take a look at ebay to find such boards :-)
// You can only use ESP8266 boards which expose the SPI Interface. This Plugin uses only the Hardware
// SPI Interface - no software SPI at the moment.
// But neverless you need at least 3 Pins to use SPI. So using an very simple ESP-01 is no option - Sorry.
// The Wiring ist straight forward ...
//
// If you like to send suggestions feel free to send me an email : dominik@logview.info
// Have fun ... Dominik

// Wiring
// https://de.wikipedia.org/wiki/Serial_Peripheral_Interface
// You need an ESP8266 device with accessable SPI Pins. These are:
// Name   Description     GPIO      NodeMCU   Notes
// MOSI   Master Output   GPIO13    D7        Not used (No Data sending to MAX)
// MISO   Master Input    GPIO12    D6        Hardware SPI
// SCK    Clock Output    GPIO14    D5        Hardware SPI
// CS     Chip Select     GPIO15    D8        Hardware SPI (CS is configurable through the web interface)

// Thermocouple Infos
// http://www.bristolwatch.com/ele2/therc.htm

// Chips
// MAX6675  - Cold-Junction-Compensated K-Thermocouple-to-Digital Converter (   0°C to +1024°C)
//            https://cdn-shop.adafruit.com/datasheets/MAX6675.pdf (only
// MAX31855 - Cold-Junction Compensated Thermocouple-to-Digital Converter   (-270°C to +1800°C)
//            https://cdn-shop.adafruit.com/datasheets/MAX31855.pdf

//#include <SPI.h>

#define PLUGIN_120
#define PLUGIN_ID_120         120
#define PLUGIN_NAME_120       "Temperature Thermocouple"
#define PLUGIN_VALUENAME1_120 "Temperature C"
#define PLUGIN_VALUENAME2_120 "Temperature K"

uint8_t Plugin_120_SPI_CS_Pin = 15;  // D8
uint16_t Plugin_120_SensorError;
double Plugin_120_HJ_Temp = 0.0;
double Plugin_120_CJ_Temp = 0.0;
uint16_t Plugin_120_IgnoreError;

boolean Plugin_120(byte function, struct EventStruct *event, String& string)
{
  boolean success = false;

  switch (function)
  {
    case PLUGIN_DEVICE_ADD:
      {
        Device[++deviceCount].Number = PLUGIN_ID_120;
        Device[deviceCount].Type = DEVICE_TYPE_SINGLE;
        Device[deviceCount].VType = SENSOR_TYPE_DUAL;                           // 2 Messwerte
        Device[deviceCount].Ports = 0;
        Device[deviceCount].PullUpOption = false;
        Device[deviceCount].InverseLogicOption = false;
        Device[deviceCount].FormulaOption = true;
        Device[deviceCount].ValueCount = 2;
        Device[deviceCount].SendDataOption = true;
        Device[deviceCount].TimerOption = true;
        Device[deviceCount].GlobalSyncOption = true;
        break;
      }

    case PLUGIN_GET_DEVICENAME:
      {
        string = F(PLUGIN_NAME_120);
        break;
      }

    case PLUGIN_GET_DEVICEVALUENAMES:
      {
        strcpy_P(ExtraTaskSettings.TaskDeviceValueNames[0], PSTR(PLUGIN_VALUENAME1_120));
        strcpy_P(ExtraTaskSettings.TaskDeviceValueNames[1], PSTR(PLUGIN_VALUENAME2_120));
        break;
      }

    case PLUGIN_INIT:
      {
        // Get CS Pin
        // If no Pin is in Config we use 15 as default -> Hardware Chip Select on ESP8266
        if (Settings.TaskDevicePin1[event->TaskIndex] != 0)
        {
          // Konvert the GPIO Pin to a Dogotal Puin Number first ...
          Plugin_120_SPI_CS_Pin = Settings.TaskDevicePin1[event->TaskIndex];
        }

        // set the slaveSelectPin as an output:
        pinMode(Plugin_120_SPI_CS_Pin, OUTPUT);
        // initialize SPI:
//        SPI.setHwCs(false);
//        SPI.begin();

        addLog(LOG_LEVEL_INFO, (char*)"P120 : SPI Init");

        success = true;
        break;
      }

    case PLUGIN_WEBFORM_LOAD:
      {
        string += F("<TR><TD>Info GPIO:<TD><b>1st GPIO</b> = CS (Usable GPIOs : 0, 2, 4, 5, 15)");

        byte choice1 = Settings.TaskDevicePluginConfig[event->TaskIndex][0];
        String options[2];
        options[0] = F("MAX 6675");
        options[1] = F("MAX 31855");
        //options[2] = F("MAX 31865");
        int optionValues[2];
        optionValues[0] = 1;
        optionValues[1] = 2;
        //optionValues[2] = 3;
        string += F("<TR><TD>Adapter IC:<TD><select name='plugin_120_maxtype'>");
        for (byte x = 0; x < 2; x++)
        {
          string += F("<option value='");
          string += optionValues[x];
          string += "'";
          if (choice1 == optionValues[x])
            string += F(" selected");
          string += ">";
          string += options[x];
          string += F("</option>");
        }
        string += F("</select>");

        byte choice2 = Settings.TaskDevicePluginConfig[event->TaskIndex][1];
        String options2[4];
        options2[0] = F("None");
        options2[1] = F("All");
        options2[2] = F("SCV");
        options2[3] = F("SCG");
        int optionValues2[4];
        optionValues2[0] = 0;
        optionValues2[1] = 7;
        optionValues2[2] = 4;
        optionValues2[3] = 2;
        string += F("<TR><TD>Ignore error:<TD><select name='plugin_120_error'>");
        for (byte x = 0; x < 4; x++)
        {
          string += F("<option value='");
          string += optionValues2[x];
          string += "'";
          if (choice2 == optionValues2[x])
            string += F(" selected");
          string += ">";
          string += options2[x];
          string += F("</option>");
        }
        string += F("</select>");

        byte choice3 = Settings.TaskDevicePluginConfig[event->TaskIndex][2];
        String options3[2];
        options3[0] = F("Celsius");
        options3[1] = F("Fahrenheit");
        int optionValues3[2];
        optionValues3[0] = 1;
        optionValues3[1] = 2;
        string += F("<TR><TD>C/F:<TD><select name='plugin_120_cf'>");
        for (byte x = 0; x < 2; x++)
        {
          string += F("<option value='");
          string += optionValues3[x];
          string += "'";
          if (choice3 == optionValues3[x])
            string += F(" selected");
          string += ">";
          string += options3[x];
          string += F("</option>");
        }
        string += F("</select>");

        success = true;
        break;
      }

    case PLUGIN_WEBFORM_SAVE:
      {
        String plugin1 = WebServer.arg("plugin_120_maxtype");
        Settings.TaskDevicePluginConfig[event->TaskIndex][0] = plugin1.toInt();
        String plugin2 = WebServer.arg("plugin_120_error");
        Settings.TaskDevicePluginConfig[event->TaskIndex][1] = plugin2.toInt();
        String plugin3 = WebServer.arg("plugin_120_cf");
        Settings.TaskDevicePluginConfig[event->TaskIndex][2] = plugin3.toInt();
        success = true;
        break;
      }

    case PLUGIN_READ:
      {
        // Get the MAX Type (6675 / 31855)
        // TBD ... Auswertung je nach Chip !!!
        byte MaxType = Settings.TaskDevicePluginConfig[event->TaskIndex][0];
        Plugin_120_IgnoreError = Settings.TaskDevicePluginConfig[event->TaskIndex][1];
        byte viewcf = Settings.TaskDevicePluginConfig[event->TaskIndex][2];

        // Get CS Pin
        // Konvert the GPIO Pin to a Dogotal Puin Number first ...
        Plugin_120_SPI_CS_Pin = Settings.TaskDevicePin1[event->TaskIndex];

        switch (MaxType) {
          case 1:       // MAX6675
            Plugin_120_HJ_Temp = readMax6675();
            break;
          case 2:       // MAX31855
            Plugin_120_HJ_Temp = readMax31855();
            break;
          case 3:       // MAX31865 (not implemented yet)
            //do something when var equals 2
            break;
        }

        if (Plugin_120_HJ_Temp != NAN)
        {
          if (viewcf == 1)
          {
            UserVar[event->BaseVarIndex] = Plugin_120_HJ_Temp;
            UserVar[event->BaseVarIndex + 1] = Plugin_120_CJ_Temp;
          }
          else
          {
            UserVar[event->BaseVarIndex] = CelsiusToFahrenheit(Plugin_120_HJ_Temp);
            UserVar[event->BaseVarIndex + 1] = CelsiusToFahrenheit(Plugin_120_CJ_Temp);
          }
          String log = F("P120 : HJ : ");
          log += UserVar[event->BaseVarIndex];
          log += F(" - CJ : ");
          log += UserVar[event->BaseVarIndex + 1];
          addLog(LOG_LEVEL_INFO, log);
          success = true;
        }
        else
        {
          UserVar[event->BaseVarIndex] = NAN;
          UserVar[event->BaseVarIndex + 1] = NAN;
          String log = F("P120 : No Sensor attached !");
          addLog(LOG_LEVEL_INFO, log);
          success = false;
        }

        break;
      }
  }
  return success;
}

double readMax6675()
{
  uint16_t rawvalue = 0;
  // take the SS pin low to select the chip:
  digitalWrite(Plugin_120_SPI_CS_Pin, LOW);
  // String log = F("P120 : CS Pin : ");
  // log += Plugin_120_SPI_CS_Pin;
  // addLog(LOG_LEVEL_INFO, log);
  // "transfer" 0x0 and read the Data from the Chip
  rawvalue = SPI.transfer16(0x0);
  // take the SS pin high to de-select the chip:
  digitalWrite(Plugin_120_SPI_CS_Pin, HIGH);

  String log = F("P120 : MAX6675 : RAW - BIN:");
  log += String(rawvalue, BIN);
  log += " HEX:";
  log += String(rawvalue, HEX);
  log += " DEC:";
  log += String(rawvalue);
  addLog(LOG_LEVEL_DEBUG, log);

  // Open Thermocouple
  // Bit D2 is normally low and goes high if the thermocouple input is open. In order to allow the operation of the
  // open  thermocouple  detector,  T-  must  be  grounded. Make  the  ground  connection  as  close  to  the  GND  pin
  // as possible.
  Plugin_120_SensorError = !(rawvalue & 0x0004);

  if (Plugin_120_SensorError)
  {
    // Shift RAW value 3 Bits to the right to get the data
    rawvalue >>= 3;

    // Calculate Celsius
    return rawvalue * 0.25;
  }
  else
  {
    return NAN;
  }
}

double readMax31855()
{
  uint16_t hrawvalue = 0;
  uint16_t crawvalue = 0;
  // take the SS pin low to select the chip:
  digitalWrite(Plugin_120_SPI_CS_Pin, LOW);
  // "transfer" 0x0 and read the MSB Data from the Chip
  hrawvalue = SPI.transfer16(0x0);
  // Shift MSB 16 Bits to the left
//  rawvalue <<= 16;
  // "transfer" 0x0 and read the LSB Data from the Chip
  crawvalue = SPI.transfer16(0x0);
  // take the SS pin high to de-select the chip:
  digitalWrite(Plugin_120_SPI_CS_Pin, HIGH);

  // D0,1,2 - This bits read at 1 when any of the SCV, SCG, or OC faults are active. Default value is 0.
  Plugin_120_SensorError = (crawvalue && 0x0007);
  hrawvalue >>= 2;
  crawvalue >>= 4;


  String log = F("P120 : MAX31855 : hRAW - BIN:");
  log += String(hrawvalue, BIN);
  log += " HEX:";
  log += String(hrawvalue, HEX);
  log += " DEC:";
  log += String(hrawvalue);
  log += F(" : cRAW - BIN:");
  log += String(crawvalue, BIN);
  log += " HEX:";
  log += String(crawvalue, HEX);
  log += " DEC:";
  log += String(crawvalue);

  addLog(LOG_LEVEL_DEBUG, log);

  
  if (Plugin_120_IgnoreError==7 | Plugin_120_SensorError==Plugin_120_IgnoreError)
  {
    // Data is D[31:18]
    // Shift RAW value 18 Bits to the right to get the data

    // Check for negative Values
    //  +25.00    0000 0001 1001 00 
    //    0.00    0000 0000 0000 00
    //   -0.25    1111 1111 1111 11
    //   -1.00    1111 1111 1111 00
    // -250.00    1111 0000 0110 00
    if (hrawvalue & 0x2000) // Bit 31=1 -> neg Values
    {
      // Negate all Bits
      hrawvalue = ~hrawvalue; 
      // Add 1 and make negative 
      hrawvalue = (hrawvalue + 1) * -1;
    }

    if (crawvalue & 0x800) // Bit 31=1 -> neg Values
      {
        // Negate all Bits
        crawvalue = ~crawvalue; 
        // Add 1 and make negative 
        crawvalue = (crawvalue + 1) * -1;
      }

    // Calculate Celsius
    Plugin_120_CJ_Temp=(crawvalue * 0.0625);
    
    // Calculate Celsius
    return hrawvalue * 0.25;
  }
  else
  {
    return NAN;
  }
}

// Convert Celsius to Fahrenheit
double CelsiusToFahrenheit(double celsius) {
  return celsius * 9.0 / 5.0 + 32;
}

/*double cJuntionTemp() {
    
}*/


Re: K-Type / MAX6675 build in

Posted: 23 Jan 2017, 18:53
by rtenklooster
frank wrote:
frank wrote:the MAX6675 arrived from hong kong. But it isn't working. How do i connect it to an esp8266 12e devkit the cs is at gpio 15
I had some time and have got it working. It works great. Now i am going to try mutiple TK on the esp.

It works with 2 TK :D :D
How did you manage to get two of them to work?
You're able to add two devices and two different i/o ports for the CS.
But the SPI is using the same pins..i'm not able to get two readings, even though i have a different delay for both max6675's

Re: K-Type / MAX6675 build in

Posted: 25 Jan 2017, 09:13
by frank
rtenklooster wrote:
frank wrote:
frank wrote:the MAX6675 arrived from hong kong. But it isn't working. How do i connect it to an esp8266 12e devkit the cs is at gpio 15
I had some time and have got it working. It works great. Now i am going to try mutiple TK on the esp.

It works with 2 TK :D :D
How did you manage to get two of them to work?
You're able to add two devices and two different i/o ports for the CS.
But the SPI is using the same pins..i'm not able to get two readings, even though i have a different delay for both max6675's
I gave every TK its own cs port and put the other pins on the same io ports.
It is now even working with 3 TK ( 2 meat probes and 1 dome probe) and it controls the fan. I am waiting for an warmer day so i can test the setup on mu BBQ :D

Re: K-Type / MAX6675 build in

Posted: 25 Jan 2017, 18:34
by rtenklooster
frank wrote:
rtenklooster wrote:
frank wrote:
I had some time and have got it working. It works great. Now i am going to try mutiple TK on the esp.

It works with 2 TK :D :D
How did you manage to get two of them to work?
You're able to add two devices and two different i/o ports for the CS.
But the SPI is using the same pins..i'm not able to get two readings, even though i have a different delay for both max6675's
I gave every TK its own cs port and put the other pins on the same io ports.
It is now even working with 3 TK ( 2 meat probes and 1 dome probe) and it controls the fan. I am waiting for an warmer day so i can test the setup on mu BBQ :D
And all three sensors the same delay? did you used if for a couple of minutes / hours?
I did the same, but even though all sensors have their own CS pin, the values being reported are not always from the according sensor.

If you are sure then maybe i'm using a different plugin, i used the plugin from the last post of this topic.

Re: K-Type / MAX6675 build in

Posted: 30 Jan 2017, 06:35
by frank
I am using the plug in from github.

Yesterday i did a test run in an oven and it worked like a charm

Re: K-Type / MAX6675 build in

Posted: 05 Feb 2017, 19:54
by frank
today an 7 hour sparerib sesion and it worked like a charm :D
Knowthe focus on the temperature/fan control

Re: K-Type / MAX6675 build in

Posted: 11 Feb 2017, 19:38
by nettworker
Hello,

i have downloaded the _P120_Thermocouple.ino from https://raw.githubusercontent.com/ESP82 ... nd/master/ .
I have opend it in the Arduino IDE with R120, compiled the whole Project without errors and uploaded it to the Nodemcu. After that the ESP reboots all the time.
If i compile without the _P120_Thermocouple.ino it works.

What's wrong? Anything forgotten?

Re: K-Type / MAX6675 build in

Posted: 12 Feb 2017, 16:04
by nettworker
Problem solved. Seems it was an internally Problem with different Builds ( R120, R147 ) an th evalues in Eprom.
After Reset the module, the R120 with the _P120_Thermocouple.ino works on the ESP. Now i am waiting for my Max6675 Modul and then K Type Needles from China.

Re: K-Type / MAX6675 build in

Posted: 15 Feb 2017, 20:18
by mattes1007
Hi,
I have tested the plugin with my MAX31855K ​​breakout boards. Unfortunately, the interface only displays incorrect temperatures:

Image

Code: Select all

MainConfigHardwareDevices Tools

log
334685: WD: Uptime 5 ConnectFailures 28 FreeMem 28288
336546: P120: C: 2152.75 - F: 3906.95
336552: HTTP: connection failed
346814: P120: C: 2048.00 - F: 3718.40
346819: HTTP: connection failed
357164: P120: C: 2263.75 - F: 4106.75
357170: HTTP: connection failed
364686: WD: Uptime 6 ConnectFailures 31 FreeMem 28272
367295: P120: C: 2234.50 - F: 4054.10
367300: HTTP: connection failed
Powered by www.esp8266.nu
If no probe is connected, it shows 0 C / 32 F

I've tried it with 3 different MAX31855k and various TYP-K thermocouples. Always these values ​​....
Do I need to change something at the code?

mattes

Re: K-Type / MAX6675 build in

Posted: 08 Mar 2017, 17:33
by mr_sensor
I just started to explore ESPEasy and it has a lot of possibilities. My second project is wiring up the MAX6677 to an esp8266 12f. I followed the samples and all the posts here on the board and ended up with an log file showing me:

Code: Select all

5105189 : WD : Uptime 85 ConnectFailures 0 FreeMem 28352
5109843 : P120 : C : nan - F : nan
5114847 : P120 : C : nan - F : nan
5119852 : P120 : C : nan - F : nan
5124857 : P120 : C : nan - F : nan
5129862 : P120 : C : nan - F : nan
So that is not what I expected to see :)

What could be the problem here? Broken board? Lack of power? I have it running on two batteries, since I want to have it portable for outdoor use.

I wired it up exactly as shown in the sketch:

Code: Select all

// MISO   Master Input    GPIO12
// SCK    Clock Output    GPIO14 
// CS     Chip Select     GPIO15 (CS 15  is configured in the web interface)
Gnd to Gnd
and Vcc to Vcc 
Any advice?

Thanks. Wiechert

Re: K-Type / MAX6675 build in

Posted: 09 Mar 2017, 14:06
by mr_sensor
Any thoughts on this? Will give it a try connecting it to usb power.

W.

Re: K-Type / MAX6675 build in

Posted: 09 Mar 2017, 17:46
by BertB
Sorry, I can't help you. I don't have that MAX.
However, did you check the enable SPI in the hardware tab?

Re: K-Type / MAX6675 build in

Posted: 09 Mar 2017, 19:21
by mr_sensor
No I did not do that. Did not know that I was supposed to do that. So I will have a look. Might be the solution.

Re: K-Type / MAX6675 build in

Posted: 09 Mar 2017, 20:24
by mr_sensor
If I have a look at the hardware tab I do not see any SPI mentioned. So what do you mean. Gpio12 and Gpio14 ? or pin mode?

Re: K-Type / MAX6675 build in

Posted: 10 Mar 2017, 07:12
by BertB
What firmware version do you use?

Re: K-Type / MAX6675 build in

Posted: 10 Mar 2017, 08:15
by mr_sensor
Hourly Build 2017/01/17 If that's the version (in the ReleaseNotes.ino it says R120 )? Could the problem also be that I have a regular esp 12f but arduino has NodeMcu 1.0 12e module? as a board ?

Re: K-Type / MAX6675 build in

Posted: 10 Mar 2017, 09:09
by BertB
No that is not the problem since you can upload and run the firmware.
I think in 120, SPI is not supported. You could try to use the release candidate 147-RC8

Re: K-Type / MAX6675 build in

Posted: 10 Mar 2017, 09:41
by mr_sensor
Ok. Can not find that on Github only the master/ dev branche where is it located? :roll: Sorry I found it while sending this message :) This is the one? http://www.letscontrolit.com/downloads/ ... 47_RC8.zip

Re: K-Type / MAX6675 build in

Posted: 10 Mar 2017, 09:53
by BertB
yep

Re: K-Type / MAX6675 build in

Posted: 10 Mar 2017, 10:00
by mr_sensor
So I can still use this _P120_Thermocouple.ino sketch?

Re: K-Type / MAX6675 build in

Posted: 10 Mar 2017, 10:45
by mr_sensor
Ok the hardware tab is now showing the SPI part. Give it a try later-on :) Thanks.

Code: Select all

Init SPI:	 (Note : Chip Select (CS) config must be done in the plugin)

Re: K-Type / MAX6675 build in

Posted: 10 Mar 2017, 12:07
by mr_sensor
Must still over-see something I guess. Now I get this:

Code: Select all

34710 : P120 : C : 0.00 - F : 32.00
39714 : P120 : C : nan - F : nan

Re: K-Type / MAX6675 build in

Posted: 10 Mar 2017, 12:41
by BertB
Which sensor do you have?
Can you measure between t- wire and ground? Is there a connection?
Is the thermocouple not connectoed to other stuff?
I guess you have to do some more research.

Re: K-Type / MAX6675 build in

Posted: 10 Mar 2017, 13:52
by mr_sensor
Now I got it working. I tried an other MAX6675 module and that worked. So the other module might have been broken. :) Nice!

Next part is connecting an display.

W.

Re: K-Type / MAX6675 build in

Posted: 12 Mar 2017, 10:11
by nettworker
Keep us updated :)
I am working on a standalone Version for mobil use.....

Re: K-Type / MAX6675 build in

Posted: 11 Oct 2017, 21:47
by QcVictor
HI Guys
Does he work with ESP Easy Mega ?

Code: Select all

Edit: Yes he works  :D , In the first post I can see reported 2 temperature in the plugin P039 only one is displayed How get the second value ?

Re: K-Type / MAX6675 build in

Posted: 09 Jan 2018, 13:43
by dcjona
hello everybody, thanks for the information on this topic.
I try to use the sensor but on esp easy the temperature doesn't change, always 30.5°C .. any info about the refresh ?