# An Approach to Industrial Automation Based on Low-Cost Embedded Platforms and Open Software
## 1 Introduction  
Industrial automation is currently dominated by solutions which are implemented only with distributed controllers, such as programmable logic controllers. The programming of these devices is mainly based on the standard IEC 61131, which does not comply with the requirements of the object-oriented programming (OOP) approach of large-scale distributed systems. Since industrial control systems are not generic computing systems, OOP must comply with other requirements [1]: the direct configuration of I/O signals, multiparadigm programming, etc. Additionally, PLCs have limited processing capabilities, which could be a barrier to scaling their applications to more complex tasks. The majority of technical solutions deployed in the industrial market have been developed by proprietary technology manufacturers, which causes great difficulties in communication between devices. These interoperability problems have generated technology dependency in most cases. As a consequence, until there is a standardization of interfaces, protocols and applications, the interconnection required for the implementation of Industry 4.0 will be potentially expensive, inefficient and possibly an unsafe option [2]. Therefore, continuous innovation in open hardware and software is important to boost developments in the areas of supervision, industrialcontrol and interoperability of manufacturing plants, keeping affordable prices for small and medium-sized factories. Several solutions have been proposed to meet the requirements of supervision, control and communications between production processes using low-cost technologies. For instance, in [3], a liquid flow monitoring system is detailed that uses a LAN network to transmit data from a microcontroller, Arduino, which measures liquid flow and controls a solenoid valve, to a microcomputer, Raspberry Pi, which implements a web server to enable remote control and monitoring. In [4], the design of supervisory control and data acquisition (SCADA) systems using open hardware and software is proposed. The structure consists of four elements: a master terminal unit (MTU), a communication protocol, a remote terminal unit (RTU) and field devices. The MTU consists of a computer with an HMI, while the RTU is an embedded platform based on Arduino. The communication protocol is Modbus. In [5], a testbed consisting of six Raspberry Pis is presented to illustrate a method of troubleshooting communication protocols in intelligent industrial systems. In [6], an architecture is proposed for a multi-agent system based on OPC-UA for the integration of systems at manufacturing sites. In [7; 8; 9], architectures based on OPC servers with communication and data logging functionalities between multiple protocols are proposed. In [10], the implementation of industrial communication protocols using FPGAs is presented. The research works previously reported have a common disadvantage, which is the low level of robustness of the prototypes. The implementation results are oriented to simple systems with constant operating points and controlled operation conditions (laboratory environment). On the other hand, in [11], the authors propose a distributed service-oriented architecture to make PLC controllers compatible with Industry 4.0. This solution implies the use of PLCs whose firmware is easily upgradable to an IEC 61131 programming environment which integrates basic web technologies, network data processing and communications. Legacy PLCs typically lack these programming features; therefore, PLCs with embedded processors such as Arduino and Raspberry Pi emerge as feasible industrial solutions. This work presents the design, implementation and evaluation of the instrumentation, communications, control and supervision systems of a multi-tank system by using low-cost PLCs and communication interfaces compatible with the thingerio local server IoT platform.