Skip to content

Commit 61f9da2

Browse files
committed
PT100 updated
1 parent 0fb825e commit 61f9da2

File tree

1 file changed

+7
-7
lines changed
  • content/hardware/07.opta/opta-family/opta/tutorials/01.user-manual

1 file changed

+7
-7
lines changed

content/hardware/07.opta/opta-family/opta/tutorials/01.user-manual/content.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3150,7 +3150,7 @@ Setting DAC output to 11 V on expansion n. 0
31503150

31513151
#### Analog RTD Input Mode
31523152

3153-
The Analog Expansion input channels can be used for temperature metering with **PT100** or **PT1000** RTDs.
3153+
The Analog Expansion input channels can be used for temperature metering with **PT100** RTDs.
31543154

31553155
| **Characteristics** | **Details** |
31563156
|:-------------------:|:-----------:|
@@ -3176,7 +3176,7 @@ To perform measurements of an input terminal configured as RTD use the built-in
31763176
float value = exp.getRtd(<input>); // this returns the resistive value measured in the input in ohms
31773177
```
31783178

3179-
For the following example a 2 wires **PT1000** will be used connected to **I1**. The sketch below will let you measure the resistance and convert it to a temperature value. This sketch is based on the built-in example found in **File > Examples > Arduino_Opta_Blueprint > Analog > RTD**:
3179+
For the following example a 2 wires **PT100** will be used connected to **I1**. The sketch below will let you measure the resistance and convert it to a temperature value. This sketch is based on the built-in example found in **File > Examples > Arduino_Opta_Blueprint > Analog > RTD**:
31803180

31813181
```arduino
31823182
#include "OptaBlue.h"
@@ -3246,7 +3246,7 @@ void setup() {
32463246
AnalogExpansion::beginChannelAsRtd(OptaController, i, // the device
32473247
k, // the output channel you are using
32483248
false, // use 3 wire RTD
3249-
0.2); // current used on RTD in mA
3249+
0.8); // current used on RTD in mA
32503250
}
32513251
}
32523252
}
@@ -3271,7 +3271,7 @@ void optaAnalogTask() {
32713271
Serial.print(" -> ");
32723272
Serial.print(value);
32733273
Serial.print(" Ω");
3274-
float temp = ((1.0 / 1000.0) * (-10.0 * sqrt(10.0) * sqrt(-b * value + 250.0 * pow(a, 2.0) + 1000.0 * b) + 500.0 * a)) / b;
3274+
float temp = (-(1.0 / 100.0) * (50.0 * a - 10*sqrt(b * value + 25.0 * pow(a, 2.0) - 100.0 * b))) / b;
32753275
Serial.print(" -> ");
32763276
Serial.print(temp);
32773277
Serial.print(" C");
@@ -3301,18 +3301,18 @@ The expansion channels are configured as **RTD inputs** using the function `begi
33013301
AnalogExpansion::beginChannelAsRtd(OptaController, i, // the device
33023302
k, // the output channel you are using
33033303
false, // use 3 wire RTD
3304-
0.2); // current used on RTD in mA
3304+
0.8); // current used on RTD in mA
33053305
```
33063306

3307-
The current parameter in the function above will depend on your RTD type, study your sensor datasheet to find the more suitable for it, in this case, the **PT1000** used recommends a **0.2 mA** current.
3307+
The current parameter in the function above will depend on your RTD type, study your sensor datasheet to find the more suitable for it, in this case, the **PT100** used recommends a **0.8 mA** current.
33083308

33093309
The function `optaAnalogTask()` reads all the RTDs connected and converts their resistive value to a temperature.
33103310

33113311
After the Opta™ controller is programmed with the example sketch, open the Arduino IDE Serial Monitor and you will see each input reading as follows:
33123312

33133313
```
33143314
Expansion n. 0
3315-
ch 0 -> 1101.66 Ω -> 25.91 C
3315+
ch 0 -> 109.73 Ω -> 24.99 C
33163316
```
33173317

33183318
#### Programmable Outputs

0 commit comments

Comments
 (0)