The digitization of the automated steel construction through the application of microcontrollers and MQTT

Data acquisition and transfer are crucial aspects of the digitization and automation of construction workflows. Through the integration of microcontrollers in machinery, a multitude of data can be acquired and analyzed to adapt fabrication processes and optimize performance. The goal of this research was to develop connected multi-functional robotic systems that can transfer data across a wireless network through MQTT, a robust and lightweight IoT communication protocol. This research demonstrates a use case for such interconnected robotic technology by establishing wireless communication through MQTT between a mobile robot and a plasma cutting station. A microcontroller was utilized in the digitization and automation of this steel construction process to obtain, process and transfer the data in a way that was monitorable and storable for managing and optimizing workflows.


Introduction
This research demonstrates a solution for the use of microcontrollers and the MQTT protocol to enable data acquisition and transfer in the automation process of steel construction. Section 1 reviews the state of the art. Section 2 briefly introduces the steel process, from design to construction, as an application scenario for automation and digitization. Automated plasma cutting is detailed as a reference scenario for an IoT enabled workstation. Section 3 documents the process of data acquisition from the plasma cutting and the optimization of cutting performance. Section 4 demonstrates how MQTT works with the data transfer between robots and various stations to build up multi-functional communication methods for automated fabrication.

IoT in manufacturing industry
The manufacturing industry often addresses the growing demand for production by increasing levels of automation in fabrication. As the need for more individualized production increases, robots should be able to perform in a more multi-functional manner to achieve increasingly complex sequences of tasks.
According to individual tasks, the production line should be able to change its operation program or production layout without a long downtime in manufacturing that timeconsuming commissioning often entails. In addition to this increased flexibility, the production line should act as a source of information to help estimate and improve the efficiency of the overall project. The production line should have the ability to recognize and report process parameters, errors and defects automatically to intercept wasteful behaviour as early as possible. The concept of Industry 4.0 (I4.0) combined with the IoT, represents frameworks for networking factory equipment, while interconnecting enterprise, business and shop floor systems (Tukade and Banakar 2018). The objective is that the process data is digitized and the manufacturing system is intelligently networked (Newman 2017). 1 Individualized Production in Architecture, Rheinisch-Westfalische Technische Hochschule Aachen, Aachen, Germany 1 3 The path towards realizing this concept for manufacturing is digital transformation, in which the digitization of the process is the crucial start. Once the process is digitized, all the necessary data can be accessed and collected for the use of advanced technology (Fusko et al. 2018). In many cases of factory upgrade, data acquisition and transfer is one of the first steps of digitization. Afterwards, the optimization of machine performance, automated workflows, defect management and intelligent decision making will be based upon the collected data to complete the digitization network. Achieving this requires a foundation of data acquisition and communication.

MQTT communication protocol
The IoT can function as an efficient communication environment. Current IoT standards and protocols provide solutions for consistent communication between the devices. There are several popular IoT protocols that are suitable for wireless data transfer in manufacturing. These include such examples as CoAP, AMQP and MQTT (Tukade and Banakar 2018).
Message Queuing Telemetry Transport (MQTT) is one of the IoT wireless message protocols, which is designed with a focus on being lightweight both in size of the implementation and in network bandwidth. This preordains it for the use in slow and unstable networks with a multitude of devices, ranging from embedded applications, microcontrollers, robots to full-fledged desktop computers. An early demonstration of the benefits of MQTT utilized minimal energy and bandwidth to connect oil pipelines over satellite connection (Ansari et al. 2018).
Message Queuing Telemetry Transport (MQTT) transfers messages through MQTT broker, a central server, over TCP using Publisher-Subscriber structure. The advantages of MQTT over other protocol, such as HTTP or CoAP, are (a) easy implementation on software and hardware, (b) lightweight communication between clients with QoS (Quality of Service) levels for message repetitiveness, (c) simple extension options for networking, (d) the possibility to operate over many network technologies, such as TCP, Bluetooth or LoRaWAN, which have been widely applied in the automation industry and smart city.
The digital transformation of the construction site shares many of the same challenges as found in the digitization of manufacturing. The construction machinery market is an established supply chain focused on traditional methods of production. While researchers are looking at producing new digitally enabled machinery, there is a large segment of equipment currently in place which can still be empowered with IoT concepts. The MQTT protocol allows for the integration of Construction 4.0 principles by being implemented on various MCUs and a wide range of platforms to add inter-connectivity to existing machines. This paper demonstrated this transformation by adding an IoT layer to the automation of plasma cutting steel with a mobile robot.

Automation of steel construction
As a building material, steel has many desirable characteristics from structural integrity to relative cost and speed of construction (Whirlwind Team 2016). In steel construction, it is common to prefabricate components for on-site assembly. This reduces on-site construction costs and time, simplifying the entire construction process from logistics to storage and from assembly to decommissioning and recycling. Although steel prefabrication improved construction efficiency, a lot of manual work still needs to be done on site, from delivering the components to assembly position, to bolting or welding for fixing in place. While prefabrication has integrated a high degree of automation, the construction industry has not transferred automation technology on site to digitize processes. One of the challenges of integrating automation on construction sites is the need for mobile robots able to communicate between stations without physical connections. This research addressed this need by integrating IoT communication into a mobile-robot-based steel construction demonstrator.
Inspired by the state of the art automation solutions, this research sought to bridge the gap between automation and construction. Projects working to adapt the automated steel construction processes from prefabrication to the construction field include: the SMART system (Shimizu Co.), ABCS system (Obayashi Co.), AMURAD system (Kajima Co.) and more. The Robotic Beam Assembly (RBA) system, which was developed by a research team-Robotic Construction Automation (RCA), aimed to advance the automated assembly of steel construction based on robotic cranes (Jung et al. 2013). The RBA system consists of a human-machine interface (HMI) for the operation of an integrated system, a robotic bolting device and robotic transport mechanism. The communication between stations is accomplished through TCP/IP. Every operating message is sent out by the host PC in the command center and each station sends messages back to the center for status update, such as position and speed. With these improvements, the RBA system saves 14% work time compared to skilled workers (Jung et al. 2013).
It is clear that integrating new forms of digital communication creates opportunities for optimization based on the real time exchange of process information. This research sought to build on this concept and utilize MQTT to realize similar potentials for collecting and communicating data.

Evolution of the fabrication process
This research had its beginning in an international workshop where students have explored robot-assisted plasma cutting and assembly. In this context, a stationary robot (KUKA Agilus 900), assisted the students in positioning steel plates in custom positions. The students would then manually plasma cut along the jig with the robot providing the correct customized angle according to the digital model. After cutting the robot moved the sheet metal into place for welding at compound angles (Fig. 1a). Communication between the user and robot was controlled through teaching mode so that the student could pause the program at appropriate stages where user interaction was required. The process was parametric, mass-customizable and semi-automated, however, still required a large degree of human interaction in the control of the machine (Dai et al. 2019).
After the workshop, the research team improved the process by increasing the levels of automation in the workflow. The goals of development focused on automating and improving the quality and complexity of the cut. In the initial workshop, the cutting was restricted to a straight line as the student would pull the plasma cutter along a cut guide. To improve this, the plasma cutter was automated, allowing the torch to be turned on and off by the script in Rhino|Grasshopper. The torch was mounted as an end effector on a six-axis robot arm enabling the complex cutting (Fig. 1b). To enable wireless communication, a control box utilized UDP was made for sending real time commands from user to robot, such as turning the plasma cutter on and off, varying the speed of the robot and the distance between the cutting torch and steel plates. However, the processes still required manual adjustment. Additionally, the status of work stations was not logged, which resulted in difficulties tracking the process history to determine which parameters resulted in which quality cuts. Therefore, the team decided that more research was needed to improve the process further.
The IoT protocols enabled machines to communicate in a distributed network thereby increasing the potential for robust processes and multi-functional robotics. The KMR iiwa has an integrated WiFi module intended for transferring program files over the network instead of having to use a USB stick. To increase the degree of digitization of the steel fabrication process the built-in WiFi was used for networking and communicating with additional MQTT-enabled stations. Through a robotic visual programming plug-in for Rhino|Grasshopper-IDAA framework (Stumm 2018;Devadass et al. 2019), the iiwa mobile robot was programmed to pick up steel material from one workstation and bring it to the second station for cutting (Fig. 1c). The plasma cutting station has integrated automatic calibration with ohmic sensing and a linear axis for arc voltage height control to ensure a proper cutting distance between torch and plate. The performance-related data could be collected by embedded MCU, stored, analysed and visualized in monitoring station via MQTT.

Workflow of the fabrication process
The automated steel construction process utilized IoT to connect a mobile robot to various stations for accomplishing a variety of fabrication processes (Fig. 2). Four workstations were utilized: a mobile robot station with WiFi transmitter, an automated plasma cutting station, a manual welding station (which is scheduled to be automated in the next phase) and a process monitoring station. The fabrication began with a rule-based design shaped by various parameters, such as the function of the design, work range of the robot arm, constraints of the workspace setup, size of the steel material and structure performance. The algorithm provided early design feedback while allowing the user to iterate through global design options and immediately generate robot code for each local design fabrication. The local designs can be considered as the components derived from the global design. The fabrication system looped until all the local designs were fabricated. A message broker-a part of Eclipse Mosquitto 1 -that implements the MQTT protocol was installed on the KUKA Sunrise 2 system of the KMR iiwa, so that the mobile robot acted as the server for all devices connected to it. All the data transfers were realized in such a manner in this paper.
When the mobile robot brought a piece of metal to the cutting station, the robot sent out a message to inform the station: ready to cut. The cutting torch would first detect the metal surface and then move to a predefined distance away from the metal as a start position. After this, the cutting itself was started. During the cut, the plasma cutter output the arc voltage which the microcontroller then fed into a feedback loop on how to adjust the position of the torch by a linear axis. Further details on the cutting automation was given in Sect. 3. The monitoring station was designed to plot a live graph of the process data: arc voltage, motor position and the output of the PID feedback loop. Data visualization enabled debugging and optimization of the PID settings. This data was capable of being exported for future processing, for example, comparing the results of different settings Fig. 2 Digitization of steel construction workflow from design to production to optimize the process parameters (see Fig. 4). After the plasma cutting was done, the robot received a message to continue to the welding station. The operator was notified on their smartphone or mixed reality headset (in this case a Microsoft HoloLens) that the robot was in position and ready for welding. After this part was done, it was the workers turn to report the task as completed. This process was repeated piece by piece until one component was finished. The monitoring station observed the status of the interconnected devices, whether online or offline, and whether processes has started or stopped.
The digital communication between workstations has been realized by MQTT embedded in the system of each workstation. By simply publishing and subscribing to specific topics, the workstations connected to the same broker have formed a communication network to receive and send valuable data. The network method also enabled the potential of remote communication between workstations, which are not in the same location but connected to the same broker.
While the KMR mounted iiwa is limited to refined floor surfaces, the foundation of this approach allowed for future research to integrate mobile platforms capable of handling the more rugged terrain presented by construction sites.

Automation and digitization of plasma cutting
The use of microcontrollers for machine interaction is a well established practice, which also found its application for automating and digitizing the plasma cutter. 3 The choice fell on a Teensy 3.5 Board, 4 which uses a fast microprocessor, reducing the chance of it being a bottleneck for the required calculations. The device connected with the WiFi network provided by the KMR iiwa and used it to communicate with other devices via MQTT. Another connection was established by the use of the manufacturers Machine Interface Cable [Hypertherm Inc (2020), p. 104]. It allowed for communication between the Teensy and the plasma cutter. This also made interfacing with the plasma cutter accessible by other devices, for example turning it on and off, gathering process data for optimization and so on. The plasma cutter's interface provided the trigger signal, the arc voltage as well as an Arc okay signal, telling if the plasma arc was stable. Further data gathering was achieved by adding ohmic contacts to both the torch and the work lead clamped on the steel table. When the torch would touch the work piece laying on said table, the closure of the circuit was detected by the board. This was used to set the start position of the torch. Additionally, a linear axis which holds the torch was controlled by Teensy to move the torch closer or farther away from the work piece (see Fig. 3).
Since the distance corresponds with the voltage and the cutting quality, varying the distance to keep the voltage steady resulted in a consistent cutting result. An option would be adapting the predefined path of the torch-holding robot, but the use of the linear axis mounted between the plasma cutter and the arm of the KUKA Agilus allowed for an easier programming approach since it bypassed having to adapt the robot in real-time. Instead of having to work inside the robots framework, the linear axis was easily controlled by the use of a stepper motor library 5 . These data points were feed into a PID feedback loop to automatically adjust the proper distance from the surface of the steel during the process to ensure a proper cut and avoid colliding with the surface due to the deformation from heat (Dai et al. 2019).

The application of MQTT for data transfer between workstations
MQTT is utilising a central broker to exchange messages between various clients. The exchange is organized by topic, an UTF-8 string assigned to any message published via the protocol. Each client can subscribe to the topics. Often topics are subdivided into multiple levels by slashes /, making an ordered, hierarchical system for complex applications easy.
The protocol built upon MQTT is intended to be extendable. Therefore, instead of a fixed set of commands and statuses each device has its own internal state machine which can be influenced by outside requests. The controlling client can send a request to another member in the same network, which then decides what action to take.
MQTT's subscription functionality makes it very easy to continuously poll the status of each individual client.
To simplify the detection of other active clients all devices broadcast their presence in the network periodically. The sample implementation builds upon the advantages of MQTT itself; it is just over a hundred lines of Python code and was already adapted to other devices, including ESP32s and multiple other Arduino-compatible boards.

Steps of implementation
The first step for robot-plasma communication was using a digital I/O unit built into the KMR iiwa. To utilise the full movement of the iiwa all communication was routed through its inbuilt wireless network. The start/stop signal was sent via UDP packages. Since the PCB for plasma cutting was not designed with a WiFi connection in mind, a laptop was used as a middleman, relaying the commands over the serial interface. However, all the information was sent out and gathered only by the laptop, so no communication between other devices was possible. In addition, some data were observed to be lost via UDP, which is a downside over the more reliable but slower TCP. The limited capabilities of this approach encouraged the researchers towards a switch to reliable and fast MQTT protocol.
In this research, the KMR iiwa was the mobile platform which traveled around workstations. The platform used its own built-in WiFi technology to interface with nearby devices during its movement. Consequently, the MQTT library Mosquitto was implemented with the sunrise system on the KMR iiwa, enabling it to act as the broker for the network. Nevertheless, every device could be used as the message broker depending on the workflow, for example when using another robot without built-in WiFi capabilities. Even the end effector of the robot can be triggered by topics without connecting to the robot I/O, so that the end effector could be used autonomously or by any robot regardless of the provided connectability. In the steel fabrication workflow, the plasma cutting station, the welding station and the monitoring station were the clients, which subscribed and published topics from and to each other. Tasks of the workstations were activated by receiving subscribed topics and the status of devices were published to the monitoring stations, which used a timeline to record the history. Table 1 and Fig. 5 show the communication network used for this research.

MQTT for 3D modeling software
One of the main goals of this research was to build a digital data flow from design to construction. The above mentioned IDAA framework has provided a designer-friendly interface which allowed designers to visually program the mobile robot in 3D modeling software. A prior research has been done to search for an existed Grasshopper-plugin that allows the designer to use MQTT in the design software. However, the Grasshopper-plugin called GHMQTT 6 only allowed user subscribe but not publish to topics, which was not suitable for live time interaction.
As a result, an advanced grasshopper plugin has been developed for the use case in this research (Fig. 6). The user was able to receive live time process and sensor data to update the design and scheduled tasks as well as send commands and data back to machinery or microcontrollers for operation and process management and so on, while previously multiple tools were needed to realize the crossplatform communication. This MQTT grasshopper plugin will be published with more functions such as options for the Quality of Service and Last Will on the platform of Food4Rhino 7 .
Thanks to the easy implementation of MQTT, various software and devices on different platforms can use one language to talk to each other. At this point, no manual operation is remaining in the workflow. This approach enabled the research to have an easily extendable system for a multitude of applications involving design and manufacturing processes.

Outlook
This paper has explored IoT and MQTT implementations to automate and digitize a steel construction process. The implementation was focused on creating a scalable and multifunctional solution so that more workstations or functions could easily be integrated into the process. Future research will continue to develop these interconnected systems. Next steps include using a cloud broker to share the information online further extending the interconnectedness of the network past the boundaries of the shop or construction site.
By creating the foundation for a scalable, interconnected architecture of mobile robots and station-based fabrication, this research establishes the beginning of an automated  system which grows closer to meeting the requirements of construction robotics. IoT addresses these requirements by freeing robots from fixed positions and hardwired connections form the communication of process data. This research will continue to evolve, integrating additional processes in the future including more sensors and mobile robots capable of navigating construction site surroundings. Future developments will leverage cloud-based approaches to further expand the access to robotic construction and process data knowledge.
Funding Open Access funding enabled and organized by Projekt DEAL.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.