MQTT data acquisition with the AD-SWIOT1L-SL

View table of contents

RoadTest: Review the ADI Software Configurable I/O Device Evaluation Board

Author: pandoramc

Creation date:

Evaluation Type: Development Boards & Tools

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?: NI DAQ, MCC OEM

What were the biggest problems encountered?: The MQTT vesion does not supported by all the brokers and the network configuration.

Detailed Review:

The AD-SWIOT1L-SL requires an external power source to operate. In addition, its case has a special feature, this is the DIN rail molded supports. Considering these characteristics, all the components are mounted on a DIN rail for easy mounting and wiring. On the other hand, the power source must be out 24V, this is reached with a Schneider power source, used in other projects Wink, and it is adjusted for the correct board functionality.
Output voltage measuring in the power supply
Once the power source is validated on the operation conditions, the rest of connections using ferrule elements to avoid issues with the wire movement during the tests. The final mount consists in the usage of the main board, the MAX32625PICO for programming and serial port monitoring, and the 10BASE-T1L to USB adapter board for the use of MQTT-based firmware.
Available communication interfaces
In the first stage, the code is modified in order to catch the information as numeric values for an easy parsing, while the topic of MQTT is changed to retain the units that represents the numerical value viewed. To establish communication between the localhost and the board by MQTT, an MQTT broker is needed. The first test is made with the mosquitto broker, and we are able to publish and subscribe from the topics in the server, but it is not able to catch information from the AD-SWIOT1L-SL yet it is configured either fixed IP or dynamic IP. To solve it, another broker with better version support must be used. For this reason, I decided to implement the communication with the NanoMQ.
NanoMQ is a lightweight Cross-platform MQTT broker and is Fully MQTT 5.0/3.1.1 Compliant; these features allow a correct connection with the board. To use NanoMQ, the user requires the download of the platform and register in its environment variables path to simplify the console instructions. Once the NanoMQ is configured the following command must be used to start the communication of the MQTT broker and the MQTT devices in the same server.


nanomq start --conf C:\nanomq\config\nanomq_bridge.conf

The command will start the service of MQTT in the system as a bridge for device publication and subscript of topics available in the server. The nanomq_bridge.conf file has a default configuration to operate as a bridge in the 1883 port, but you can create your own configuration file according to the necessity.
For monitoring, the MQTT Explorer application runs an GUI for easy visualization of the data transmitted. For the connection is sufficient with localhost server and 1883 default port to connect to MQTT broker. For first impressions, the topics created by the AD-SWIOT1L-SL are shown below, and you are able to observe that the units are available in the topic while the numeric value is published for easy parsing as mentioned before.

Data readings

For each data acquisition challenge you are able to connect the sensors in a pair of terminals. for this time, an RTD PT100 sensor is connected to the channel 2 since it is configured as resistance measure as default.

Sensor connection

For the experiment to test the response of the PT100 in Ohms, a cold water bag and a hot water cup.

Experiment setup

The process consist of the room temperature acquisition, wait a pair of seconds, sample the falling edge with the cold water up to no observable changes. Finally, the rising and falling edge with both containers is made to get the sensor response.

Sensor response

The future work consist in the mounting of a lab stage to improbe the sensor characterization and calibrate to standard PT100 response to obtain a funtion to get temperature according the resistance measured.

Anonymous