I am working on a heating control system for my home, but having problems with the temperature sensor reading higher than I expect.

I have a 5V Arduino Mini Pro clone hooked up to a relay module, an HD47780 display and a Tiny RTC module, with a DS18B20 attached to it.

The DS18B20 is powered from the 5v Vcc applied to the Tiny RTC module rather than using parasitic power on the DQ line (as I wasn't sure if the Onewire libraries supported this mode of operation) and the DS18B20 datasheet says that Vcc may be between 3.0v and 5.5v. I measured the regulated power from the Mini Pro's being at 5.2v.

I am comparing the temperature from the DS with the existing room thermostat (bi-metallic), an RS desktop temperature monitor with two sensors, a small 'thermo-hygrometer' and a bi-metallic fridge thermometer (in the upper quarter of its temperature range). The readout from the DS is always around 1-2 degrees higher than the readout from the other sensors, which are within a degree of each other.

† Not the actual one, but something similar.

Reading various forums I have heard that these sensors are quite accurate but can suffer from localised heating from components near them, so I moved the sensor onto a 20cm cable and positioned it well away from the rest of the electronics. This made no difference.

I then read that the DS can become self heating if it is supplied with too high a Vcc voltage, so I added a Red LED with 1.7v drop and measured the new voltage over the DS as 3.5v, but again, after waiting for the temperatures to stabilise once more, this made no difference.

Can anyone suggest why the DS may be reading high and what I can can do to prevent this?

  • How confident are you that your room thermostat isn't just reading 1-2 degrees low? You should get a third thermometer, and compare to determine where your offset is actually coming from. Since the RS thermometer likely uses the same readout electronics for both sensors, it's probably not really useful as two distinct calibration references. Mar 18, 2014 at 0:55

5 Answers 5


I've put a lot of DS18B20 sensors in place now on various sensor nodes - maybe 50 or so. I've learnt a bit about the readings returned from them. I know you have isolated some of these as not being the cause, but it is good to confirm that they are issues.

I don't know if you are using Celsius or Fahrenheit, so the degree of the problem isn't clear.

Localised heating

I don't think of Arduino as a "hot" chip, but putting a DS18B20 in an enclosure with an Arduino and LCD caused me to see readings 2-3°C higher than expected.

Moving it outside the enclosure fixed this.

Heating from high Vcc/frequent conversions

If you supply the chip with a high Vcc and perform frequent conversions (i.e. as frequently as you can), the chip does warm up. I have seen this increase readings by 1-2°C.

I haven't seen the problem with high Vcc alone, but I operate most DS18B20 in parasitic mode and convert at most once every 10s. The ones operated in active mode generally have the powered turned off when not being used.

OneWire and DallasTemperature do support parasitic mode.

Not all temperature sensors are created equal

I had a number of temperature sensors before I started playing around with DS18B20. Almost without exception, these under-read. Most of them are based on thermistors and calibration is poor. I thought the DS18B20 were over reading, but when I used a good thermocouple and meter, I could validate that they were correct.

This was about learning to trust the DS18B20.

Heat conducted along wire

If you have the sensors on a wire, the wire conducts a surprising amount of heat. This can be an issue when running wiring along pipes.

Fake DS18B20

These sensors are very popular, and this seems to have caused fakes to appear. I have a batch of stainless steel waterproof sensors that over-read and the timings were out. They worked with the OneWire library, but not a DS2482 OneWire master. I have heard of the normal TO-92 cased ones being fake as well.

  • 1
    In the great wisdom of the board software, I'm not allowed to answer this question, so I'll add a comment here. As I found out the hard way on github.com/PaulStoffregen/OneWire/issues/91 , if you use a 3.3V chip, you need to replace the 4.7k resistor with a 2.7k resistor, or some sensors will return incorrect values. Mar 27, 2020 at 22:00

In my case, the wiring between my uC and the sensor was too short, and was transmitting some heat. I thought that couldn't be the case at first, since another temp sensor was reporting accurate temps at the same distance. I moved it to another location on the board and voila!


Perhaps you might want to calibrate your sensor.

What does it read when immersed in boiling water (assuming sea level) ? 102.5 Celsius? That would give you a high-temperature calibration of -2.5C.

Obviously it's better to calibrate around the temperatures you expect to me measuring. That means trusting (or averaging?) some measuring device and calibrating to that.


I have seen offsets of several degrees C when using DS18B20 on a 3.3V bus, switching to a stable 5.0V bus and I got more reasonable values. (tested with and without parasitic power)

  • 1
    That's interesting, thanks, and the opposite of what some people have been reporting. I wonder if this is another fake DS18B20 issue.
    – Mark Booth
    Jun 7, 2017 at 8:45

I've made some experiments. If DS18B20 was on short cable <1cm to my Arduino Pro Micro the readings was 5 degrees more than environment was. On cable lenght >10cm from arduino board and no matter where the resistor was mounted (near arduino or near DS18B20) the readings was fine.

  • After reading your answer, I tried moving the sensor away and my readings dropped 5 degrees to a more accurate value. Do you have any idea why? I don't think the heat of the circuit caused the difference.
    – bart
    May 23, 2022 at 8:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.