pihome-shc / pihome

PiHome - Smart Heating, Ventilation and Air Conditioning (HVAC)
http://www.pihome.eu
Other
52 stars 25 forks source link

Define DS18B20 resolution to 12 #430

Closed sandreialexandru closed 3 years ago

sandreialexandru commented 3 years ago

I've encountered a sensor that defaulted to resolution 9, which means that my temperature readings fluctuated in 0.5 degree steps. We are setting resolution to 12 to get 0.01 degree steps

pihome-shc commented 3 years ago

@sandreialexandru thank you

pihome-shc commented 3 years ago

for reference, if you want to change default resolution from 9 bit to 12 it will take lot longer.

9 bits: increments of 0.5C, 93.75ms to measure temperature; 10 bits: increments of 0.25C, 187.5ms to measure temperature; 11 bits: increments of 0.125C, 375ms to measure temperature; 12 bits: increments of 0.0625C, 750ms to measure temperature.

sandreialexandru commented 3 years ago

You are right, but even at 750ms is fast enough for our application.