You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/07.opta/opta-family/opta/tutorials/18.smart-compressor-app-note/content.md
+75Lines changed: 75 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,14 +58,89 @@ The goal of this application note is to showcase the Opta PLC capabilities on le
58
58
59
59
## Compressor Monitoring System Setup
60
60
61
+
The electrical connections of the intended application are shown in the diagram below:
62
+
63
+
![Electrical connections of the monitoring system]()
64
+
65
+
The Opta PLC will be powered with an external 24 VDC power supply connected to it's screw terminals `+` and `-` respectively.
66
+
67
+
![Opta power supply connection]()
68
+
69
+
The current, temperature and pressure sensors will be connected to inputs `I1`, `I2` and `I3` respectively.
70
+
71
+
![Sensors connection]()
72
+
73
+
The power relay will be connected to the Opta relay output 1 as follows:
74
+
75
+
![Power relay connection]()
76
+
77
+
The compressor power source will be wired through the power relay and the current sensor.
78
+
79
+
![Compressor power wiring]()
80
+
61
81
## Compressor Monitoring System Overview
82
+
The monitoring system for the compressor integrates the sensor data gathering, power control and cloud communication using the Opta WiFi connection.
83
+
84
+
The Opta is responsible for reading the sensors and uploading their data to the Cloud, also for controlling the power state of the compressor and sharing through Modbus TCP all the sensor information.
85
+
86
+
The Nicla Sense ME leverage it's internal IMU for anomalous vibration detection on the compressor motor and connects through BLE with the Opta for vibration status sharing.
87
+
88
+
![Compressor Monitoring System]()
62
89
63
90
### Sensors Deployment
91
+
92
+
- The **Current Sensor** alongside the grid voltage will help us measure the compressor power consumption for monitoring and overcurrent detection. It will be placed hooked in the compressor AC power line.
93
+
- The **Temperature Sensor** will measure the compressor electric motor temperature for monitoring and high temperature detection. It will be fixed to the compressor motor.
94
+
- The **Pressure Sensor** will measure the compressor air pressure for monitoring and high pressure detection. It will be screwed in the compressor tank pressure output.
95
+
- The **Nicla Sense ME** will detect anomalous vibrations. It will be fixed to the compressor motor and powered with a battery or external power source.
96
+
64
97
### Anomalies Detection
98
+
99
+
Every sensor will be used for anomalies detection, if any measured variable exceeds its nominal range an anomaly alert will show up in the Arduino Cloud dashboard.
100
+
101
+
The sensors nominal threshold are difined in the code as follows:
102
+
103
+
```arduino
104
+
#define CURRENT_LIMIT 12 // in Amps
105
+
#define PRESSURE_LIMIT 8 // in Bar
106
+
#define TEMP_LIMIT 85 // in Celsius
107
+
```
108
+
65
109
### Modbus TCP data output
110
+
111
+
The Opta will detect if an ethernet cable is connected to its included RJ45 terminal and will start sending the measured sensor data through Modbus TCP to a defined server address.
112
+
113
+
The variables will be sent to the registers in the following order:
114
+
115
+
|**Address**|**Sensor**|
116
+
| :---------: | :---------: |
117
+
| 0x00 | Temperature |
118
+
| 0x01 | Power |
119
+
| 0x02 | Pressure |
120
+
| 0x03 | Current |
121
+
122
+
***As the Modbus Holding Registers are __uint16_t__ the data sent should be a positive integer between 0 and 65535, for this reason the data is sent multiplied by a 100 factor. This way a measured temperature of 42.5 C will be sent as 4250.***
123
+
66
124
### Opta Code
125
+
126
+
You can download the code for the Opta PLC [here]().
127
+
128
+
Let's go through some important code sections to make this application fully operative; starting with the required libraries:
129
+
130
+
- ArduinoBLE.h
131
+
- Ethernet.h
132
+
- ArduinoModbus.h and ArduinoRS485.h
133
+
- ArduinoIoTCloud.h
134
+
- Arduino_ConnectionHandler.h
135
+
136
+
There is a header included in the project code for the Arduino Cloud configuration:
0 commit comments