Parasite Mode more than 4 sensors temperature deviation by 15 degrees

Hi all.
I use the esp8266 board in place with 7 pieces of DS18B20 sensors in (parasite mode) and 4.7k resistors (wiring diagram in the attach)
I can not solve the problem of connecting more than 4 sensors to one chain, as soon as I connect the 5 sensor, the temperature is added by 15 Celsius degrees (for example, with 4 sensors it shows 25 Celsius degrees, and when I connect the 5 sensor, it already shows 40 Celsius degrees, and when 7 sensors already shows 85 Celsius degrees), and the sensors all 7 are detected by the system, as well as if you connect them separately then everything works too (sketch below)


TemC

#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged TO GPIO 4
#define ONE_WIRE_BUS 4

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

// Number of temperature devices found
int numberOfDevices;

// We'll use this variable to store a found device address
DeviceAddress tempDeviceAddress; 

void setup(){
  // start serial port
  Serial.begin(9600);
  
  // Start up the library
  sensors.begin();
  
  // Grab a count of devices on the wire
  numberOfDevices = sensors.getDeviceCount();
  
  // locate devices on the bus
  Serial.print("Locating devices...");
  Serial.print("Found ");
  Serial.print(numberOfDevices, DEC);
  Serial.println(" devices.");

  // Loop through each device, print out address
  for(int i=0;i<numberOfDevices; i++){
    // Search the wire for address
    if(sensors.getAddress(tempDeviceAddress, i)){
      Serial.print("Found device ");
      Serial.print(i, DEC);
      Serial.print(" with address: ");
      printAddress(tempDeviceAddress);
      Serial.println();
    } else {
      Serial.print("Found ghost device at ");
      Serial.print(i, DEC);
      Serial.print(" but could not detect address. Check power and cabling");
    }
  }
}

void loop(){ 
  sensors.requestTemperatures(); // Send the command to get temperatures
  
  // Loop through each device, print out temperature data
  for(int i=0;i<numberOfDevices; i++){
    // Search the wire for address
    if(sensors.getAddress(tempDeviceAddress, i)){
      // Output the device ID
      Serial.print("Temperature for device: ");
      Serial.println(i,DEC);
      // Print the data
      float tempC = sensors.getTempC(tempDeviceAddress);
      Serial.print("Temp C: ");
      Serial.print(tempC);
      Serial.print(" Temp F: ");
      Serial.println(DallasTemperature::toFahrenheit(tempC)); // Converts tempC to Fahrenheit
    }
  }
  delay(5000);
}

// function to print a device address
void printAddress(DeviceAddress deviceAddress) {
  for (uint8_t i = 0; i < 8; i++){
    if (deviceAddress[i] < 16) Serial.print("0");
      Serial.print(deviceAddress[i], HEX);
  }
}

IIRC, 85 is a special number. I think it's what you get when the sensor hasn't yet sought a reading.

I've never been able to get parasitic power working. Maybe try the three wire configuration.

Ok, but if it was an error it wouldn't give all 7 sensors with their addresses

Maybe. I don't know the details of the inner workings of the DS18B20, but I could believe that polling the bus for addresses one by one is less power hungry than making all seven read the temperature simultaneously.

I've seen threads regarding multiple sensors where people had to adjust the value of the pullup. See if you can find one to get a recommendation for a different resistance.

I bet you don't have a good reason for using parasitic power, and the best advice you will ever get is to use three wires. I understand you have already proven the sensors and code are kosher.

You might try dropping the pullup down to 1.5k, but I've never gotten reliable performance in parasite mode with more than 2 chips and a few cm of wire.

Which is a 3.3volt device, so connect that pull up resistor to 3.3volt, not to 5volt.
Might have to reduce that value a bit. Try 2k2.
Leo..