# Calibrating Sensors

## Why Calibrate?

![](https://cdn-learn.adafruit.com/assets/assets/000/025/356/medium800/sensors_PerfectSensor.png?1431283745)

### 

There are a lot of good sensors these days and many are 'good enough' out of the box for many non-critical applications. &nbsp;But in order to achieve the best possible accuracy, a&nbsp;sensor should be calibrated in the system where it will be used. &nbsp;This is because:&nbsp;

- **No sensor is perfect.**
  - Sample to sample manufacturing variations mean that even two sensors from the same manufacturer production run may yield slightly different readings.
  - Differences in sensor design mean two different sensors may respond differently in similar conditions. This is especially true of ‘indirect’ sensors that calculate a measurement based on one or more actual measurements of some different, but related parameter.
  - Sensors subject to heat, cold, shock, humidity etc. during storage, shipment and/or assembly may show a change in response.
  - Some sensor technologies 'age' and their response will naturally change over time - requiring periodic re-calibration.

- **The Sensor is only one component in the measurement system.** &nbsp;For example:
  - With analog sensors, your ADC is part of the measurement system and subject to variability as well.
  - Temperature measurements are subject to thermal gradients between the sensor and the measurement point.
  - Light and color&nbsp;sensors can be affected by spectral distribution, ambient light, specular reflections and other optical phenomena.
  - Inertial sensors almost always have some 'zero offset' error and are sensitive to alignment with the system being measured

### 

The two&nbsp;most important characteristic of a sensor are:

- **Precision** &nbsp;-&nbsp;The ideal sensor will always produce the same output for the same input. &nbsp;
- **Resolution** &nbsp;- A good&nbsp;sensor will be able to reliably detect small changes in the measured parameter.

![](https://cdn-learn.adafruit.com/assets/assets/000/025/551/medium800/sensors_Precision.png?1431800024)

### 

- **Noise** - All measurement systems are subject to random noise to some degree. &nbsp;Measurement systems with a low&nbsp;Signal to Noise Ratio will have problems making repeatable measurements. &nbsp;In the diagrams above, the sensor on the right shows much better precision&nbsp;than the noisy one on the left.
- **Hysteresis** - Some types of sensors also exhibit&nbsp;hysteresis. &nbsp;The sensor will tend to read low with an increasing signal and high with a decreasing signal as shown in the graph below. &nbsp;Hysteresis&nbsp;is a common problem with many pressure sensors.

To paraphrase George Santayana: **_&nbsp;_**

**_"Those who ingnore hysteresis are doomed to unrepeatable results."_**

![](https://cdn-learn.adafruit.com/assets/assets/000/025/353/medium800/sensors_Hysteresis.png?1431279295)

### 

Precision and resolution are the real&nbsp;'must have' qualities. &nbsp;But there are a couple of&nbsp;other 'nice-to-have' qualities:

**Linearity** - A sensor whose output is directly proportional to the input is said to be linear. &nbsp;This eliminates the need to do any complex curve-fitting and simplifies the calibration&nbsp;process.

**Speed** - All else being equal, a sensor that can produce precise readings faster is a good thing to have.

![](https://cdn-learn.adafruit.com/assets/assets/000/025/354/medium800/sensors_Sensor_Errors.png?1431279458)

### 

Accuracy is a combination of precision, resolution and calibration. &nbsp; **If you have a sensor that gives you repeatable measurements with good&nbsp;resolution, you&nbsp;can calibrate it for accuracy.**

### 

To some degree, yes. &nbsp;Nevertheless, digital sensors are still subject to manufacturing and operating condition variability.&nbsp; For critical measurements, you need to calibrate the total system.

### 

And it probably is - when measured in their QA test fixture&nbsp;using&nbsp;their test procedures and according to their definition of 'accuracy'. &nbsp;

**Your mileage may vary!**

- [Next Page](https://learn.adafruit.com/calibrating-sensors/so-how-do-we-calibrate.md)

## Featured Products

### 10K Precision Epoxy Thermistor

[10K Precision Epoxy Thermistor](https://www.adafruit.com/product/372)
Need to measure something damp? This epoxy-coated precision 1% 10K thermistor is an inexpensive way to measure temperature in weather or liquids. The resistance in 25 °C is 10K (+- 1%). The resistance goes down as it gets warmer and goes up as it gets cooler. <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/372)
[Related Guides to the Product](https://learn.adafruit.com/products/372/guides)
### Thermocouple Amplifier MAX31855 breakout board (MAX6675 upgrade)

[Thermocouple Amplifier MAX31855 breakout board (MAX6675 upgrade)](https://www.adafruit.com/product/269)
Thermocouples are very sensitive, requiring a good amplifier with a cold-compensation reference. The MAX31855K does everything for you, and can be easily interfaced with any microcontroller, even one without an analog input. This breakout board has the chip itself, a 3.3V regulator with 10uF...

In Stock
[Buy Now](https://www.adafruit.com/product/269)
[Related Guides to the Product](https://learn.adafruit.com/products/269/guides)
### Thermocouple Amplifier with 1-Wire Breakout Board - MAX31850K

[Thermocouple Amplifier with 1-Wire Breakout Board - MAX31850K](https://www.adafruit.com/product/1727)
Thermocouples are very sensitive, requiring a good amplifier with a cold-compensation reference. [So far we've carried the very nice MAX31855 which is an SPI interface thermocouple amplifier.](https://www.adafruit.com/products/269) The '855 is great but if you have a lot of...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1727)
[Related Guides to the Product](https://learn.adafruit.com/products/1727/guides)
### Thermocouple Type-K Glass Braid Insulated

[Thermocouple Type-K Glass Braid Insulated](https://www.adafruit.com/product/270)
Thermocouples are best used for measuring temperatures that can go above 100 °C. This is a bare wires bead-probe which can measure air or surface temperatures. Most inexpensive thermocouples have a vinyl covering which can melt at around 200 °C, this one uses a fiberglass braid so it...

In Stock
[Buy Now](https://www.adafruit.com/product/270)
[Related Guides to the Product](https://learn.adafruit.com/products/270/guides)
### Sensor pack 900

[Sensor pack 900](https://www.adafruit.com/product/176)
An assortment of the most common sensors used in electronics. 9 sensors and 3 additional components to interface with the 'analog world'. [We have some tutorials here, to get you started](http://learn.adafruit.com/search?q=sensors).

Includes

- <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/176)
[Related Guides to the Product](https://learn.adafruit.com/products/176/guides)

## Related Guides

- [Adding a Single Board Computer to Blinka](https://learn.adafruit.com/adding-a-single-board-computer-to-blinka.md)
- [Adafruit 1-Wire Thermocouple Amplifier - MAX31850K](https://learn.adafruit.com/adafruit-1-wire-thermocouple-amplifier-max31850k.md)
- [MAX31855 Thermocouple](https://learn.adafruit.com/thermocouple.md)
- [CircuitPython I2C and SPI Under the Hood](https://learn.adafruit.com/circuitpython-basics-i2c-and-spi.md)
- [MicroPython Hardware: SPI Devices](https://learn.adafruit.com/micropython-hardware-spi-devices.md)
- [MAX31855 Thermocouple Sensor Python Library](https://learn.adafruit.com/max31855-thermocouple-python-library.md)
- [CircuitPython Libraries on Linux and the 96Boards DragonBoard 410c](https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-96boards-dragonboard-410c.md)
- [Connecting the MAX31855 Thermocouple Amplifier breakout to an Electric Imp](https://learn.adafruit.com/connecting-the-max31855-thermocouple-amplifier-breakout-to-an-electric-imp.md)
- [Adafruit FT232H With SPI & I2C Devices](https://learn.adafruit.com/adafruit-ft232h-with-spi-and-i2c-libraries.md)
- [Google Docs Sensor Logging From Your PC](https://learn.adafruit.com/gdocs-sensor-logging-from-your-pc.md)
- [ Analog IC Insights On-the-Go by Maxim Integrated](https://learn.adafruit.com/maxim-app.md)
- [CRICKIT WobblyBot](https://learn.adafruit.com/crickit-wobblybot.md)
- [Adafruit BMP280 Barometric Pressure + Temperature Sensor Breakout](https://learn.adafruit.com/adafruit-bmp280-barometric-pressure-plus-temperature-sensor-breakout.md)
- [Manually bridging MQTT to Adafruit.IO](https://learn.adafruit.com/manually-bridging-mqtt-mosquitto-to-adafruit-io.md)
- [Weather Wise Wifi Umbrella Stand](https://learn.adafruit.com/weather-wise-wifi-umbrella-stand.md)
