DS18B20 to big deviation, 5%

Hi

I have 2x DS18B20 sensors on same project.
Readings are not same

01:22:02.000 -> BStempKube: 25.75
01:22:02.000 -> BSStempUte: 27.12

Difference is in this case 1.37 celsius, this is around 5% (25,75 * 1.05=27.12)

I thinks this 5% is much, data sheet +-0.5C.

I guess I run on 9 Bits, std library no spesific Bit programming:

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

Any tip to get?

Data sheet:

Benefits and Features
• ±0.5°C Accuracy from -10°C to +85°C
●● Unique 1-Wire® Interface Requires Only One Port
Pin for Communication
●● Reduce Component Count with Integrated
Temperature Sensor and EEPROM
• Measures Temperatures from -55°C to +125°C
(-67°F to +257°F)
• Programmable Resolution from 9 Bits to 12 Bits
• No External Components Required

image

Datasheet is for genuine sensors, and if you bought them on aliexpress, most of the sensors there are fake

Sure, by default the library set 9bit resolution,
However, you can easily change it by setResolution() method:

// set resolution of all devices to 9, 10, 11, or 12 bits
// if new resolution is out of range, it is constrained.
void DallasTemperature::setResolution(uint8_t newResolution)

This may be the answer.... I

My order:
Nr 1: Digikey

Nr 2
https://www.dustinhome.no/product/5011266343/ds18b20-temperature-sensor?ssel=false

Thanks for tip.
Added

sensors.setResolution(12);

Now it reads:

12:37:32.987 -> BStempKube: 26.87
12:37:32.987 -> BSStempUte: 26.50

Better, not perfect, like 1.3%