Ground Embedded KO Subscribe

Notes / Sensors & Signal Processing

Sensor basics: the numbers to look at in a datasheet

How a physical quantity becomes a voltage or data, and the range, resolution, accuracy and response speed you compare when choosing a sensor.

GROUND EMBEDDED · NOTESensors & Signal Processing 01Sensor basicsMCUTempI2CIMUSPIHallGPIORangeUARTCurrentADC

A sensor turns a physical quantity (temperature, acceleration, magnetic field, distance) into an electrical signal. There are three main kinds of output.

Output Examples MCU connection
Analog voltage Thermistor divider, Hall current sensor ADC
Digital communication MPU6050, BME280, VL53L0X I2C, SPI
Pulse / frequency Encoder, ultrasonic echo, Hall switch Timer capture, GPIO interrupt

Datasheet terms

Term Meaning
Measurement range ±2 g, -40 to 125 °C
Resolution The smallest change that can be distinguished
Accuracy Difference from the true value (offset + gain error + non-linearity)
Sensitivity Output per unit of the physical quantity (mV/g, LSB/°/s)
Noise density µg/√Hz and the like. More bandwidth means more noise
Response time / ODR How quickly and how often it gives a new value
Temperature drift How much the offset changes with temperature

Resolution and accuracy are different

High resolution · low accuracyfine but wrongLow resolution · high accuracycoarse but right
Resolution is how fine the scale is; accuracy is how far from the true value.

Even a 16-bit sensor is not accurate if its offset is large. Resolution is "how finely it divides" and accuracy is "how right it is". Most sensors get close to their datasheet accuracy only after calibration of the offset and gain.

FREE PDFGet the 3 free ebooksIf you want to keep reading this topic as one book: BLDC motor control, serial communication and sensors at book length. PDFs are in Korean.Get them free →