Skip to content

Commit 3c2bf19

Browse files
committed
voltage output started
1 parent ae7274c commit 3c2bf19

File tree

3 files changed

+63
-10
lines changed

3 files changed

+63
-10
lines changed
863 KB
Loading
822 KB
Loading

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

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2676,14 +2676,14 @@ Input terminals are mapped as described in the following table:
26762676

26772677
| **Opta Analog Expansion Terminal** | **Arduino Pin Mapping** |
26782678
|:----------------------------------:|:-----------------------:|
2679-
| I1 | 0 |
2680-
| I2 | 1 |
2681-
| I3 | 2 |
2682-
| I4 | 3 |
2683-
| O1 | 4 |
2684-
| I5 | 5 |
2685-
| I6 | 6 |
2686-
| O2 | 7 |
2679+
| I1 | 0 or OA_CH_0 |
2680+
| I2 | 1 or OA_CH_1 |
2681+
| I3 | 2 or OA_CH_2 |
2682+
| I4 | 3 or OA_CH_3 |
2683+
| O1 | 4 or OA_CH_4 |
2684+
| I5 | 5 or OA_CH_5 |
2685+
| I6 | 6 or OA_CH_6 |
2686+
| O2 | 7 or OA_CH_7 |
26872687

26882688
#### Digital Input Mode
26892689

@@ -2854,7 +2854,7 @@ DI channel 7 value 0
28542854

28552855
![Digital Input wiring example](assets/digital-animation.gif)
28562856

2857-
***General note: The library supports the OptaController.getExpansionNum(). This function always returns the number of expansions discovered during the last discovery / assign I2C address process. Since the discovery process is NOT performed if an expansion is removed or powered down, the value returned by this function DOES NOT change in case of the removal of one Expansion. To know if an expansion is missing, register a callback using setFailedCommCb(cb) (available on all the Expansion classes). The callback will be called any time an I2C expected answer is not received by the controller, allowing the user to know that expansion is missing. No "heartbeat" function is provided to understand if an expansion is missing since having an expansion and not regularly communicating with it is not a behavior meant by design.***
2857+
***The library supports the OptaController.getExpansionNum(). This function always returns the number of expansions discovered during the last discovery / assign I2C address process. Since the discovery process is NOT performed if an expansion is removed or powered down, the value returned by this function DOES NOT change in case of the removal of one Expansion. To know if an expansion is missing, register a callback using setFailedCommCb(cb) (available on all the Expansion classes). The callback will be called any time an I2C expected answer is not received by the controller, allowing the user to know that expansion is missing. No "heartbeat" function is provided to understand if an expansion is missing since having an expansion and not regularly communicating with it is not a behavior meant by design.***
28582858

28592859
#### Analog Voltage Input Mode
28602860

@@ -3589,12 +3589,65 @@ ch 0 -> 1101.66 Ω -> 25.91 C
35893589
| DAC resolution | 13 bits |
35903590
| Charge pump for zero voltage output | Yes |
35913591

3592-
***All eight analog channels can be used as outputs but due to power dissipation limitations, it is recommended to have up to 2 channels set at output at the same time.***
3592+
The Opta™ Analog Expansions have **2 analog programmable outputs** accessible through terminals `O1` to `O2` that can be used as:
3593+
3594+
| **Mode** | **Specification** |
3595+
|:------------------------------:|:-----------------------------------------:|
3596+
| Analog output voltage | 0...11 V |
3597+
| Analog output current | 0...25 mA |
3598+
3599+
Analog output terminals are mapped as described in the following table:
3600+
3601+
| **Opta Analog Expansion Terminal** | **Arduino Pin Mapping** |
3602+
|:----------------------------------:|:-----------------------:|
3603+
| I1 | 0 or OA_CH_0 |
3604+
| I2 | 1 or OA_CH_1 |
3605+
| I3 | 2 or OA_CH_2 |
3606+
| I4 | 3 or OA_CH_3 |
3607+
| O1 | 4 or OA_CH_4 |
3608+
| I5 | 5 or OA_CH_5 |
3609+
| I6 | 6 or OA_CH_6 |
3610+
| O2 | 7 or OA_CH_7 |
3611+
3612+
3613+
***All available channels of the analog expansion can be used as outputs, including `I1` to `I6`, so there are 8 accessible analog outputs actually, but due to power dissipation limitations, it is recommended to have up to 2 channels set at output at the same time.***
35933614

35943615
***At 25°C of ambient temperature, all the 8 channels set as outputs have been tested at the same time while outputting more than 24 mA at 10 V each (>0.24W per channel).***
35953616

3617+
Also, it features **4 PWM outputs** accessible through terminals `P1` to `P4`.
3618+
3619+
PWM output terminals are mapped as described in the following table:
3620+
3621+
| **Opta Analog Expansion Terminal** | **Arduino Pin Mapping** |
3622+
|:----------------------------------:|:-----------------------:|
3623+
| P1 | 8 or OA_PWM_CH_0 |
3624+
| P2 | 9 or OA_PWM_CH_1 |
3625+
| P3 | 10 or OA_PWM_CH_2 |
3626+
| P4 | 11 or OA_PWM_CH_3 |
3627+
3628+
![Opta Analog Expansions Outputs](assets/outputs-analog.png)
3629+
35963630
#### Analog Voltage Output Mode
35973631

3632+
This output mode lets you control voltage-driven actuators.
3633+
3634+
| Characteristics | Details |
3635+
|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
3636+
| Analog output voltage | 0...11 V |
3637+
| Resistive load range | 500 Ω...100 kΩ |
3638+
| Maximum capacitive load | 2 μF |
3639+
| Short-circuit current (sourcing) | Min: 25 mA, Typ: 29 mA, Max: 32 mA (lower limit bit = 0 (default)), Min: 5.5 mA, Typ: 7 mA, Max: 9 mA (lower limit bit = 1) |
3640+
| Short-circuit current (sinking) | Min: 3.0 mA, Typ: 3.8 mA, Max: 4.5 mA |
3641+
| Accuracy | +/- 1%, repeatability +/- 1% |
3642+
3643+
To set a voltage in an analog output terminal use the built-in function `pinVoltage()` as shown below:
3644+
3645+
```arduino
3646+
float value = exp.getRtd(<input>); // this returns the resistive value measured in the input in ohms
3647+
```
3648+
3649+
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**:
3650+
35983651
#### Analog Current Output Mode
35993652

36003653
## Support

0 commit comments

Comments
 (0)