Is it accurate to be precise ?

Thanks to mass production there are more and more environmental sensors available at a low price. But how do I, as a maker, choose between sensors that present similar prices and characteristics?

Amongst others, there are two important questions that I need to ask myself when choosing a sensor. For example, if I want to build a thermometer: do I choose a temperature sensor that can measure differences of a hundredth of a degree? Or, do I not care that much about fine differences but want to be sure that my measure is very close to the “real” temperature? There is a fine, but important difference between these two choices!

  • If I go for the first option I want to be precise
  • If I go for the second option I want to be accurate

Allow me to elaborate: 

Precision corresponds to the smallest real difference you are able to measure.

For example if the precision of your sensor is 0.01°C you should be able to differentiate two temperatures which differ by 0.01°C.

Accuracy is how well your measurement reflects the real value of the variable you are trying to measure. 

For example if the accuracy of your sensor is 0.5°C this means that if your sensor outputs a temperature of 25°C then you are able to say that the real temperature is between 24.5°C and 25.5°C. 

Resolution is the smallest discrete step that your sensor is able to output. It can be as low as 0.0625° for some temperature sensors.

On the one hand, analog sensors generally have a continuous measurement range, this means they have a nearly infinite resolution. Digital sensors on the other hand use a discrete measurement range. That means, their resolution is finite and depends on manufacturer specifications. 

For all digital sensors you should be able to find at least accuracy and resolution in the datasheet. 

Let’s take a look at a real world example: 

The DS18B20 sensor from Maxim Integrated

This is a temperature sensor. It is generally cheap and it has a declared range of -55°C to +125°C. It’s resolution is the following (p5 of the datasheet):

This means that users can set the resolution depending on the number of bits wished. Here the max resolution is 0.0625°C. For this sensor, there is no indication of its precision in the datasheet. This is generally the case for these digital sensors. 

Expected temperature accuracy for this sensor is available on page 2 of the datasheet: 

Most sensors vary in accuracy over their measurement range. This might be because the sensing unit they use is only linear over a certain range of temperatures.

This manufacturer also gives more interesting information:

The +3s and -3s (standing for +3sigma and +3sigma aka 3 standard deviations around the mean in normal distribution) error tells us that 99.7% of all DS18B20 sensors produced by Maxim integrated should have an error that is between these two curves. 

So why would anyone care about accuracy and precision ? In the end it all depends on what you are trying to measure or control. If you wish to control your oven through a thermostat maybe +-5°C of accuracy is enough for this use. If you want to control the temperature of your aquarium you might want a more accurate sensor such as the one described in the example. Accuracy generally comes at a price and is not needed for every use.