Different voltages for data and vcc in temperature sensor DS18B20

In my project I have a ESP32 microcontroller and some DS18B20 temperature sensors I want to connect to it.

Currently, for testing, the sensors' VCC is connected to the 3.3V of the controller and the data line has a pullup resistor connected to the same 3.3V.
And it works correctly.

But, for my project the sensors would be closer to the 5V input voltage so it would be easier to feed them 5V instead of running another wire for 3.3V.

My question is, if I connect the pullup resistor of the data line to 3.3V (while VCC is connected to 5V) would everything still work correctly without damaging anything?
From what I read the the sensor operate at the same voltage of its VCC, so I am worried it might send 5V to the ESP32 and damage it.

Thanks in advance!

It should be fine. It needs a pull-up because it can't drive the output high... It can only drive it low by "overpowering" the pull-up resistor.

Thanks!
So the max voltage of the data pin is based on the voltage is pulled up to, right?

Check the DS18B20 data sheet:

1 Like

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