DS18B20 random problem

389 / 5.000

Çeviri sonuçları

Çeviri sonucu

Hello DS18B20 temperature sensor works with ESP 32 card But sometimes there is an unknown problem. Is the problem in the code or is it a hardware error? Since the cable connected to the 4.7k resistor is long, I tried different resistances. I read the value but every 10 minutes, about 300 ml seconds, it becomes an unknown, that is, a ghost. Can you share any advice or a solution plan regarding this? Thank you very much in advance.

sensor:

  • platform: dallas_temp
    address: 0xc73de10457c66928
    name: “Water Temp”
    id: probe01
    update_interval: 6s

Raw TDS Reading

  • platform: adc
    pin: GPIO34
    name: “TDS 01 Raw”
    attenuation: 6db # only for ESP32
    id: tds01_raw
    update_interval: 2s
    unit_of_measurement: “v”
    accuracy_decimals: 3
    internal: true

Temperature Compensated Voltage

  • platform: template
    name: “TDS 01 TCV”
    id: temp01_comp_v
    unit_of_measurement: ‘v’
    accuracy_decimals: 3
    lambda: ‘return ((id(tds01_raw).state) / (1 + (0.02 * ((id(probe01).state) - 25.0))));’
    update_interval: 2s
    internal: true

Temperature Compensated TDS

  • platform: template
    name: “TDS”
    id: hydro_tds
    unit_of_measurement: “PPM”
    state_class: “measurement”
    accuracy_decimals: 0
    update_interval: 2s
    lambda: return (133.42*(id(temp01_comp_v).state)(id(temp01_comp_v).state)(id(temp01_comp_v).state) - 255.86*(id(temp01_comp_v).state)(id(temp01_comp_v).state) + 857.39(id(temp01_comp_v).state))*0.5;

Sorry, this is completely different topic. If you want to get it answered, create new topic. Nobody will find it here.

Check this one: GitHub - nrandell/dallasng - for me it working close to perfect.
Recently upgraded couple devices from 2024.4.1 to 2024.10.1 - still working.
Had issues with some sensors whic working on esp8266, but fails on esp32 - probably they too Chinese :slight_smile:

I had the same problem. Someone wrote that the reason was step down power supply. So, I tested that by using phone USB-C power to connect it direct to the ESP32 circuit. Unknown problem disappear immediately. So, in my case the problem was 5V step down power supply.

I had a similar issue with a Dallas probe on the end of a 10 meter cable. When connected to 3.3v, it worked most of the time and then would occasionally error out. I moved it over to 5v and haven’t had a problem since