Nodemcu v3 vs sensor ds18b20 problem

Hi all guys, I have a problem with my project. I have nodemcu v3 and a DS18B20 temperature sensor. Connection is very simple like multiple examples on the web.
The voltage is 5V for both and is external. The sensor is connected with the data cable in pin D6 and a 4.7Khom resistor between the pin and the direct current.
With this setting when turning on the nodemcu the system does not start, if I disconnect the resistor and start nodemc, the system starts, but the sensor does not work, but by reconnecting the resistor the sensor works too. The problem recurs if I unplug and plug the power back in. Can you help me why this happens? TY

So it is not wired like you think, you have a short circuit somewhere.
Please post a photograph that clearly shows you wiring.

No, it isn't! :astonished:

The logic voltage on the NodeMCU is 3.3 V. You must connect the pull-up resistor to the 3.3 V line to use any device with the ESP8266.

Clearly the ESP is detecting a wrong voltage on startup and going into the wrong operating mode.

Thank you for yours answers, ok.. in pin VIN it's possible connect from 4.5V to 10V without problem, and DS18B20 needs 5V


The image isn't the better, you can see:

  • red Voltage 5v
  • black GND
  • orange, green, blue, white for stripled RGBW
  • yellow for DS18B20
  • are 4 transistor PNP
  • resistance for strip led and pin temperature

I hope is clear

Clear and sparkling in the same way that mud is.
That is nether a schematic nor a photograph. It is a physical layout diagram which is about as useful as a chocolate tea pot when it comes to communicating what you have and how it is wired.

You seem to be unaware that the NodeMCU runs at 3V3, this means all the signals into it and out of it are at 3V3 maximum. The Vin pin feeds an internal regulator that generates 3V3 from a higher external voltage. It matters not what that voltage is ( within the given limits ) this has no effect on the signals it produces or expects. So saying:-

is meaningless.
The DS18B20 dose not need 5V. The data sheet says it will run off a voltage between 3V and 5V5. So you are wiring it incorrectly to a nodeMCU if you connect it to 5V.

We could really use a schematic!

https://forum.arduino.cc/t/how-to-make-a-schematic-you-can-post/675103/12

Mike you are really nice! :grin:
Evidently the photo is less clear than the scheme which is faithful to the connections.

I know very well that the nodemcu works at 3.3V but the range of volts in the VIN pin goes from 4.5V to 10V

Having said that, I will follow your advice, I will try to connect the sensor to the 3.3V of the NODEMCU

Thanks for your help

Did I not point that out in #3? :roll_eyes:

But that has no bearing on anything except how you power it.

Yes Paul, have read

Ok guys, I connected the volt pin as your advice, but nothing has changed, at the start it is shorted


You can see in the image the connection of the voltage cable in 3.3v, if I remove the connection between the resistor and the 3.3V pin, nodemuc starts regularly, when nodemuc has started, I can connect the cable and the temperature works too.
Could the temperature sensor be faulty?

Oh dear, oh dear! :astonished:

Why on earth did you pick pin "D8" (AKA GPIO15) on the NodeMCU to connect the DS18B20?

That is the absolutely worst possible pin you could have ever chosen!

Swap it for "D7" and adjust your secret code accordingly.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.