> For the complete documentation index, see [llms.txt](https://help.boomerang3.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.boomerang3.com/boomerang-3-domain-administrator-manual/admin/infrastructure/infrastructure__measuring_points/adc-formula.md).

# ADC formula

All the analogue to digital MPs have some specific common parameters shown below.

### Common ADC MP parameters <a href="#common-adc-mp-parameters" id="common-adc-mp-parameters"></a>

<table><thead><tr><th width="202.5">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>Input Range</td><td>Selects the input range.</td></tr><tr><td>Measuring Range</td><td>Selects the measuring (output) range.</td></tr><tr><td>Advanced button</td><td>Presents the formula used for measurement calculation where x is the input reading.</td></tr></tbody></table>

#### Input ranges

The input ranges are predefined and depend on the type of the ADC MP hardware specification.&#x20;

Typical ranges are 0-20mA. 4-20mA or 0-10V.&#x20;

#### Measuring ranges

The measuring ranges can be defined as described in [Measuring Ranges](/boomerang-3-domain-administrator-manual/admin/infrastructure/infrastructure__measuring_ranges.md) chapter.

#### ADC conversion formula

To define the ADC conversion formula, select the Input Range which defines the range of the raw values read from the sensor and then the Measuring Range which defines the output range of the measurements after conversion.

The system allows to use only  a linear equation formula in the form of:

```
y = a*x + b
```

Please note that the system creates the formula automatically taking into account the units used in the measurement raw value which may differ depending on the ADC module used e.g. raw current readings may be reported in mA or uA. This is shown in detail in example 1 and 2 below.

#### Example 1

A GMP251 Vaisala CO2 sensor (FC014 ) is added to the system. The sensor has 0-20mA output where increase of 1mA corresponds to increase of CO2 concentration of 1% so the scale is 1mA/1%.

The sensor is connected to one of the channels of NWIN004 WIN 4xADC 4-20mA module. This module measures the current from 0 to 20mA despite its B3 name and returns the readings in mA.

The input range is set to 0-20mA and the measuring range to 0-20.

The formula in B3 is:

```
y = (x*(20-0)/20)+0
```

After shortening, the mathematical formula is:

```
y = x
```

#### Example 2

A GMP251 Vaisala CO2 sensor (FC014 ) is added to the system. The sensor has 0-20mA output where 1mA increase corresponds to CO2 concentration increase of 1% so the scale is 1mA/1%.

The sensor is connected to one of S2 3xAnalogue input module channels. The module measures the current from 0 to 20mA and returns the readings in uA.

The input range is set to 0-20mA and the measuring range to 0-20.

The formula in B3 is:

```
y = (x*20/20000)+0
```

After shortening, the mathematical formula looks as below:

```
y = x/1000
```

The raw value must be divided by 1000 to convert raw value in uA to mA.

#### Example 3

An H2 sensor which characteristics is shown below, is added to the system.

<figure><img src="/files/qw40mLNXyBQIPiND6fK5" alt=""><figcaption></figcaption></figure>

The sensor has 4-20mA output where increase of 2mA corresponds to H2 concentration increase of 1% so the scale is 2mA/1%.

The input range is set to 4-20mA which gives the current span of 20-4 = 16mA and the measuring range is set to 0-8.

The formula in B3 is:

```
y = ((x-4)*(8-0)/16)+0
```

After shortening, the formula is:

```
y = (x-4)/2
```

We may check the result for e.g. x = 8mA for which the H2 concentration shall equal 2%.

```
y = (8-4)/2 = 4/2 = 2
```

#### Example 4

A sensor with mA output is added to the system. The sensor has 4-20mA output which shall be mapped to the MP readings from -50 to +50.

&#x20;The input span of 20 - 4 = 16mA shall be mapped to output span of 50 - (-50) = 100 so 1mA increase shall equal to output increase of 100/16 = 6.25. The output for x = 4 shall be -50 and for x = 20 shall be 50.

The sensor is connected to one of the channels of NWIN004 WIN 4xADC 4-20mA module.

The input range is set to 4-20mA and the measuring range to -50 to +50.

The formula in B3 is:

```
y = ((x-4)*(50+50)/16)-50
```

After shortening, the mathematical formula looks as below:

```
y = 6.25*(x-4)-50
```

We may check the result for x = 4mA for which the measurement shall be equal -50.

```
y = 6.25*(4-4)-50 = 6.25*0-50 = -50
```

The result for x = 20mA for which the measurement shall be equal 50.

```
y = 6.25*(20-4)-50 = 6.25*16-50 = 100-50 = 50
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.boomerang3.com/boomerang-3-domain-administrator-manual/admin/infrastructure/infrastructure__measuring_points/adc-formula.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
