Ds182b20 room temperature readings

I am using an ESP-01 with a ds18b20 sensor to read the room temperature.

Something like this:

The problem I am having is that the reading is constantly too high. About 5-6 degrees too high (celsius).

I am quite confident that the issue is 1) minor increase due some thermal dissipation from the sensor itself, and 2) the ESP itself generating heat in the process of transmission.

Just wondering if anyone else has experienced something similar?

These sensors always need a bit of compensation. Well all mine have.

just add the filters bit to your code. like this

  - platform: dht
    pin: D4
    temperature:
      name: "Kitchen Temperature"
      filters:
        - offset: -4.5

I would actually expect this as the esp82xx which is really close (5mm?) is creating a bunch of heat :fire:

Beside the Ds18b20 build into that board isn’t probably a original one but instead a counterfeit sensor which probably doesn’t perform according the data sheet :man_shrugging:

Thank you both for your replies.

I am convinced that the sensor is ok (although most likely a counterfeit).

I pulled the sensor out of the board and replaced it with another one (most likely a counterfeit as well) and the reading was still high.

But … I then placed the sensor on a breadboard and wired it to the esp from a distance, the temperature was closer to normal, placing the esp near the sensor raised the reading.

I also tested the sensor(s) using arduino and they were only about 1 deg off compared to a glass temperature.

@Arh I used the offset in the yaml before but from what I could see the actual temp bias (/offset) was not very consistent, like non-linear.

So I am quite convinced it’s the heat from the esp, and as you said @orange-assistant it makes sense, but … is there any solution? Can I put it to reduce the samples to say 15 minutes, put it to sleep, or something else that will make the reading closer to where it should be?

You really need the electronics in a box and the sensor outside the box. Anything else is going to give a reading of the temperature of the board it is attached to. I tend to use DHT11 sensors mounted on the outside of the box my esp is in. I use D1 minis with a lot of sensors on the same board, light, temp, PIR and MMwave radar. One box has air pressure as well. I have 4 of these boxes running and the temperature readings are fine for my needs.