# Sensor DS18B20

**URL:** <https://forum.arduino.cc/t/sensor-ds18b20/676836>\
**Category:** Sensors\
**Created:** [October 3, 2020, 1:18am UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836 "2020-10-03T01:18:12Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![valentin2865](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@valentin2865](https://forum.arduino.cc/u/valentin2865)\
**Post date:** [October 3, 2020, 1:18am UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/1 "2020-10-03T01:18:12Z")

</div>

Hola!  
Alguno sabe por qué mi sensor DS18B20 marca siempre la temperatura "-127"? Tengo algún problema en las conexiones?  
Gracias

---

<div class="post-metadata">

**Author:** ![Pablo\_Lucini](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pablo_lucini/32/266178_2.png) [@Pablo\_Lucini](https://forum.arduino.cc/u/Pablo_Lucini)\
**Post date:** [October 3, 2020, 4:11pm UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/2 "2020-10-03T16:11:35Z")

</div>

Colocaste una resistencia de 4k7 en pullup con la salida del DS18B20 ?

---

<div class="post-metadata">

**Author:** ![valentin2865](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@valentin2865](https://forum.arduino.cc/u/valentin2865)\
**Post date:** [October 18, 2020, 6:00pm UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/3 "2020-10-18T18:00:42Z")

</div>

Hi!  
I´m trying to use my DS18B20 but the serial monitor always shows -127 ° C. My code and connections are correct (I think). How can I solve this problem?  
Thank you.

---

<div class="post-metadata">

**Author:** ![valentin2865](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@valentin2865](https://forum.arduino.cc/u/valentin2865)\
**Post date:** [October 18, 2020, 6:10pm UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/4 "2020-10-18T18:10:28Z")

</div>

Hi!  
I´m trying to use my DS18B20 but the serial monitor always shows -127 ° C. The code and connections are correct (I think). Is the sensor broken? or maybe it could be a library problem (Dallas temperature and oneWire). I don´t know. How can I solve this problem?  
Thank you!

---

<div class="post-metadata">

**Author:** ![Robin2](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/robin2/32/216045_2.png) [@Robin2](https://forum.arduino.cc/u/Robin2)\
**Post date:** [October 18, 2020, 7:09pm UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/5 "2020-10-18T19:09:42Z")

</div>

What made you think that your question has anything to do with the Website and Forum section which is clearly stated to be for "Improvements for the web system, applications to moderator, spam, etc."? I have suggested to the Moderator to move it to the Programming section.

This sort of carelessness makes unnecessary work for the Moderators.

And in view of the fact that your project is not working this statement cannot possibly be correct

> My code and connections are correct

Please post both your program and a photo of a simple diagram showing how you have everything connected. See this [Simple Image Posting Guide](http://forum.arduino.cc/index.php?topic=519037)

...R

---

<div class="post-metadata">

**Author:** ![anon73444976](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon73444976](https://forum.arduino.cc/u/anon73444976)\
**Post date:** [October 18, 2020, 7:17pm UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/6 "2020-10-18T19:17:00Z")

</div>

Triple post.  
Reported

---

<div class="post-metadata">

**Author:** ![gilshultz](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gilshultz](https://forum.arduino.cc/u/gilshultz)\
**Post date:** [October 18, 2020, 7:30pm UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/7 "2020-10-18T19:30:27Z")

</div>

That error indicates you are not communicating with the sensor. Load and run a scan program to find out if it is there. If it does not find it you are not connected properly. Also be sure you have the pull up resistor in the circuit.

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [October 18, 2020, 7:42pm UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/8 "2020-10-18T19:42:40Z")

</div>

To get the best and fastest help:

Please read [the Read this before posting a programming question ...](https://forum.arduino.chttps://forum.arduino.cc/index.php?topic=97455.0c/index.php?topic=97455.0)post. It makes it easier on every one if we don't have to waste time finding out fundamental information.

Post a schematic and a clear photo of your wiring.

Read the [how to use this forum-please read sticky](https://forum.arduino.cc/index.php/topic,148850.0.html) to see how to properly post code. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code.

---

<div class="post-metadata">

**Author:** ![StefanL38](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stefanl38/32/713548_2.png) [@StefanL38](https://forum.arduino.cc/u/StefanL38)\
**Post date:** [October 18, 2020, 7:48pm UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/9 "2020-10-18T19:48:37Z")

</div>

How shall we know what is causing this problem with such a short description?  
There are a dozen different reasons possible to get this result of only showing -127

Post pictures of your hardware where connections can be seen easily  
Post your complete sketch

best regards Stefan

---

<div class="post-metadata">

**Author:** ![Coding\_Badly](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Coding\_Badly](https://forum.arduino.cc/u/Coding_Badly)\
**Post date:** [October 18, 2020, 8:08pm UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/10 "2020-10-18T20:08:40Z")

</div>

@valentin2865, do not cross-post. Threads merged.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 10:30am UTC](https://forum.arduino.cc/t/sensor-ds18b20/676836/11 "2021-05-06T10:30:38Z")

</div>


