Read probe data with ESP8266

Hi everyone, I would be interested in integrating a (bipolar) sensor probe into HA to be connected to the NodeMC via 2.5mm jack.

Unfortunately I was not really able to understand how to do it, I followed this guide

NTC Sensor ESPHome but it didn’t lead to anything since I don’t know the b_costant value of my probe and the calibration gives me wrong values. I would like to avoid soldering resistors and doing complicated circuits to simply read the sensor resistance (EX Resistance Sensor).

In case it is needed, however, these are the data collected with the multimeter

    calibration:
      - 106.0kOhm -> 23°C
      - 360.0kOhm -> -1°C
      - 11.0kOhm -> 83°C

I also tried with Tasmota, setting the sensor as ADC Temp. Unfortunately, as the temperature rises the sensor indicates a lower value.

Anyone have any suggestions?

Thanks

below the wiring diagram I would like to use (if possible):
Schema
and it is the probe I bought Link

You can’t set it up like that between +V and the analog pin. The reading won’t be stable, if you get any reading at all because the voltage drop through the problem with the minimal load the ESP ADC provides will be negligible. And prone to noise.

Set the probe up as a voltage divider.

But your calibration values see way, way off. Thermistors are a (reasonably) linear progression. Hot = low resistance, or hot = high resistance.

Based on the appearance of your sensors I would guess they are thermocouples. They generate tiny voltage proportional to temperature and require an amplifier to read via microprocessor. Or a specialized interface chip like the MAX6675.

I undestand, thanks for explenation.
Once I’ve connected the probe to MAX6675 how can I read the temperature?

The MAX6675 (or newer MAX31856) is an SPI bus device which has Arduino library support, so it can be read via Tasmota, ESPHome or your own firmware. Just needs to be connected to the SPI bus on your microcontroller.

There are breakout boards for these ICs available on eBay, Aliexpress, etc.

The MAX6675 looks not works

[W][max6675:040]: Got invalid value from MAX6675Sensor (0x7FFC)
spi:
  miso_pin: D6
  clk_pin: D5

sensor:
  - platform: max6675
    name: "BBQ Temperature"
    cs_pin: D7
    update_interval: 20s

Instead of adding the complication of ESPHome, verify that the board and sensor are working by using one of the example sketches for the MAX6675 library.

Sadly this config with the k-type probe works, probably is the resistance scale the problem.
My k-type looks have 6.5kohm resistance at 20°, the probe 101kohm at same temperature.
There is a MAX6675 alternative for this “class” of resistance?

Thermocouples produce a voltage, they do not operate by changing resistance. I am assuming you have a thermocouple based on the appearance, and the strange resistances you measured.

Can you post a link to where you purchased those probes?

This is the datasheet for the MAX6675. Note it is among other things an amplifier to amplify the uV output from the thermocouple.

Shure! Here my probe https://a.aliexpress.com/_B1qTNM
and this is the MAX6675 I’ve used


however it is not essential to use this probe, if there is a “simpler” food probe to integrate with ESPHome or Homeassistant I will be happy to buy that

Unfortunately the link contains no data. It does appear however to be a thermocouple.

Things you can try:

  • Reverse the polarity of the probe to the MAX6675

  • Test the MAX6675 with that problem in the Arduino environment with the MAX6675 libraries

  • Check the probe with a meter. It should raise about 40uV per dgree

I’m not good in arduino but here te code and the result

#include "max6675.h"

int thermoDO = 6;
int thermoCS = 7;
int thermoCLK = 5;

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);

void setup() {
  Serial.begin(9600);

  Serial.println("MAX6675 test");
  // wait for MAX chip to stabilize
  delay(500);
}

void loop() {
  // basic readout test, just print the current temp
  
   Serial.print("C = "); 
   Serial.println(thermocouple.readCelsius());
   Serial.print("F = ");
   Serial.println(thermocouple.readFahrenheit());
 
   // For the MAX6675 to update, you must delay AT LEAST 250ms between reads!
   delay(1000);
}
wdt reset
load 0x4010f000, len 3584, room 16 
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld

I have also tryed inverted polarity but no changes

After correct the example sourcecode here the output

F = nan
C = nan
F = nan
C = nan

The WDT output indicate the processor has crashed. Something about that code is wrong, though it looks like a copy and paste from the example. Pin numbers maybe?

Seeing your 2nd post, NaN indicates “not a number”. So I’d guess that the library isn’t getting a reading.

Do you have the thermocouple that came with the MAX6675 board? Does it work?

Please post a high quality image of how you have things connected.

The error was in the example where it takes the int numbers, the thermocouple function need string like ie “D7”, after having correct this little error the output from the food probe was: “nan”, from the MAX6675 probe was correct “C = 20”

Yes, with his own thermocouple it works, and also the ESPHome (with platform: max6675) code wokrs.


Here it is the image, I know the jumper are not the best way to connect it but they simplify the testing work a lot.
I apologize for my bad english

Don’t worry about your English.

It is possible the jumper wires are the problem. Remember, we are dealing with microvolt signals. Those Dupont connections are not great and could have several ohms of resistance. Usually thermocouple connections are special high nickle wires, with high nickle terminals to handle both the heat and minimize resistance. Almost always screw terminals for the same reasons.

My research says the YS-05 is a thermocouple based thermometer, so your probe should be a K-type thermocouple because I can’t imagine they’d use a more exotic, more expensive thermocouple type on a cheap thermometer.

I’m not sure I have a definite answer here. It should work. I’ve used the MAX6675 on a variety of thermocouples.

Ciao @racerider ,

did you managed to get it all work?
I’m very interested in doing a BBQ meat thermometer like this and it’s hard to find a max6675 with a meat thermocouple… i was looking for the same thermometer you bought.

Thanks

Hi All
i did some shopping for build a BBQ Thermometer…

  1. I bought a MAX6675
    https://www.amazon.it/gp/product/B07MY36P9Y/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

  2. I bought a ThermoPro TP17
    https://www.amazon.it/gp/product/B074XND445/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

I already had an ESP8266

TP17 is a double probe; I was thinking to use one probe with ESP8266+MAX6675 and the other one with TP17 to compare the two measurements

…but…
I’m not able to make the ThermoPro probe working :frowning: I keep on having “nan” as output, but using the thermocouple that came with the MAX6675 board the output is correct

i don’t know if the ThermoPro can be the problem (but @AaronCake you wrote in this thread “…It should work. I’ve used the MAX6675 on a variety of thermocouples…” so i have some hope) or whatelse.

How could i connect the probe with MAX6675? ThermoPro has a mini jack (2,5mm?). Should i use some specific conector?
I don’t want to cut the wire…

ps: Maybe i will wrote to this seller (K Tipo di Termocoppia Sonda 5 millimetri * 100 millimetri 5 millimetri * 150 millimetri M8 Vite Filo Max 600C Gradi sensore di temperatura SUS304 In Acciaio Inox|k 1|thermocouple typethermocouple wire - AliExpress) who accept customization for the thermocouple…

Thank you for any help!

The fact it has a mini jack leads me to believe that it is not a thermocouple. Or that there is more than a thermocouple in that probe.

Ciao, sadly I dropped this project, to get meat temp in HA I’ve connected an inkbird bluetooth thermometer to an esp32.
This project need more specification and lib to me (I’m not an expert)