Skip to content

[PC-1396] Edge Control User Manual #2176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 48 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
569ddab
User Manual Folder created
mcmchris Sep 19, 2023
eb37a03
User Manual writing commit 1
mcmchris Sep 19, 2023
1f95891
Typo fix
mcmchris Sep 19, 2023
78e1552
User Manual writing commit 2
mcmchris Sep 19, 2023
75217f4
User Manual writing commit 3
mcmchris Sep 20, 2023
fcf731b
User Manual writing commit 4
mcmchris Sep 20, 2023
03f05b1
Images order change
mcmchris Sep 21, 2023
3c86be6
User Manual writing commit 5
mcmchris Sep 21, 2023
286ae85
User Manual writing commit 6
mcmchris Sep 21, 2023
63f9e25
User Manual writing commit 7
mcmchris Sep 21, 2023
2de52e2
User Manual writing commit 8
mcmchris Sep 25, 2023
ad925bf
User Manual writing commit 9
mcmchris Sep 25, 2023
981dc34
User Manual writing commit 10
mcmchris Sep 26, 2023
1235dfc
User Manual writing commit 11
mcmchris Sep 27, 2023
847b169
User Manual writing commit 12
mcmchris Sep 28, 2023
ef80511
Typo Fix
mcmchris Sep 28, 2023
9b00ef0
User Manual writing commit 13
mcmchris Sep 29, 2023
a204411
User Manual writing commit 14
mcmchris Oct 1, 2023
2a69cce
User Manual writing commit 15
mcmchris Oct 2, 2023
0931f88
User Manual writing commit 16
mcmchris Oct 2, 2023
e92e598
User Manual writing commit 17
mcmchris Oct 2, 2023
34cf055
User Manual writing commit 18
mcmchris Oct 2, 2023
0b6adef
User Manual writing commit 19
mcmchris Oct 3, 2023
0633987
User Manual writing commit 20
mcmchris Oct 3, 2023
adcf89b
User Manual writing commit 21
mcmchris Oct 3, 2023
c14d841
Final commit 22
mcmchris Oct 3, 2023
77cbfe2
Typos fix 1
mcmchris Oct 3, 2023
bb92359
Typos fix 2
mcmchris Oct 3, 2023
782d985
Typos fix 3
mcmchris Oct 3, 2023
7edf283
Typos fix 4
mcmchris Oct 3, 2023
5591243
Punctuation fix 1
mcmchris Oct 3, 2023
1d570fb
Rephrase fix 1
mcmchris Oct 3, 2023
f2cafdd
Typos fix 5
mcmchris Oct 3, 2023
b323fcf
Structure fix 1
mcmchris Oct 3, 2023
c547763
Gif size update
mcmchris Oct 3, 2023
b50ee27
Checking if spell fixes worked
mcmchris Oct 4, 2023
24bee1d
Edge Control Forum URL fixed
mcmchris Oct 4, 2023
acbb95d
Simple Pinout update
mcmchris Nov 20, 2023
466e33a
Tables update
mcmchris Nov 20, 2023
e32b6d5
I2C section extended
mcmchris Nov 20, 2023
c41a264
Metadata update to see preview
mcmchris Jan 24, 2024
898649a
Metadata update to see preview
mcmchris Jan 24, 2024
2ada41c
Merge branch 'main' into mcmchris/edge-control/user-manual
mcmchris Sep 16, 2024
962ab70
Merge branch 'main' into mcmchris/edge-control/user-manual
mcmchris Sep 16, 2024
bb192b2
Author name updated
mcmchris Sep 16, 2024
e03dd55
Taddy suggested changes 1
mcmchris Sep 17, 2024
f1f9894
Taddy review applied
mcmchris Sep 17, 2024
1d46666
Library note
mcmchris Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
User Manual writing commit 13
  • Loading branch information
mcmchris committed Sep 29, 2023
commit 9b00ef0e27dec639d16557cd578cfebb987c819a
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ The Edge Control can be powered by:
- Using a **12V lead-acid battery** connected to `BATT+` pin and `GND`. **It can be powered for up to 34 months on a 12V/5Ah battery**.
- Using a whole **off grid** power system including an **18V Solar Panel** and a **12V lead-acid battery**.

![Edge Control powered by external power supply](assets/ext-power-v2.png)
![Edge Control powered by external power supply](assets/ext-power.png)
![Edge Control solar and battery powered](assets/green-power-v2.png)

### Hello World Example
Expand Down Expand Up @@ -420,7 +420,7 @@ This is a brief explanation of the mathematical expression used inside the sketc

`float w_level = ((voltsReference / 220.0 * 1000.0) - 4.0) * 6.25;`

![4-20mA example wiring](assets/4-20mA-wiring.png)
![4-20mA example wiring](assets/4-20mA-wiring-v2.png)

```arduino
#include <Arduino_EdgeControl.h>
Expand Down Expand Up @@ -751,6 +751,8 @@ MEASURES - Median: 1891.00Ω - Average: 1884.95Ω - Lowest: 1815.00Ω - Highest:
14 CENTIBARS/kPa
```

***You can buy the Watermarkd sensor directly from our [store](https://store-usa.arduino.cc/products/soil-humidity-sensor-watermark-2-m-75-cm-pack-).***

## Outputs
### Latching Outputs

Expand Down Expand Up @@ -872,10 +874,140 @@ Relay.off(RELAY_CH01); // this command opens the channel 1 relay contacts
```
![AC load wiring through channel 1 relay contact](assets/relay-outputs.png)

### Power Outputs
The example code shown below closes and opens the first channel `Relay Contact` repetitively, turning on and off the connected load:

```cpp
#include "Arduino_EdgeControl.h"

// #define SSR_POLL

constexpr unsigned long onInterval = { 5000 };
constexpr unsigned long offInterval = { 5000 };
constexpr unsigned long pollInterval = { 1000 };
unsigned long offTime;
unsigned long onTime;
unsigned long pollTime;
bool on = false;

int relayChannel { RELAY_CH01 };

void setup()
{
Serial.begin(9600);
while (!Serial)
;

delay(2000);

Serial.println("Hello, SolidStateRelay!");

Power.on(PWR_3V3);
Power.on(PWR_VBAT);

Wire.begin();
Serial.print("Waiting for IO Expander Initialization...");
while (!Expander) {
Serial.print(".");
delay(100);
}
Serial.println(" done.");
Expander.pinMode(EXP_LED1, OUTPUT);

for (auto i = 0; i < 3; i++) {
Expander.digitalWrite(EXP_LED1, LOW);
delay(50);
Expander.digitalWrite(EXP_LED1, HIGH);
delay(100);
}

Relay.begin();
}

void loop()
{
if (millis() > onTime && !on) {
Serial.println("RELAY ON");

Relay.on(RELAY_CH01);

Expander.digitalWrite(EXP_LED1, LOW);

on = true;
offTime = onInterval + millis();
}

if (millis() > offTime && on) {
Serial.println("RELAY OFF");

Relay.off(RELAY_CH01);

Expander.digitalWrite(EXP_LED1, HIGH);

on = false;
onTime = millis() + offInterval;
}

#if defined(SSR_POLL)
if (millis() > pollTime && on) {
Serial.println("POLLING");

Relay.poll(relayChannel);

pollTime = millis() + pollInterval;
}
#endif
}
```

## Edge Control Enclosure Kit

![Edge Control Enclosure Kit](assets/EnclosureKit-low.png)

Designed for industrial and smart agriculture applications, the Arduino Edge Control Enclosure Kit is the perfect companion for Arduino Edge Control. It provides the module with a sturdy case that protects it from the elements, dust, and accidental blows. It is IP40-certified and compatible with DIN rails, making it safe and easy to fit in any standard rack or cabinet.

On top of this, the Arduino Edge Control Enclosure Kit features a 2-row/16-character LCD display with white backlight and a programmable push button, so it can be customized by users to instantly visualize sensor data, such as weather conditions and soil parameters. Different data can be displayed at every push of the button, on the spot and in real time, without requiring connectivity.

### LCD Control

The functions to control the LCD are mostly the same as the ones we are used to in the Arduino ecosystem.

We need to include the `Arduino_EdgeContro.h` library and then, initialize the LCD with the `LCD.begin(16, 2)` function and start printing data on it.

With `LCD.backlight()` and `LCD.noBacklight()` we can turn on or off the LCD backlight respectively.

To define the cursor position, `LCD.setCursor(x, y)` is used, and to clear the display, `LCD.clear()`.

To display text, we use the `LCD.print(text)` function.

The example code below prints "Edge Control" in the first row and starts a seconds counter in the second one:

```cpp
#include <Arduino_EdgeControl.h>

void setup() {

// set up the LCD's number of columns and rows:
LCD.begin(16, 2);
LCD.backlight();
// Print a message to the LCD.
LCD.home(); // go home
LCD.print("Edge Control");

}

void loop() {

LCD.setCursor(0, 1);
LCD.print(millis() / 1000);
delay(1000);
}
```
![LCD demo running the code from above](assets/LCD-demo.png)

### Push Button



## RTC

## Communication