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 Sun, 16 Mar 2025 17:47:48 +0000 hourly 1 https://wordpress.org/?v=6.8.2 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

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

managed to get the one sensor (normal) to run, but when trying two or three sensors (exactly replicating the example), it always only detects the first one. Switched out sensors, no difference. Tried the hardcoded approach ( numberOfDevices = 2) as suggested by a previous poster, the I get:

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

Anyone knows what the issue could be? Help much appreciated. Thanks and br M

]]>
By: Ray Cleary https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-964541 Wed, 02 Oct 2024 15:00:27 +0000 http://randomnerdtutorials.com/?p=24955#comment-964541 Great guide for using DS temperature sensor. I have no coding experience but I now have breadboarded 5 sensors displaying on a 2 line LCD display.

Question… Is there a minimum gauge wire to use between an esp32 and the DS? I am using bare sensors and will place them through the insulation onto the copper cylinder.

My application is to tell the top, middle, and bottom temperatures of my insulated hot water cylinder. We will be able to see how much hot water is available – I hope it will reduce our energy use.

]]>
By: Naeem Ameen. https://randomnerdtutorials.com/guide-for-ds18b20-temperature-sensor-with-arduino/#comment-922036 Thu, 06 Jun 2024 07:16:56 +0000 http://randomnerdtutorials.com/?p=24955#comment-922036 In reply to pierre chevalier.

dowload the onewire and dallas temperature from the libaray…

]]>