How to quickly build an intelligent fan control system for a production line workshop using the MPC-ZC1 industrial control board

Publisher:灵感发电站Latest update time:2022-10-09 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

EsDA empowers the smart factory system. The MPC-ZC1 industrial control board is combined with the ZLM3100S high-power motor driver to quickly build an intelligent fan control system for the production line workshop.


Introduction

This article is based on EsDA MPC-ZC1 application - IoT monitoring and control system (Part 2), applies the solution to the actual factory temperature detection and control system, and further improves the application.


Business Expansion

The new business mainly includes the following two aspects:

1. High-power fans The original fan equipment was replaced with high-power fans for the factory, and the fan equipment matched with the new generation industrial fan driver ZLM3100S launched by Zhiyuan Electronics was selected.

The maximum output power of the driver is up to 1KW, and the speed supports 500~1320 RPM. At the same time, it can monitor the motor status in real time, such as overvoltage, overcurrent, stall, bus voltage, IPM temperature and other data.


Motor control and status reading are achieved through RS485 Modbus RTU communication.


2. Cloud Configuration UI ZWS IoT platform provides an online configuration module, users can easily build their own UI interface. 2eda974c-3eef-11ed-9e49-dac502259ad0.png * Detailed information https://www.zlgcloud.com:20000/web/#/5?page_id=48 1. System Block Diagram In terms of hardware, the DO fan control in the previous issue is replaced with the high-power fan ZLM3100S. Since ZLM3100S and the temperature and humidity sensor use RS485 Modbus RTU communication, the two devices can be connected in parallel to the same bus interface and distinguished by configuring them with different slave addresses.

2f021312-3eef-11ed-9e49-dac502259ad0.png

2. Fan control To control the ZLM3100S high-power motor, you need to use two nodes: zlm3100s_in and zlm3100s_out. 1. Node introduction 1.1 zlm3100s_in The zlm3100s_in node implements the function of periodically obtaining the motor status. 1.1.1 Properties

2f1e91e0-3eef-11ed-9e49-dac502259ad0.png

Name: Node name, used to index and find this node;

Display Name (displayName): The name displayed on the canvas;

Modbus configuration parameters (modbus): Bind a Modbus RTU configuration node;

Slave ID (slave_id): Motor device slave address;

Output period (period): The polling period for reading the motor status.

1.1.2 Output

start: The start/stop state of the motor, start is "on" and shutdown is "off";

rpm: motor set speed value, unit: rpm;

devaddr: Modbus RTU slave address;

minrpm: minimum permissible speed, in rpm;

maxrpm: maximum operating speed, in rpm;

starthold: the time to hold the machine in stop mode before starting (in seconds);

aispeed: analog speed control enable (1: enable, 0: disable);

devnum: device number;

overvol: overvoltage protection limit, unit V;

undervol: undervoltage protection limit, unit V;

overtemp: high temperature protection limit, unit: Celsius;

maxerr: maximum number of fault tolerances;

errperiod: fault tolerance clearing period;

errwait: error waiting time (seconds);

pwrlimit: power limit (W);

errcode: error code;

actrpm: actual speed, in rpm;

ipmtemp: IPM temperature, in degrees Celsius;

errcnt: number of errors;

sysrunTIme: system running time, in seconds;

focrunTIme: motor running time, in seconds;

state: system status;

iq: torque current (mA);

ia: A phase current (mA);

ib: B phase current (mA);

ic: C phase current (mA);

ubus: bus voltage, in millivolts;

cpuload: CPU load;

fwver: firmware version;

bTIme: firmware compilation time;

uid: device unique ID.

* ZLM3100S provides a rich register interface, please refer to the product user manual for details. 1.2 zlm3100s_out 1.2.1 Properties 2f2ad856-3eef-11ed-9e49-dac502259ad0.png

Name: Node name, used to index and find this node;

Display Name (displayName): The name displayed on the canvas;

Modbus configuration parameters (modbus): Bind a Modbus RTU configuration node;

Slave ID (slave_id): Motor device slave address;

Error retry times (retry_TImes): Maximum number of communication error retries.

1.2.2 Input

start: motor start control, “on”: start, “off”: stop;

rpm: Set the motor speed, unit: rpm;

devaddr: Set the motor Modbus RTU slave address;

minrpm: Set the minimum allowable speed, in rpm;

maxrpm: Set the maximum operating speed, in rpm;

starthold: Set the stop time before starting (seconds);

aispeed: analog speed control enable (1: enable, 0: disable);

devnum: set the device number;

overvol: Set the overvoltage protection limit, unit V;

undervol: set undervoltage protection limit, unit V;

overtemp: Set the high temperature protection limit in degrees Celsius;

maxerr: Set the maximum number of fault tolerances;

errperiod: Set the fault tolerance clearing period;

errwait: Set the error waiting time (seconds);

pwrlimit: Set the power limit (W).

2. Control Verification 2.1 Fan Control Try to start the fan directly. 2.1.1 Add Nodes Add zlm3100s_out, timer, and fscript nodes, as shown in the figure below. 2f45b180-3eef-11ed-9e49-dac502259ad0.png 2.1.2 Configure Nodes

Double-click the zlm3100s_out node to open the configuration window and configure it as shown in the figure below.

2f653046-3eef-11ed-9e49-dac502259ad0.png

Modbus configuration parameters (modbus): Shares a configuration with the temperature and humidity sensor;

Slave ID (slave_id): The slave address here is 7 (depending on the actual situation).

The control script is as follows, which directly starts the fan.

2f745760-3eef-11ed-9e49-dac502259ad0.png

2.1.3 Download Flowchart Click to download flowchart.

2f845890-3eef-11ed-9e49-dac502259ad0.png

It can be seen that the fan starts normally, and as the speed increases, the blinds are gradually blown up.

2f99cf0e-3eef-11ed-9e49-dac502259ad0.gif

* The default speed is 1320 RPM and the startup waiting time is 20 seconds.

2.1.4 Merge Flow Graph Add the zlm3100s_out node to the previous flow graph, replacing the original GPIO fan control node, as shown below. 30cd8de8-3eef-11ed-9e49-dac502259ad0.png

Double-click the Smart Controls script node and adjust it as shown below.

30ea057c-3eef-11ed-9e49-dac502259ad0.png

Adjusted script.

if (global.fan_control == "on") {
/* Manual start */ msg.start =
"on"
} else if (global.fan_control == "off") {
/* Manual stop */
msg.start = "off"
} else {
if (global.high_temp_anomaly == true) {
/* Automatic start at high temperature anomaly */
msg.start = "on"
} else {
/* Automatic stop at normal temperature */
msg.start = "off"
}

}

2.1.5 Download flow chart

2f845890-3eef-11ed-9e49-dac502259ad0.png

By externally heating the sensor until the default high temperature warning value (30°C) is exceeded, the alarm LED can be seen to light up and after about 20 seconds, the fan starts automatically.

Send a fan start command through the cloud to manually start the fan.

2.2 Read Status Try to read the motor status. 2.2.1 Add Nodes Add zlm3100s_in, to_json, and log nodes to the flow graph, as shown in the figure below.

31147a6e-3eef-11ed-9e49-dac502259ad0.png

2.2.2 Node Configuration Double-click the zlm3100s_in node to open the configuration window and configure it as shown below.

3141a4ee-3eef-11ed-9e49-dac502259ad0.png

Modbus configuration parameters (modbus): Shares a configuration with the temperature and humidity sensor;

Slave ID (slave_id): The slave address here is 7 (depending on the actual situation).

2.2.3 Download the flow chart and run the motor online.

31500110-3eef-11ed-9e49-dac502259ad0.jpg

Download complete.

2f845890-3eef-11ed-9e49-dac502259ad0.png

It can be seen that the status of the motor is read while obtaining the temperature and humidity.

317fa618-3eef-11ed-9e49-dac502259ad0.png

2.2.4 Reporting fan status

In order to view the status of the fan in the cloud, it is necessary to report the status of the fan to the IoT cloud platform. Here, choose to report the actual speed (actrpm) and IPM temperature (ipmtemp) of the fan.

Add a sync node to the temperature and humidity collection and report data nodes to synchronize temperature, humidity and click status data to ensure that the data is reported to the cloud platform synchronously.

319b336a-3eef-11ed-9e49-dac502259ad0.png

The sync node configuration is as follows.

31bcc9ee-3eef-11ed-9e49-dac502259ad0.png

Add IPM temperature and fan speed data points to the reporting data node.

31c835ae-3eef-11ed-9e49-dac502259ad0.png 2.2.5 ZWS Add Data Points According to the method in the previous issue, add new data points for MPC-ZC1 on the ZWS cloud platform, as shown in the figure below. Add the fan IPM temperature status.

31d8441c-3eef-11ed-9e49-dac502259ad0.png

Add actual fan speed.

31f115e6-3eef-11ed-9e49-dac502259ad0.png

The final data points are as follows.

3200c6f8-3eef-11ed-9e49-dac502259ad0.png

2.2.6 Download Verification

Download the flow chart. 2f845890-3eef-11ed-9e49-dac502259ad0.png

Remote start of the fan.

321a60cc-3eef-11ed-9e49-dac502259ad0.png

2f99cf0e-3eef-11ed-9e49-dac502259ad0.gif

View data in the cloud.

33633170-3eef-11ed-9e49-dac502259ad0.png

3. Cloud Configuration

1. Create a configuration

Click Data Management -> Configuration Application to enter the Configuration Application page.

337c2bd0-3eef-11ed-9e49-dac502259ad0.png

Click Add Configuration.

33872652-3eef-11ed-9e49-dac502259ad0.png

Enter a name for the configuration application.

339c2f16-3eef-11ed-9e49-dac502259ad0.png 2. Design UI Enter the configuration editing page. 33b9364c-3eef-11ed-9e49-dac502259ad0.png

Select industrial components.

33c63b76-3eef-11ed-9e49-dac502259ad0.png

Add two scale components to display temperature and humidity.

33d3064e-3eef-11ed-9e49-dac502259ad0.png

Add text description for the scale.

33ea56c8-3eef-11ed-9e49-dac502259ad0.png

Bind data points to the controls (for humidity controls, bind humidity data points).

33f877d0-3eef-11ed-9e49-dac502259ad0.png

Click Run to see the effect.

340834b8-3eef-11ed-9e49-dac502259ad0.png

Get the temperature and humidity of MPC-ZC1 in real time.

34261488-3eef-11ed-9e49-dac502259ad0.png

Add a switch control.

344fe164-3eef-11ed-9e49-dac502259ad0.png

Bind fan control commands.

3464d2fe-3eef-11ed-9e49-dac502259ad0.png

Click Run to view the effect, and send the start command by clicking the switch control.

3475c0fa-3eef-11ed-9e49-dac502259ad0.png

3. Beautify and save

Following the above steps, continue to add fan controls, bind fan speed data points, add text controls, bind IPM temperature, and finally beautify the design. 35bad61c-3eef-11ed-9e49-dac502259ad0.png

4. Completion

So far, the access of high-power wind turbines and cloud configuration design have been completed. It can be initially applied in actual scenarios and all business development of IoT detection and control systems has been completed. The final flow chart is shown below.

35cf336e-3eef-11ed-9e49-dac502259ad0.png

In actual applications, the number of fans is far more than one. You can follow the above process to copy and add more fan control nodes and remote configuration controls, as shown below.

35ed44f8-3eef-11ed-9e49-dac502259ad0.png


Reference address:How to quickly build an intelligent fan control system for a production line workshop using the MPC-ZC1 industrial control board

Previous article:How to parse and convert Modbus-RTU and Modbus-TCP protocols
Next article:PLC definition/classification/function/application field/basic structure/working principle

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号