Skip to content

Commit ebd5cfc

Browse files
committed
Opta User Manual updated
1 parent 4501f11 commit ebd5cfc

File tree

1 file changed

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

1 file changed

+71
-69
lines changed

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

Lines changed: 71 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,11 @@ Opta's maximum power consumption at +12 VDC is 2 W, and at +24 VDC is 2.2 W.
201201

202202
### Programmable Inputs
203203

204-
The image below shows Opta™ devices have **eight analog/digital programmable inputs** accessible through terminals `I1`, `I2`, `I3`, `I4`, `I5`, `I6`, `I7`, and `I8`.
204+
The image below shows Opta™ devices have **eight digital/analog programmable inputs** accessible through terminals `I1`, `I2`, `I3`, `I4`, `I5`, `I6`, `I7`, and `I8`.
205205

206206
![Programmable input terminals in Opta™ devices](assets/user-manual-9-2.png)
207207

208-
Analog/digital input terminals are mapped as described in the following table:
208+
Digital/analog input terminals are mapped as described in the following table:
209209

210210
| **Opta™ Terminal** | **Arduino Pin Mapping** |
211211
|:------------------:|:-----------------------:|
@@ -218,35 +218,32 @@ Analog/digital input terminals are mapped as described in the following table:
218218
| `I7` | `A6`/`PIN_A6` |
219219
| `I8` | `A7`/`PIN_A7` |
220220

221-
#### Analog Inputs
221+
#### Digital Inputs
222222
<br></br>
223223

224-
The input voltage range for each analog input terminal is the following:
224+
The input voltage range for each digital input terminal is the following:
225225

226-
- **Input voltage range**: 0 to +10 VDC
226+
- **Input voltage range**: 0 to +24 VDC
227227

228-
The analog input terminals can be used through the built-in functions of the [Arduino programming language](https://www.arduino.cc/reference/en/). To use the input terminals as analog inputs:
228+
***The Opta™ digital inputs also support the 0 to +10 VDC logic level.***
229229

230-
- Add the `analogReadResolution()` instruction in your sketch's `setup()` function.
230+
The input terminals can be used through the built-in functions of the [Arduino programming language](https://www.arduino.cc/reference/en/). To use the input terminals as digital inputs:
231231

232-
The sketch below shows how to monitor analog voltages on Opta's input terminals `I1`, `I2`, and `I3`. It initializes a serial connection, takes readings from each defined terminal, converts those readings into voltage based on a 12-bit resolution, and outputs these voltage values through the Arduino IDE's Serial Monitor. The readings are looped every second, allowing you to monitor changes real-time changes.
232+
- Add the `pinMode(pinName, INPUT)` instruction in your sketch's `setup()` function.
233+
234+
The sketch below shows how to monitor digital states on Opta's input terminals `I1`, `I2`, and `I3`. It initializes a serial connection, takes readings from each defined terminal, and interprets them as either `HIGH` or `LOW` digital states. These states are then output through the Arduino IDE's Serial Monitor. The state readings are looped every second, allowing you to monitor real-time changes.
233235

234236
```arduino
235237
/**
236-
Opta's Analog Input Terminals
237-
Name: opta_analog_inputs_example.ino
238-
Purpose: This sketch demonstrates the use of I1, I2, and I3 input
239-
terminals as analog inputs on Opta.
238+
Opta's Digital Input Terminals
239+
Name: opta_digital_inputs_example.ino
240+
Purpose: This sketch demonstrates the use of I1, I2, and I3 input
241+
terminals as digital inputs on Opta.
240242
241243
@author Arduino PRO Content Team
242-
@version 2.0 22/07/23
244+
@version 2.0 23/07/23
243245
*/
244246
245-
// Define constants for voltage, resolution, and divider.
246-
const float VOLTAGE_MAX = 3.3; // Maximum voltage that can be read
247-
const float RESOLUTION = 4095.0; // 12-bit resolution
248-
const float DIVIDER = 0.3034; // Voltage divider
249-
250247
// Array of terminals.
251248
const int TERMINALS[] = {A0, A1, A2};
252249
@@ -257,13 +254,14 @@ void setup() {
257254
// Initialize serial communication at 9600 bits per second.
258255
Serial.begin(9600);
259256
260-
// Enable analog inputs on Opta
261-
// Set the resolution of the ADC to 12 bits.
262-
analogReadResolution(12);
257+
// Set the mode of the pins as digital inputs.
258+
for (int i = 0; i < NUM_PINS; i++) {
259+
pinMode(TERMINALS[i], INPUT);
260+
}
263261
}
264262
265263
void loop() {
266-
// Loop through each of the terminal, read the terminal analog value, convert it to voltage, and print the result.
264+
// Loop through each of the terminal, read the terminal digital value, and print the result.
267265
for (int i = 0; i < NUM_PINS; i++) {
268266
readAndPrint(TERMINALS[i], i + 1);
269267
}
@@ -272,49 +270,48 @@ void loop() {
272270
delay(1000);
273271
}
274272
275-
// This function reads the value from the specified pin, converts it to voltage, and prints the result.
273+
// This function reads the digital value from the specified pin and prints the result.
276274
void readAndPrint(int terminal, int terminalNumber) {
277-
// Read the input value from the analog pin.
278-
int terminalValue = analogRead(terminal);
279-
280-
// Convert the terminal value to its corresponding voltage.
281-
float voltage = terminalValue * (VOLTAGE_MAX / RESOLUTION) / DIVIDER;
282-
283-
// Print the terminal value and its corresponding voltage.
275+
// Read the input value from the digital pin.
276+
int terminalValue = digitalRead(terminal);
277+
278+
// Print the terminal value.
284279
Serial.print("I");
285280
Serial.print(terminalNumber);
286281
Serial.print(" value: ");
287-
Serial.print(terminalValue);
288-
Serial.print(" corresponding to ");
289-
Serial.print(voltage, 5);
290-
Serial.println(" VDC");
282+
Serial.println(terminalValue);
291283
}
292284
```
293285

294-
#### Digital Inputs
286+
#### Analog Inputs
295287
<br></br>
296288

297-
The input voltage range for each digital input terminal is the following:
289+
The input voltage range for each analog input terminal is the following:
298290

299-
- **Input voltage range**: 0 to +24 VDC
291+
- **Input voltage range**: 0 to +10 VDC
300292

301-
The input terminals can be used through the built-in functions of the [Arduino programming language](https://www.arduino.cc/reference/en/). To use the input terminals as digital inputs:
293+
The analog input terminals can be used through the built-in functions of the [Arduino programming language](https://www.arduino.cc/reference/en/). To use the input terminals as analog inputs:
302294

303-
- Add the `pinMode(pinName, INPUT)` instruction in your sketch's `setup()` function.
295+
- Add the `analogReadResolution()` instruction in your sketch's `setup()` function.
304296

305-
The sketch below shows how to monitor digital states on Opta's input terminals `I1`, `I2`, and `I3`. It initializes a serial connection, takes readings from each defined terminal, and interprets them as either `HIGH` or `LOW` digital states. These states are then output through the Arduino IDE's Serial Monitor. The state readings are looped every second, allowing you to monitor real-time changes.
297+
The sketch below shows how to monitor analog voltages on Opta's input terminals `I1`, `I2`, and `I3`. It initializes a serial connection, takes readings from each defined terminal, converts those readings into voltage based on a 12-bit resolution, and outputs these voltage values through the Arduino IDE's Serial Monitor. The readings are looped every second, allowing you to monitor changes real-time changes.
306298

307299
```arduino
308300
/**
309-
Opta's Digital Input Terminals
310-
Name: opta_digital_inputs_example.ino
311-
Purpose: This sketch demonstrates the use of I1, I2, and I3 input
312-
terminals as digital inputs on Opta.
301+
Opta's Analog Input Terminals
302+
Name: opta_analog_inputs_example.ino
303+
Purpose: This sketch demonstrates the use of I1, I2, and I3 input
304+
terminals as analog inputs on Opta.
313305
314306
@author Arduino PRO Content Team
315-
@version 2.0 23/07/23
307+
@version 2.0 22/07/23
316308
*/
317309
310+
// Define constants for voltage, resolution, and divider.
311+
const float VOLTAGE_MAX = 3.3; // Maximum voltage that can be read
312+
const float RESOLUTION = 4095.0; // 12-bit resolution
313+
const float DIVIDER = 0.3034; // Voltage divider
314+
318315
// Array of terminals.
319316
const int TERMINALS[] = {A0, A1, A2};
320317
@@ -325,14 +322,13 @@ void setup() {
325322
// Initialize serial communication at 9600 bits per second.
326323
Serial.begin(9600);
327324
328-
// Set the mode of the pins as digital inputs.
329-
for (int i = 0; i < NUM_PINS; i++) {
330-
pinMode(TERMINALS[i], INPUT);
331-
}
325+
// Enable analog inputs on Opta
326+
// Set the resolution of the ADC to 12 bits.
327+
analogReadResolution(12);
332328
}
333329
334330
void loop() {
335-
// Loop through each of the terminal, read the terminal digital value, and print the result.
331+
// Loop through each of the terminal, read the terminal analog value, convert it to voltage, and print the result.
336332
for (int i = 0; i < NUM_PINS; i++) {
337333
readAndPrint(TERMINALS[i], i + 1);
338334
}
@@ -341,16 +337,22 @@ void loop() {
341337
delay(1000);
342338
}
343339
344-
// This function reads the digital value from the specified pin and prints the result.
340+
// This function reads the value from the specified pin, converts it to voltage, and prints the result.
345341
void readAndPrint(int terminal, int terminalNumber) {
346-
// Read the input value from the digital pin.
347-
int terminalValue = digitalRead(terminal);
348-
349-
// Print the terminal value.
342+
// Read the input value from the analog pin.
343+
int terminalValue = analogRead(terminal);
344+
345+
// Convert the terminal value to its corresponding voltage.
346+
float voltage = terminalValue * (VOLTAGE_MAX / RESOLUTION) / DIVIDER;
347+
348+
// Print the terminal value and its corresponding voltage.
350349
Serial.print("I");
351350
Serial.print(terminalNumber);
352351
Serial.print(" value: ");
353-
Serial.println(terminalValue);
352+
Serial.print(terminalValue);
353+
Serial.print(" corresponding to ");
354+
Serial.print(voltage, 5);
355+
Serial.println(" VDC");
354356
}
355357
```
356358

@@ -1775,7 +1777,7 @@ Finally, your Opta™ expansion will be updated with the latest firmware version
17751777

17761778
The Opta™ Expansions have **16 analog/digital programmable inputs** accessible through terminals `I1` to `I16`.
17771779

1778-
Both Ext D1608E and Ext D1608S variant inputs can be used as **digital** with a 0-24 VDC range or as **analog** inputs with a 0-24 VDC range. The inputs are capable of operating with 0-10V analog sensors as well as 0-24V sensors.
1780+
Both Ext D1608E and Ext D1608S variant inputs can be used as **digital** with a 0-24 VDC or 0-10 VDC range or as **analog** inputs with a 0-24 VDC range. The analog inputs are capable of operating with 0-10 VDC analog sensors as well as 0-24 VDC sensors.
17791781

17801782
***The inputs are marked on plastic as DGT/0-10 V to maintain uniformity with the main Opta module and as conventionally the majority of industrial analog sensors work in the 0-10 V range.***
17811783

@@ -1795,11 +1797,11 @@ Both Ext D1608E and Ext D1608S variant inputs can be used as **digital** with a
17951797
</tr>
17961798
<tr>
17971799
<td style="vertical-align: top;">Inputs overvoltage protection</td>
1798-
<td>yes (up to 40 V)</td>
1800+
<td>Yes (up to 40 V)</td>
17991801
</tr>
18001802
<tr>
18011803
<td style="vertical-align: top;">Reverse protection</td>
1802-
<td>no</td>
1804+
<td>No</td>
18031805
</tr>
18041806
<tr>
18051807
<td style="vertical-align: top;">Input impedance</td>
@@ -1841,15 +1843,15 @@ Analog/digital input terminals are mapped as described in the following table:
18411843
<tbody>
18421844
<tr>
18431845
<td style="vertical-align: top;">Digital Input voltage</td>
1844-
<td>0...24V</td>
1846+
<td>0...24 V</td>
18451847
</tr>
18461848
<tr>
18471849
<td style="vertical-align: top;">Digital Input voltage logic level</td>
18481850
<td>VIL Max: 4 VDC. VHL Min: 5.9 VDC</td>
18491851
</tr>
18501852
<tr>
18511853
<td style="vertical-align: top;">Digital Input current</td>
1852-
<td>4.12mA at 24V | 2.05mA at 10V</td>
1854+
<td>4.12mA at 24 V | 2.05mA at 10 V</td>
18531855
</tr>
18541856
<tr>
18551857
<td style="vertical-align: top;">Digital Input frequency</td>
@@ -2020,7 +2022,7 @@ LL LL LL LL LL HH LL LL LL LL LL LL LL LL LL LL
20202022

20212023
![Digital Input wiring example](assets/limit-switch.gif)
20222024

2023-
***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.***
2025+
***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.***
20242026

20252027
#### Analog
20262028

@@ -2034,7 +2036,7 @@ LL LL LL LL LL HH LL LL LL LL LL LL LL LL LL LL
20342036
<tbody>
20352037
<tr>
20362038
<td style="vertical-align: top;">Analog Input voltage</td>
2037-
<td>0...24V </td>
2039+
<td>0...24 V </td>
20382040
</tr>
20392041
<tr>
20402042
<td style="vertical-align: top;">Analog Input resolution</td>
@@ -2226,15 +2228,15 @@ The **Ext D1608E (EMR)** variant features 8 electromechanical relays with the fo
22262228
</tr>
22272229
<tr>
22282230
<td style="vertical-align: top;">Max current per relay</td>
2229-
<td>6A</td>
2231+
<td>6 A</td>
22302232
</tr>
22312233
<tr>
22322234
<td style="vertical-align: top;">Max peak current per relay</td>
2233-
<td>10A</td>
2235+
<td>10 A</td>
22342236
</tr>
22352237
<tr>
22362238
<td style="vertical-align: top;">Continuous current per terminal</td>
2237-
<td>6A</td>
2239+
<td>6 A</td>
22382240
</tr>
22392241
<tr>
22402242
<td style="vertical-align: top;">Short-circuit protection</td>
@@ -2257,12 +2259,12 @@ The **Ext D1608E (EMR)** variant features 8 electromechanical relays with the fo
22572259
<td>300 VA</td>
22582260
</tr>
22592261
<tr>
2260-
<td style="vertical-align: top;">Breaking capacity DC1: 24/110/220V</td>
2261-
<td>6/0.2/0.12A</td>
2262+
<td style="vertical-align: top;">Breaking capacity DC1: 24/110/220 V</td>
2263+
<td>6/0.2/0.12 A</td>
22622264
</tr>
22632265
<tr>
22642266
<td style="vertical-align: top;">Minimum switching load</td>
2265-
<td>500mW (12V/10mA)</td>
2267+
<td>500 mW (12 V/10 mA)</td>
22662268
</tr>
22672269
<tr>
22682270
<td style="vertical-align: top;">Max output line length (unshielded)</td>

0 commit comments

Comments
 (0)