Comment by willis936
13 hours ago
The datasheet gives you much better fidelity data than an N=1 test. You'll never know what the tolerance is if you're just looking at one unit. Presumably the average buyer cares if they expect the temperature sensor to be 5% off on the unit they buy. The accuracy of all of these sensors have ratings, but they are often just copying the value on one component and not even considering a stackup. Devils lie in details.
Regarding accuracy, it's been about a decade, but I did some embedded projects related to accurate temperature measurements back in the day. From what I recall, anything sensor that is < $100 or so is going to be 5% margin of error at the very best, and regardless of price, you're going to have to calibrate it and figure out the curves in your ADC, it's not going to be linear. Additionally, just the act of measuring will heat your sensor slightly so that will need to be taken into account as well.
In short, if you need less than a couple degrees of accuracy, it's going to take a bit of tinkering. I wouldn't trust a $1 sensor for a tropical fish tank, for example, but probably good enough for a home thermostat.
I've used these: https://sensirion.com/media/documents/213E6A3B/63A5A569/Data...
They claim accuracy of +-0.2 c across a wide temperature range and in my use they seem to be. easy to find on a support board for under $10
That tracks somewhat with what I remember. I was working on process control for an industrial washing machine in a hot and humid environment. I think the extreme temp and humidity is what made it difficult, but those error margins do look great for the cost.
The datasheet will gives you absolute best case scenario. Like current consumption in sleep mode, or what register to set for best accuracy. It does not mean the Firmware will do exactly that.
The datasheet gives you the 3 sigma worst case for accuracy.
For power consumption a system power tree needs to be constructed and that will set the bounds that firmware can achieve. That would be better than trusting the manufacturer but a real test is best.