Comments on: Guide for DS18B20 Temperature Sensor with Arduino https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Thu, 26 Mar 2026 12:40:36 +0000 hourly 1 https://wordpress.org/?v=6.8.5 By: Sara Santos https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-1172955 Thu, 26 Mar 2026 12:40:36 +0000 http://randomnerdtutorials.com/?p=24955#comment-1172955 In reply to arpita.

If you’re getting those readings with the sensor, it means there’s something wrong with the sensor itself.
Double-check the wiring.
Regards,
Sara

]]>
By: arpita https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-1172851 Thu, 26 Mar 2026 03:18:59 +0000 http://randomnerdtutorials.com/?p=24955#comment-1172851 In reply to Mendouh Billal.

Hi, I’m having this problem too. I’m not sure what’s wrong. I used the first sample code in this tutorial but the output is giving -127 and -196. I think the sensor is not working because when i took the data wire out, it was still giving out output. I tested the connections wtih an LED so that should not be a problem.

]]>
By: Dave Fischer https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-1170336 Thu, 19 Mar 2026 18:33:15 +0000 http://randomnerdtutorials.com/?p=24955#comment-1170336 In reply to Vani Rajan.

I had the same problem. I have an ESP32-S3 board that has two circuit board pads labeled IN / OUT. These need to be soldered together to make the 5V pin work.

]]>
By: Arne Olav Mytting https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-1017123 Sun, 16 Mar 2025 17:47:48 +0000 http://randomnerdtutorials.com/?p=24955#comment-1017123 I had a problem with a higher number of sensors > 5;
The connection of DS18B20 to Arduino needs a pull-up resistor of 4.7kohm.
It works ok with up to 5-6 sensors, but also depends on the length of the cables.

Each sensor (and cable) will provide some resistance.
I assume the bias resistor should be lowered so that the total resistance still is about 4.7kohm.

I tried with 3.9kohm and a few more sensors.
At first, this seemed not to work but after 5-10 seconds the signals appeared.
Tried with 3.3k, and even more sensors. Worked after a little longer.
Tried with 2.7k, this works ok with 14 sensors, but it takes 15-20 seconds to start up, some “handling” among the sensors.
So then the problem with many sensors seems solved; “More sensors , less pull-up resistance”

]]>
By: Sara Santos https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-1016886 Sat, 15 Mar 2025 22:55:04 +0000 http://randomnerdtutorials.com/?p=24955#comment-1016886 In reply to Arne Olav Mytting.

Hi.
I didn’t know about that.
Thanks for letting me know.
Regards,
Sara

]]>
By: Arne Olav Mytting https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-1016877 Sat, 15 Mar 2025 21:52:04 +0000 http://randomnerdtutorials.com/?p=24955#comment-1016877 I had a problem with a higher number of DS18B29 sensors > 5 and an Arduino UNO;
The connection of DS18B20 to Arduino needs a bias resistor of 4.7kohm.
It works with up to 5-6 sensors, but also depends on the length of the cables.

Each sensor (and cable) will provide some resistance.
I assume the bias resistor should be lowered so that the total resistance still is about 4.7kohm.

I tried with 3.9kohm and a few more sensors.
At first, this seemed not to work but after 5-10 seconds the signals appeared.
Tried with 3.3k, and even more sensors. Worked after a little longer.
Tried with 2.7k, this works ok with 14 sensors, but it takes 15-20 seconds to start up, some “handling” among the sensors.
So then the problem with many sensors seems solved; “More sensors , less pull-up resistance”.

]]>
By: Markus https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-1004181 Fri, 31 Jan 2025 20:38:14 +0000 http://randomnerdtutorials.com/?p=24955#comment-1004181 Hi Sara, I did an exact replication I believe of your project I on wokwi.com, and the simulation gives exactly the same result as the phycial board I set up: It only recognizes one temperature sensor. Could you have a look at it and let me know if i miss out on something?
Thx and br Markus

https://wokwi.com/projects/421628414510088193

]]>
By: Markus https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-1003630 Wed, 29 Jan 2025 14:36:38 +0000 http://randomnerdtutorials.com/?p=24955#comment-1003630 Hello Sara, thank you for your response. It’s all DS18B20 sensors that arrived in the same package, so I don’t think that’s the issue, but I’ll try exchanging the (order of the) sensors and if it’s still the same result, I’ll have a look at the wiring br Markus

]]>
By: Sara Santos https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-1003599 Wed, 29 Jan 2025 11:22:12 +0000 http://randomnerdtutorials.com/?p=24955#comment-1003599 In reply to Markus.

Hi.
There are several possibilities:
– the sensors are not working properly (may be fried)
– the sensors are not wired correctly
– or they are not DS18B20 sensors – it happened to me once, I had other temperature sensors and transistors near the DS18B20 and was using one of those instead of the DS18B20.
Regards,
Sara

]]>
By: Markus https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-1003469 Tue, 28 Jan 2025 22:04:22 +0000 http://randomnerdtutorials.com/?p=24955#comment-1003469 Hi,

tried to replicate the examples with my kids – worked with one sensor (normal), but with two or three sensors (exact replication of given example), only the first one is regognized. Exchanged sensors, same picture.

Tried the workaround suggested by a previous poster (hardcoding: numberOfDevices = 2), then I get the following error message:

Found device 0 ….

Found ghost device at 1 but could not detect address. Check power and cablingTemperature for device: 0

Anyone knows where the problem could be? Help much appreciated. Thx and br M

]]>