Powering the DS18B20 with 3V3 while using long lines doesn't seem to work well. The VDD pin of the DS18B20 drops below 3V.
Is it possible to power the DS18B20 VDD pin with 5V and use the pull up resistor of 4K7 connected to 3V3 and the dataline in order to keep the GPIO pin of the raspi at 3V3 max?
I believe the DS18B20 dataline uses some sort of open collector transistor or open drain mosfet to drive the dataline.
Using 5V as external power for the DS18B20 makes it possible to use longer lines while staying below 3V3 because of the open collector/drain dataline to protect the GPIO pin against overvoltage.