Sensor conversion and scaling
Description
This article gives formulas for converting measured sensor signals to physical units, a function available in WB-MAI6 and WB-MAI2-mini/CC v.3. It also explains scaling lower and upper limits for nonstandard sensor signal ranges.
Terms and definitions
- Minimum (Smin) and maximum (Smax) sensor signal values, for example 0–20 mA;
- Measured (S) sensor signal;
- Minimum (Pmin), maximum (Pmax) and calculated (P) physical quantity measured by the sensor. Minimum and maximum values define its measurement range and are specified in the sensor documentation.
- P = Pmin + (S - Smin) * K.
- Conversion factor (K), the ratio of the physical-quantity range to the signal range: physical units per signal unit.
- K = (Pmax - Pmin) / (Smax - Smin).
Converting a sensor signal to physical units
Consider a 4–20 mA temperature sensor covering −40 to +80 °C. Calculate temperature at 12 mA.
Given:
- Smin = 4 mA, Smax = 20 mA;
- Pmin = -40 °C, Pmax = 80 °C;
- S = 12 mA.
Solution:
- Conversion factor: K = (Pmax - Pmin) / (Smax - Smin) = (80 − (−40)) / (20 − 4) = 120 / 16 = 7.5 °C/mA;
- Physical quantity: P = Pmin + (S - Smin) * K = (-40) + (12 - 4) * 7.5 = 20 °C.
Range limits for nonstandard sensor signals
To convert standard analog signals to physical units, modules WB-MAI6 and WB-MAI2-mini/CC v.3 use the parameters Lower and Upper range limit, corresponding to the minimum (Pmin) and maximum (Pmax) physical quantity measured by the sensor.
For a nonstandard signal, such as 1.6–19.4 mA, selecting a 0–20 mA template range will produce incorrect conversion. Calculate the physical values corresponding to 0 mA and 20 mAand enter them in the respective parameters Lower and Upper range limit.

Consider a temperature sensor with 6–19 mA output and −40 to +80 °C range. The template is set to 4–20 mA measurement. Calculate physical values corresponding to 4 mA and 20 mA.
Given:
- Smin = 6 mA, Smax = 19 mA;
- Pmin = -40 °C, Pmax = 80 °C;
- S1 = 4 mA, S2 = 20 mA.
Solution:
- Conversion factor: K = (Pmax - Pmin) / (Smax - Smin) = (80 − (−40)) / (19 − 6) = 120 / 13 = 9.23 °C/mA;
- Physical quantity at the lower range limit: P1 = Pmin + (S1 - Smin) * K = (-40) + (4 - 6) * 9.23 = (-40) + (-18.46) = -58.46 °C.
- Physical quantity at the upper range limit: P2 = Pmin + (S2 - Smin) * K = (-40) + (20 - 6) * 9.23 = (-40) + 129.22 = 89.22 °C.
Useful links
- Community topic WB-MAI6 zero offset
- Community topic MAI6 value scaling.