ESP8266 and DS18B20 not working on external 5V

Hi,

I have a NodeMCU board (with ESP8266). I'm using DS18B20, 2 of them in parallel on 3 wires. They are connected to 3V3, GND and D3. There's a resistor between 3V and the data line. All standard and I've used it several times before with Arduino and 5V.

It all works perfectly if the NodeMCU is connected to usb, and powered that way. I want it powered from the 5V inside some equipment. When I connect that to VIN and GND (and remove the usb) everything else is fine but the DS18B20 read -127. The 5V is from a "VIN" pin, for an missing optional extra on a pcb. It shows 5V on my cheap multi-meter.

The resistor was 4K7, but somewhere I saw recommendation to use 3K3 on 3V. Tried that, no better.

I'd be happy to have a temperature reading only every minute. If I can trade off speed for reliability that would be good.

Everything else: The NodeMCU loads the program with OTA, BME280 is reading correctly, values sent by UDP arriving, OTA demo web-site switches GPIO pin on/off.

Any help appreciated.

Hi,
More details on this 5V power supply.
Is it battery or power suplly?
Is there an electrolytic capacitor on the 5V output?
etc, etc.....
Post a schematic of your project using the source.

It's the 5V running the embedded controller in some equipment. Yes, I could try adding some capacitors.

Operating Voltage 3.3V

Thats for the NodeMCU maybe you burned it with the 5v.

Try using 3.3v

A very quick Google shows lots of sources saying will run on 5V, and some say up to 10V. See this diagram.

Drive the DS18B20 with 5V. 3V is the absolute minimum power. For the data 4k7 to 3,3V must be good.