Full text
Development of an embedded system for monitoring industrial machines João Pedro Ribeiro Cardoso Vaz Relvas outubro 2022 Development of an embedded system for monitoring industrial machines João Pedro Ribeiro Cardoso Vaz Relvas
UMinho | 2022
João Pedro Ribeiro Cardoso Vaz Relvas Development of an embedded system for monitoring industrial machines outubro 2022
João Pedro Ribeiro Cardoso Vaz Relvas Development of an embedded system for monitoring industrial machines Dissertação de Mestrado Mestrado em Engenharia Eletrónica Industrial e Computadores Sistemas Embebidos e Computadores Trabalho efetuado sob a orientação do Doutor Rui Pedro Oliveira Machado outubro 2022
ii DIREITOS DE AUTOR E CONDIÇÕES DE UTILIZAÇÃO DO TRABALHO POR TERCEIROS Este é um trabalho académico que pode ser utilizado por terceiros desde que respeitadas as regras e boas práticas internacionalmente aceites, no que concerne aos direitos de autor e direitos conexos. Assim, o presente trabalho pode ser utilizado nos termos previstos na licença abaixo indicada. Caso o utilizador necessite de permissão para poder fazer um uso do trabalho em condições não previstas no licenciamento indicado, deverá contactar o autor, através do RepositóriUM da Universidade do Minho. Licença concedida aos utilizadores deste trabalho Atribuição-NãoComercial CC BY-NC https://creativecommons.org/licenses/by-nc/4.0/
iii Agradecimentos No término destes últimos cinco anos, esta dissertação representa o culminar de um longo e significante percurso da minha vida, tanto a nível académico como pessoal. Como é natural, alguns agradecimentos encontram-se por oferecer. Em primeiro lugar, ao meu orientador e amigo Doutor Rui Pedro Oliveira Machado. Por todo o apoio, confiança depositada e ensinamentos transmitidos não só ao longo desta dissertação, mas desde o primeiro ano. Foste uma peça essencial na concretização desta etapa da minha vida, por isso o meu humilde obrigado. Um obrigado também ao Professor Doutor Jorge Cabral pela oportunidade que me ofereceu em realizar esta Dissertação de Mestrado no seu grupo. As pessoas que carecem de um especial agradecimento da minha parte, são os meus pais, Felisberto Vaz Relvas e Custódia Ribeiro Cardoso Relvas. Foi com eles com quem mais aprendi ao longo dos anos e a quem devo todo o meu percurso académico e integridade enquanto pessoa. A eles o meu muito obrigado pelos bons ensinamentos que ainda hoje me dão. Sem vós, nada me seria possível. À minha irmã, Cátia Raquel Ribeiro Cardoso Vaz Relvas, que sempre zelou pelo meu bem-estar. O meu muito obrigado a ti, maninha, pelos conselhos, por seres um exemplo e por estares sempre no sítio certo quando preciso. Em terceiro lugar e ainda no centro das pessoas que tornaram isto tudo possível a um nível principalmente pessoal, à minha namorada, Inês Rafaela Martins Freitas. A pessoa mais dedicada, inteligente e completa que conheço. Quem mais suportou os meus protestos e desabafos. Quem mais acreditou nas minhas capacidades durante todo o percurso. És imensa em mim e eu em ti. Muito obrigado pela pessoa que és e que me fazes ser. Obrigado aos colegas que me ajudaram e fizeram parte desta dissertação, Sofia Paiva, Marcelo Borges e Rui Teixeira. Ao Engenheiro Francisco Pinto, Professor Nuno Cardoso, Professor Paulo Canedo e Professor Carlos Teixeira, agradeço por todos os ensinamentos ao longo das várias etapas da minha vida até então. Um forte obrigado aos amigos que me acompanharam nesta jornada, em especial aqueles que foram impactantes nesta última etapa: ao João Araújo, Pedro Duarte, Alexandre Mano, José Carneiro, e Sara Pereira. Seguimos unidos. Por último, mas não menos importante, ao Senhor Paulo e à Dona Carla Cardoso, por me terem acolhido na família "Café Mosteiro" e por terem sido um enorme apoio nestes últimos cinco anos. Inseridos nesta família, aos meus grandes parceiros, os Picas do Mosteiro: Zito Martins, Antero Freitas, Diogo Ferreira, Paulinho Cardoso, Bruno Costa, Hugo Daniel, Sara Martins, Bruna Silva, Diogo Lemos, Juca Cardoso e Sérgio Fernandes. Muito obrigado a todos vós por todos os momentos, conselhos e exemplos de vida partilhados.
iv STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho.
v “Do not fear the unknown, Whatever you believe will be true.” Joey van Ingen
xii Figure 30 - I2C Wiring. ...................................................................................................................... 49 Figure 31 - I2C Message Frames. ..................................................................................................... 50 Figure 32 - UART Wiring.................................................................................................................... 50 Figure 33 - UART Packet. .................................................................................................................. 51 Figure 34 - RS485 Wiring. ................................................................................................................. 52 Figure 35 - UART and RS485 Connection. ......................................................................................... 52 Figure 36 - Communication between Host and Slave through RS485. ................................................ 53 Figure 37 - System Overview. ............................................................................................................ 54 Figure 38 - New Proposed System Software Stack. ............................................................................ 54 Figure 39 - Sensor and Variable Structures Class Diagram Adapted from [65]. ................................... 55 Figure 40 - Sensors Module Threads Adapted from [65]. ................................................................... 56 Figure 41 - Sensors Class Diagram Adapted from [65]. ..................................................................... 57 Figure 42 - LTC2451 Wiring Example. ............................................................................................... 57 Figure 43 - LTC2451 Configuration and Sampling Flowchart. ............................................................ 58 Figure 44 - ADS112U04 & SN65LBC176A-EP Wiring Example. ......................................................... 59 Figure 45 - ADS112U04 & SN65LBC176A-EP Initialize, Configuration, and Sampling Flowcharts. ...... 60 Figure 46 - Dashboard Home Screen Overview. ................................................................................. 62 Figure 47 - Dashboard Viewing Menu Switching. ............................................................................... 62 Figure 48 - Proposed Design for the Dashboard. ............................................................................... 63 Figure 49 - Air compressor specifications (a), instrument (b) and gauge (c). ....................................... 65 Figure 50 - NI USB-6281 testing setup. ............................................................................................. 66 Figure 51 - NI USB-6281 Object Configuration. ................................................................................. 66 Figure 52 - NI USB-6281 Read & Store Data. .................................................................................... 67 Figure 53 - Store the data in a single .xlsx file. ................................................................................... 67 Figure 54 - Loading the sensors' data................................................................................................ 68 Figure 55 - Calculate the maximum, minimum, average, and standard deviation. .............................. 68 Figure 56 - Graphical comparison between a boxplot and histogram of the data measured................. 70 Figure 57 - ISE20A Ni USB-6281 Results. ......................................................................................... 72 Figure 58 - LTC2451 PCB Circuit. ..................................................................................................... 72 Figure 59 - LTC2451 PCB Top & Bottom View................................................................................... 73 Figure 60 - LTC2451 testing setup. ................................................................................................... 73 Figure 61 - PFMC7501 testing setup. ................................................................................................ 73
xiii Figure 62 - ISE20A Variable and Sensor Struct. ................................................................................. 74 Figure 63 - ISE20A w/ LTC2451 init & configure Functions. .............................................................. 75 Figure 64 - Read the LTC2451 Conversion. ....................................................................................... 75 Figure 65 - Python Script to create the normal distribution and histograms. ....................................... 76 Figure 66 - ISE20A LTC2451 Results. ............................................................................................... 78 Figure 67 - PFMC7501 LTC2451 Results. ......................................................................................... 78 Figure 68 - ADS112U04 and SN65LBC176A-EP PCB Circuit. ............................................................ 79 Figure 69 - ADS112U04 and SN65LBC176A-EP Top & Bottom View. ................................................ 80 Figure 70 - SN65LBC176A-EP Top View. ........................................................................................... 80 Figure 71 - MongoDB Database Example. ......................................................................................... 81 Figure 72 - Pressure Sensor Configuration. ....................................................................................... 81 Figure 73 - Layout Example of the Dashboard using Bootstrap. .......................................................... 82 Figure 74 - Button Example of the Dashboard using Bootstrap. .......................................................... 83 Figure 75 - Callback Function Example of the Dashboard. ................................................................. 83 Figure 76 - Dashboard Final Visualization with both Pressure and Flow Sensors selected (a) and only with the Pressure Sensor (b). ............................................................................................................ 84
xiv List of Tables Table 1 - Appropriateness of Technologies for IoT Domains. .............................................................. 22 Table 2 - Sensors Specifications. ....................................................................................................... 34 Table 3 - General Pressure Units. ...................................................................................................... 41 Table 4 - General Flow Units. ............................................................................................................ 43 Table 5 - Air Sensors Specification. ................................................................................................... 45 Table 6 - ADCs Summary Specification. ............................................................................................ 48 Table 7 - ISE20A Max & Avg Std Deviation from NI USB-6281 ........................................................... 69 Table 8 - PFMC7501 Max & Avg Std Deviation from NI USB-6281 ..................................................... 69 Table 9 - ISE20A Max & Avg Std Deviation from LTC2451. ................................................................ 76 Table 10 - PFMC7501 Max & Avg Std Deviation from LTC2451. ........................................................ 77
xv Glossary Application – Computer software that performs a task or set of tasks, such as word processing or drawing. Applications are also referred to as programs. Asset Lifetime – How long, on average, a component will last before it suffers a failure. Commonly measured by Mean Time Between Failures Availability – The percentage of time a given piece of equipment is able to perform its intended function. Bandwidth – The capacity of a networked connection. Bandwidth determines how much data can be sent along the networked wires. Bandwidth is particularly important for Internet connections, since greater bandwidth also means faster downloads. Breakdown – A type of failure where a piece of equipment is completely inoperable. Client – A single user of a network application that is operated from a server. A client/server architecture allows many people to use the same data simultaneously. The program's main component (the data) resides on a centralized server, with smaller components (user interface) on each client. Computer – A computer is an electronic device that manipulates information, or data. It has the ability to store, retrieve, and process data. Condition-based Maintenance – A maintenance strategy based on real-time measurements in order to assess when a piece of equipment might need maintenance, then taking action to avoid it at the right moment. Corrective Maintenance – Maintenance interventions that are carried out after a failure has occurred, in order to restore the equipment to a functioning condition. Database – A collection of similar information stored in a file, such as a database of addresses. This information may be created and stored in a database management system (DBMS). Downtime – The amount of time a piece of equipment is out of service, either due to an unplanned equipment failure, or intentionally in order to carry out preventive maintenance or other reasons. Embedded System – An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system.
xvi Failure – Any condition of a piece of equipment which prevents it from fulfilling its intended functions, either partially or completely. Hardware – The physical and mechanical components of a computer system, such as the electronic circuitry, chips, monitor, disks, disk drives, keyboard, modem, and printer. Interface – The interconnections that allow a device, a program, or a person to interact. Hardware interfaces are the cables that connect the device to its power source and to other devices. Software interfaces allow the program to communicate with other programs (such as the operating system), and user interfaces allow the user to communicate with the program (e.g., via mouse, menu commands, icons, voice commands, etc.). Internet – An international conglomeration of interconnected computer networks. Begun in the late 1960s, it was developed in the 1970s to allow government and university researchers to share information. The Internet is not controlled by any single group or organization. Its original focus was research and communications, but it continues to expand, offering a wide array of resources for business and home users. Internet of Things – The digital interconnection of physical assets with the internet, and the capability of transmitting data between them. Key Performance Indicators – Metrics used to determine the effectiveness of a business or maintenance operations, such as OEE, MTTR or MTBF. Mean Time Between Failures – One of the main indicators of the operational reliability of an asset. Mean Time to Repair – A measurement of the maintainability of equipment and repairable parts. Microprocessor – A complete central processing unit (CPU) contained on a single silicon chip. Planned Maintenance – Any maintenance activity whose scope, frequency, labour, materials, and tools required to carry out the tasks have been previously documented. Predictive Maintenance – A type of planned maintenance that aims to predict equipment failures and prevent them before they take place. Preventive Maintenance – Maintenance actions that are regularly carried out to prevent the occurrence of failures and to monitor the performance of equipment.
xvii Proactive Maintenance – Any tasks used to predict equipment failures or taking corrective action towards eliminating potential failures (see Potential Failures). Program – A precise series of instructions written in a computer language that tells the computer what to do and how to do it. Programs are also called software or applications. Reactive Maintenance – Corrective maintenance tasks performed in order to restore a piece of equipment to its normal operating condition (see Corrective Maintenance and Proactive Maintenance). Reliability-Centered Maintenance – A process to determining the maintenance strategies needed to ensure a piece of equipment keeps fulfilling its intended functions, based on its reliability (see Reliability). Software – Computer programs; also called applications. Total Productive Maintenance – A maintenance strategy to maximise equipment effectiveness with total participation of the whole organisation. Uptime – The time that a piece of equipment is operating (see also Downtime). Useful Life – An estimate of the total time an asset will be able to perform its intended functions.
xviii Abbreviations and Acronyms AMT Asset Maintenance Tool AR Augmented Reality CBM Condition Based Maintenance CM Condition Monitoring CMMS Computerized Maintenance Management System ICT Information and Communication Technologies IoT Internet of Things KPI Key Performance Indicator LAN Local Area Network MRO Maintenance, Repairs, and Operations MTBF Mean Time Between Failure MTTR Mean Time to Repair PdM Predictive Maintenance RCM Reliable Centered Maintenance ROI Return on Investment RUL Remaining Useful Life SBM Statistical Based Maintenance UART Universal Asynchronous Receiver-Transmitter
1 Chapter 1 1. Introduction This Master's Dissertation represents the development of an embedded system for monitoring industrial machines integrated with the Cognitive CMMS project in the scope of Industrial Electronics and Computer Engineering. In this chapter, the contextualization, motivation, and goals of this dissertation are presented. Firstly, the contextualization gives a general perspective of the frame of the dissertation. Then, the motivation to lead a study on this particular topic followed by its objectives Is presented, culminating with the research methodology used to conduct the study and the document structure.
2 1.1. Contextualization and Motivation This master's dissertation is inserted in the Cognitive CMMS project from the Cognitive CMMS Consortium. This project has as main goal, to provide a solution that acts transversally in the area of maintenance management, including the management actions, that can be seen in a platform equipped with smart tools capable of detection and prediction of failures or anomalies in several equipment. It also includes the analysis of the surrounding environment, specifically air quality, hence optimizing the resources and operations in the context of predictive maintenance, and additionally considering the energetic efficiency of the building. By achieving this objective, the technician/user will have a set of tools that will aid in the actions of maintenance based on the emerging technologies in order to broaden the cognitive skills of the platform with an intuitive access to all the relevant management information. With the relentless and swift technological evolution, it is of the uttermost prominence of enterprises to adopt up to date technologies, so they can guarantee their frontline position in the competitive market they are inserted in. In any type of industry, it is pertinent and crucial the prudent utilization of technologies qualified of examining if its industrial procedures are in their standard performance, thus ensuring an ultimate product with the desirable quality. Having the awareness if the equipment is being used according to its stipulations should also be in the interest of companies [1] [2]. Traditionally, maintenance was seen as a “necessary evil” by Tsang [3] and was only implemented when a failure had already occurred, and costs were aggravated by delaying deadlines and jeopardising the quality of the product. Maintenance embodies a major portion of the production cost of many industries and its impact was often underestimated [3]. Nowadays, maintenance is considered a strategy for market competitiveness [4]. This resulted in an evolution of maintenance concepts in the last decade. The evolution from corrective maintenance to preventive maintenance, was felt since it allowed the prediction of when a failure might occur, thus ensuring a proper timely maintenance avoiding the breakdown. Corrective maintenance was considered the category of maintenance tasks that were performed to rectify and repair faulty systems and equipment. Predictive maintenance is schedule based on the asset condition and preventive maintenance is scheduled regularly regardless of the asset condition.
3 Industrial machines are vital for the production sector. As a consequence, their operation runs for long periods of time in several sorts of environments. These factors, together with the possible mismanagement of the equipment often contribute to spontaneous breaks or unplanned imperative maintenance. The triggered downtime, in numerous circumstances, results in a monetary loss for the company. On the other hand, the examination of the failure helps to attain a fast diagnosis and solution as well as to determine if the malfunction was indeed due to a diminished Remaining Useful Life – RUL – produced by the regular experienced wear, or to mishandling of the equipment. In that sense, the monitoring systems are increasingly more relevant in industrial settings [5]. In sight of the scale of the solution of the Cognitive CMMS project, it is intended to develop a hardware component that is based on the Internet of Things – IoT – paradigm and allows the access to the data of each asset through a reliable and scalable way. The Cognitive CMMS’s end-device is a monitoring system with multiple sensors. This device is responsible for reading the sensors and detecting if the samples value is within a defined threshold. Given the sample values are not within the threshold, an external interrupt is triggered on the enddevice, and the data is collected for further analysis of a possible problem leading to a timely maintenance schedule. Therefore, these sensors interrupt signals can wake up the end-device microcontroller, then signalling an alert. Furthermore, the microcontroller can enter low-power sleep and react to asynchronous events. 1.2. Objectives The main goal of this dissertation is to improve the hardware and software of a monitoring NB- IoT end-device previously developed in the Cognitive CMMS project, making it robust and adapting it so it can be used to monitor airflow systems in industrial machines through the use of adequate sensors for the problem. Therefore, it is intended to present an in-depth study on Computerised Maintenance and Management Systems in the context of monitoring industrial machines, validating the importance of the use of such technologies. This goal can be achieved by accomplishing the following tasks: • Study the existing project in search of possible upgrades as well as better understand the already implemented functionalities.
10 The maintenance tasks are scheduled based on the time of operation, or better, the current runtime of the equipment i.e. , the scheduling is based on the number of hours of life cycle, a particular equipment or system will work. Figure 5 depicts an example of a mean-time-to-failure or bathtub curve which translates the lifetime of any machine. By interpreting it, it is possible to note that the probability of failure is higher during the starting up of the machine due to adjustments, calibration, etc. As soon as that phase gets over, the probability of failure decreases significantly and is stable for a long period of time and can be considered as the normal operation phase. However, after this phase, the probability of failure increases as the time elapses. The preventive maintenance in general, is based on this type of life cycle graph and an assumption on when the equipment is going to fail is made based of the graph. Once again, even if the lifetime of each type of equipment is known and correctly defined, the actual RUL still depends on the way the equipment is manipulated during the whole life cycle. This external variable can change everything, and in tough environments and/or misuse of the equipment, sudden breakdowns can happen unexpectedly [11]. 2.1.4. Reliability Centred Maintenance RCM is a type of maintenance that is constantly ensuring that the system continues to perform its function properly by the use of condition monitoring and sensors installed on the equipment. This way, the RUL can be somewhat determined, hence assisting in the scheduling of maintenance actions. It has to be considered that to condition monitor any equipment, one must know what failure they are trying to prevent and understand the functioning of the equipment. This method is widely used within the nuclear and airline industries [9]. Since the main focus of RCM is preserving the system functions, rather than preserving the equipment, means that the developed schedule maintenance plans will provide a level of operability and risk only acceptable in an efficient and costeffective manner. In the long run, the reliability of the electronic equipment's subsystem will diminish, and the total preventive maintenance cost may increase with the increase of the system runtime [12]. 2.1.5. Predictive Maintenance Studying and analysing data to detect faults and threats in devices before they occur and taking appropriate measures to reduce the risk of failures is called Predictive Maintenance. Predictive
11 Maintenance can also be regarded as an ensemble of activities that detect any abnormal physical condition changes in equipment (signs of failure) to carry out the required maintenance tasks to oomph the RUL of equipment without increasing the risk of failure. This type of maintenance also allows the maintenance frequency of an equipment to be much lower, while still preventing unplanned reactive maintenance, and minimises the equipment down time and costs associated with Preventive Maintenance. It can be classified into two kinds according to the methods of detecting the signs of failure: Statistical-Based Predictive Maintenance – SBM – and Condition-Base Predictive Maintenance – CBM [13] [14] [15]. SBM depends on statistical data from meticulous recording of the stoppages of the in-plant items and components in order to develop models for predicting failures. CBM depends, however, on continuous or periodic monitoring conditions of equipment to detect the signs of failure and make maintenance decisions. A major part of Predictive Maintenance functioning in general is the use of Condition-Monitoring equipment to evaluate asset performance. Implemented sensors record a wide range of data such as pressure, flow rate, vibrations, temperature, etc, from the physical actions of a structure or equipment. Internet of Things can be considered a key element of this process since it allows for different systems to work together to interpret and analyse the recorded data to predict when maintenance should be performed. This process requires a large bandwidth and storage for the amounts of data recorded can be vast. The same applies for the analysed data, so it can be possible to not only give a full picture of assets in a single plant, but of an entire production network. Based on a study by Deloitte [10], significant cost savings can be achieved through the use of predictive maintenance. Specifically, reduction of maintenance costs by 30%, reduction of breakdowns by 75% and downtimes by 45%. However, the use of predictive maintenance presents some setbacks as well. The initial drawback for industry is that the initial investment costs for predictive maintenance are high and require specialists, experienced personnel for data analysis to be effective.
12 2.2. Condition Monitoring Due to the substantial applications, and the wide areas this term is used in, such as, data capture, preventive maintenance, predictive maintenance, reliability management etc., Condition Monitoring definition is subjective. But it is widely agreed that it is a process of monitoring a particular condition in machinery or equipment to identify changes that could indicate a developing fault. According to S. Dunn [16], is “the use of advance technologies in order to determine equipment condition” such as vibration, pressure, flow rate, temperature, to name a few. But these determinations discount the human senses. It is also a major part of predictive maintenance. It allows the maintenance to be scheduled and to take preventive actions to ward off further failures and subsequent unplanned downtime [17]. Traditionally, condition monitoring was mainly based on vibration analysis, but currently, innovative techniques use sensors to measure different parameters in real-time and on a range of equipment, including rotating machinery, auxiliary systems, and parts such as compressors, pumps, and motors [18]. 2.2.1. Condition Monitoring Operation Once, condition monitoring was induced by holding a wooden stick against a machine and feeling the vibrations to check if the equipment was running correctly. This, however, is outdated due to the use of digital technology, the Internet and Asset Maintenance Tools - AMTs. With the technology that is now available, it is possible to monitor anything in real time. This ongoing monitoring allows engineers to schedule planned maintenance as required, rather than simply scheduling maintenance for a fixed date. Through this, maintenance can be scheduled at a more efficient moment, as and when required, leading to less downtime [18]. Preventing other components in a machine from failing as a knock-on effect from one part breaking down and is also a feature of condition monitoring. This improves efficiency and removes unexpected downtimes from a work schedule as well as minimising inspection procedures. K.S Jardine [19] and S.A Tesdal et. al. [20], provide an explanation for a typical methodology, diagnostics, and prognostics. Diagnostics addresses fault detection, isolating and identifying the
13 problem when it occurs. As to Prognostics is to determine whether a fault is imminent and estimates how long until a fault will occur, predicting the RUL. The working of a condition monitoring can be mostly broken down into three steps: • Install the Monitoring System The first step in condition monitoring is to install the monitoring system hardware onto the serviceable equipment. The installation may require some retrofitting or modification of the existing assets, with different items of equipment requiring different approaches or instrumentation. • Baseline Data Measurement With the monitoring system installed, the measure of the performance of the equipment can be initiated. The data collected can include several metrics, depending on what it is pretended to measure. This gives a baseline against which can be monitored the equipment against its optimum operation conditions going forward. • Ongoing Monitoring The implemented system can now monitor the equipment through the use of sensors and condition monitoring software that will evaluate performance and provide diagnostics. It can be also implemented into the system an alert notification when an operational abnormality is detected and assess the data to determine if immediate action is required or if the machine can operate for a while longer while maintenance is scheduled. The IoT is set to change condition monitoring as devices are able to connect and communicate with each other. This means that connected smart machines in different locations can communicate with each other to provide a joined-up comparison between systems. This additional data will help engineers to make informed decisions about their machinery and any maintenance requirements. It can also improve diagnostic efficiency as the time it takes to carry out thermographic or vibration monitoring on one machine can now be used to test several machines simultaneously. Connecting machines in this way can offer comparable data analysis of an entire production process regardless of whether the machines are carrying out similar tasks or not. As soon as a change in running levels
14 is detected across the chain of production, operators can assess where the problems may be and act upon imminent faults [17] [18] [19] [20]. K. S. Jardine [19] and S. A. Tesdal [20] once again propose a starting point for defining a model for a condition monitoring regime. Beginning with the data acquisition set to obtain data relevant to the system health. Then the data processing step to handle and analyse the data collected and interpret it. And finally, the maintenance decision making step to recommend efficient maintenance policies. Taking into consideration the views of P. A. Higgs [21] and the conceptualisation of Groom [17] it is possible to convey the subsequent framework in Figure 6. Figure 6 - Condition Monitoring Framework by Groom A study conducted by Elegrow Technology [22], condition monitoring is a tried and tested effective maintenance tool that is being used by an increasing number of industries. These systems provide important benefits from a financial, operational, and safety perspective. While condition monitoring solutions may require some investment, these expenses are returned by preventing costly unplanned downtimes as a result of machine failure, as well as eliminating the unnecessary maintenance costs associated with scheduling maintenance based on operating hours rather than actual condition. When used with connected systems, condition monitoring allows users to make the most of planned maintenance downtime, servicing multiple machines and addressing all problems simultaneously.
15 Proactive condition monitoring is also important from a safety perspective, as the effective monitoring and maintenance of machinery prevents accidents from occurring. Examining the studies, it is safe to say that Condition Monitoring – CM – brings a lot of benefits for maintenance scheduling, operating costs, reduced downtime, and safety. It allows users to determine whether an asset is likely to break down, what will cause the problem, and when the failure may occur. This gives owners time to organise maintenance before the failure happens, avoiding unplanned downtime and allowing repairs to be set for a suitable time in a production schedule [16] [17] [18] [19] [20] [21] [22]. Being used under the scope of several areas, all of them agree with the following: • Avoid unplanned downtime: avoiding unplanned downtime provides a spectrum of beneficial outcomes for an industrial environment, such as preventing unplanned production delays or avoiding costs with emergency maintenance, which is more expensive than pre-scheduled maintenance. Also, by eliminating unplanned production delays, orders are guaranteed to be completed on time, with no need to pay overtime. • Protect other assets: warnings about the need to replace a part are issued, allowing ordering new assets and parts as required in time for scheduled maintenance. This way, there will be no need to buy and store large numbers of replacement assets or parts in case of an unexpected failure. As a result, are prevented possible damages in other systems caused by a machine failure. • Eliminate unnecessary maintenance to maximize ROI: employing condition monitoring as part of a predictive maintenance program can increase the ROI of mechanical assets. The preventive maintenance programs are usually set at regular intervals ( i.e., annually) or after a set number of operating hours, independent of whether the maintenance is required or not. As a result, through condition monitoring, it is possible to schedule repairs only when required, eliminating unnecessary maintenance and downtimes. Therefore, it can be achieved more working value from each machine, reducing the total cost of ownership and maximizing the ROI for the equipment. • More efficient maintenance: condition monitoring allows for more efficient maintenance by indicating where a fault may lie, meaning that maintenance engineers don't have to check working components while locating it. This way, it is saved time and the
16 maintenance is completed faster. Also, it avoids the costs of paying a maintenance engineer for wasted time. • Improved safety: by checking and repairing machines before they break, safer work practices are ensured, guaranteeing employee safety. Condition monitoring allows the owners to plan maintenance before a failure occurs that could pose a threat to employees working nearby. • Improved asset efficiencies: condition monitoring can also improve the efficiency of assets. Having a record of which parts are malfunctioning allows focusing on efficiency improvement efforts on those specific parts, thereby improving the overall capabilities of the equipment. However, despite the many advantages to be found with condition monitoring, there are also some drawbacks, particularly related to the initial set-up of condition monitoring systems: • Installation costs: condition monitoring equipment can be expensive to buy and install. Occasionally, the monitoring systems may even require assets to be adjusted for retrofitting with sensors. There may also be additional sensor costs to account for operating environments, further increasing the price of installation. Due to these costs, some asset owners may decide that certain items of equipment are not worth the investment and prefer to either schedule regular maintenance for easily repairable items or run to failure for non-safety critical items. • Operational costs: the ongoing data analysis necessary for condition monitoring will require either staff training to implement or the hiring of engineers with the required knowledge and experience. Both will result in additional costs, although this can often be compensated by the many financial benefits of condition monitoring. • Unpredictable maintenance scheduling: while condition monitoring offers many advantages for maintenance scheduling, some operators prefer to schedule maintenance regularly. For instance, it may be preferable to service a machine semiannually rather than waiting for it to show signs of wear at an unexpected time. However, most modern condition monitoring techniques offer advanced warning of a potential failure, providing plenty of time to schedule maintenance. Comparing the costs of Condition Monitoring with Reactive and Preventive Maintenance Akula et. al. [23], came up with the relation on Figure 7.
17 Figure 7 - Condition Monitoring Balance Between Cost and Failures 2.2.2. Applications Condition monitoring has a wide range of applications right across industry wherever there is machinery or equipment in use. It can be used in all forms of manufacture to check the efficient and safe running of machinery, preventing failure and the associated unplanned downtimes for repair or replacement. It is also used to detect leaks, cavitation, or flow, such as when managing piping, pipelines, pressure vessels and storage containers in the oils and gas industry. CM techniques have also been applied to aircraft and aging vehicles and has been used in the rail industry for vibration analysis of train door control systems and railway condition monitoring. These same techniques are also used to maintain other industrial assets, including in the marine environment and the power generation industries, such as the operational condition of a wind turbine’s machinery and rotating components. According to Morris et. al. [24], modern condition monitoring techniques are widely divided based on differing requirements and considerations: RCM, Real-Time Monitoring – RTM, and Real-Time Data Logging – RTDL. The RCM is where the equipment transmits periodic updates and alerts to a remote node in relatively long intervals. The RCM hardware is designed to left in place and such should require minimal in loco maintenance. It is also recognized as a low power consumption system with
18 a low and configurable sampling rate with robust sensors and ability to transmit and retransmit data remotely. Another is the RTM, where the sampling rate increases, and the information is retrievable in "real-time". The consumption when compared with RCM can be much higher, but the visualisation of the data is now localised, and everything is totally configurable. Real-Time Data Logging for when the data is in large quantities and the stream of it must be reliable to prevent any packet loss. Similarly to RTM, the sampling rate is fast, but it requires a large memory with fast access also. The data is only acquired by some trigger making the acquisition much more convenient. 2.3. Internet of Things (IoT) The term Internet of Things (IoT) first appeared in 1999 and its main purpose was initially to promote Radio Frequency Identification (RFID) technology. It describes the network of physical objects which are embedded with sensors, software, and other technologies aiming the connecting and exchanging data with other devices [25]. Later the Internet of Everything also appeared, and this one described not only what IoT already described, but also people. Entailing not only the M2M communications, but also Person to Person (P2P) and Person to Machine (P2M) communications [26] [27]. Nowadays, the IoT is already part of everyone’s lives. With the ever growth of technologies, it’s expected in a few years, thousands of million IoT devices [28]. These devices can be monitoring environment variables, supporting other IoT devices or actuating in several critical situations or systems. The applications of IoT devices are endless, being applied in home automation, monitoring, healthcare, agriculture, among others [29]. Once again, in sight of the scale of IoT devices applications, its characteristics vary from large scale to low-cost design, resource constraints to device heterogeneity. As a result, opting for functions instead of security is becoming more and more frequent, raising major concerns in terms of security, privacy and reliability when designing an IoT system [30] [31].
19 2.3.1. IoT Architecture The traditional IoT device architecture comprises Sensors, Power Management, Microcontroller Unit (MCU), Actuators and Wireless Communication Technologies [32] as seen in the Figure 8. Figure 8 - IoT Traditional Architecture The Power Management layer is responsible for supplying energy to the device's components and can have multiple forms since the use of batteries or by energy harvested from the environment or even a hybrid solution that can have both. Of course, the batteries can become obsolete when a power source is available. The power can be a constraint when the device is limited to use a certain amount of energy. The Sensors and Actuators are the door that connects the device with the real world. Through the sensors, the device can monitor or analogous the very word, sense, the surrounding environment using variables such as temperature, humidity, pressure, flow rate, acceleration etc. On the other hand, actuators allow the device to take an action based on the sensors, for example, a General-Purpose Input/Output (GPIO) pin output set to high or low. The Wireless Communication Technology is responsible for connecting the device with its controller. This is where the M2M or P2M communications come in. There are several technologies to be further studied and described in detail ahead. The MCU or Microcontroller Unit is the brain of any end-device since it is responsible for making sure the IoT device is fulfilling its purpose and managing all the device's components.
26 2.4.2.2. Microsoft Azure IoT Platform The Azure IoT Hub [57] is a cloud service that acts as a central hub for messages in bidirectional communications between the IoT device and the managed devices. It can be used to create IoT solutions with trustworthy communications between millions of devices and a back-end hosted in the cloud as represented in Figure 12. Figure 12 - Microsoft Azure IoT Suite Platform Overview [57] . Microsoft presents a case study of the use of the Azure platform in the maintenance management of buildings together with the use of Mixed Reality and IoT technologies, Figure 13. This study show how it is possible to improve the activity time and the operations in hospital, manufacture, and retail environments. Build upon the Azure Spatial Anchors and the Azure Digital Twins, it is possible to visualize a virtual replica of the physical space with data in real-time [58].
27 Figure 13 - Azure Architecture for Building Maintenance Case Study [58] . 2.4.2.3. Google Cloud’s IoT Platform The IoT solution of Google Cloud Platform [59] is divided into three basic components: device, gateway, and cloud. The device includes the hardware and software that interacts directly with the world. The devices are connected to a network to communicate among themselves or with centralized applications. They are connected directly or indirectly to the internet. The gateway processes the data in the name of a group or cluster of devices. Through the gateway, the devices can reach the services of the cloud. The data is sent to the Cloud Platform where they are processed and combined with other data from other devices. In Figure 14, the different scenarios of the data management are presented.
28 Figure 14 - Google Cloud Platform Overview [59] . Although the Google Cloud’s IoT doesn’t own a case study on maintenance management per se, it has several case studies on predictive maintenance. The Cloud IoT has a structure to collect data from sensors (Figure 15). The next step is to analyse all the information in order to measure the asset’s health. The sensors sent the data in real-time to the Cloud IoT Core of Google and then they are forwarded to the Cloud Pub/Sub, which is a service to transmit messages between machines and devices. Then, this data is processed in the Cloud Dataflow through an algorithm of Machine Learning hosted in the Machine Learning Engine of Google. Finally, if the algorithm predicts that the asset is about to fail, sends a signal to the users so they can take a decision on the appropriate preventive maintenance action. Figure 15 - Google Cloud IoT Platform for Predictive Maintenance [59] .
29 2.4.2.4. Amazon WS IoT Platform The Amazon solution is called AWS IoT Core, and aims to connect any number of devices to the cloud and to other devices. It offers support to HTTP, WebSocket and MQTT to tolerate unstable connections, minimize the code size in the devices and reduce the requirements of bandwidth. AWS IoT Core, Figure 16, stores the most recent state of a connected device, which allows to read or define that state at any time. This way, the device is shown to the applications as if it were online the entire time, meaning that an application can read the state of a device even if it is disconnected [60] [61]. Figure 16 - AWS IoT Overview [61] . Cognizant Digital Business has proposed a holistic solution on AWS, the Connected Places [62]. It cements and optimizes the data in all the portfolio of geographical disperse buildings, turning them into self-conscious, flexible, and responsive structures, adjustable to the in constant changing environment conditions and occupants. With Connected Places it is possible to obtain insights and access to a single unified view of various systems that feed the building. Using a couple of personalized panels, the managers can monitor service orders in real-time, KPI’s and consumption patterns in all the portfolio. This solution can be used with actives and sensors to provide information relevant to the intelligent management of everything. The functionalities of Connected Places in the AWS are presented in the Figure 17.
30 Figure 17 - Connected Places Solution Overview [62] . 2.4.2.5. Oracle IoT Platform The Oracle Internet of Things Cloud Service is an offer managed as a Platform as a Service – PaaS, which allows to connect devices to a cloud, analyse the data from these devices in real-time and integrate them with applications, Web Services or with other Oracle Cloud Services solutions, as depicted in Figure 18. It also proves data analysis in real-time, endpoints management and highspeed messages, with which, the user can receive alerts in real-time directly in their devices. Figure 18 - Oracle IoT Cloud Service Overview [63] . Oracle depicts a case study referent to actives management, the Oracle IoT Asset Monitoring Cloud Service [63]. It is a specialized solution from Oracle IoT Clout Service and creates a digital twin of the organization and organizational assets, allowing the monitorization of the location, condition,
31 and use of assets, Figure 19. It is also possible to detect anomalies and make use of analysis to predict failures. Figure 19 - Oracle IoT Asset Monitoring Cloud Service Overview [63] . 2.5. State of the Art Summary Considering the conducted study, the intention of developing an embedded system for monitoring industrial machines and blending it with a CMMS turns out to be relevant. The reason for the in-depth study of pressure and flow rate sensors is justified with the addition of the embedded system. It is intended to monitor industrial machines with air flow features. As such, monitoring the certain pressure applications, flow rates, and vibrations within the machine helps to predict any possible malfunctions in a timely manner. Furthermore, this maintenance strategy will explore and provide the knowledge if the monitored machine is being handled within its standard specifications. This research will benefit the developer by clarifying and assisting in terms of theoretical fundaments so far unknown. The knowledge of how Condition Monitoring, CMMS, and certain sensors work principle, as well as the state of the market and industry in the field will simplify the process of developing the system as a whole with awareness of possible obstacles and how to surpass them.
32 Chapter 3 3. System Specification and Design This master's dissertation is inserted in the Cognitive CMMS Project from the Cognitive CMMS Consortium, and as such, a review of the work done is presented in this chapter. The project so far consists of a monitoring NB-IoT end-device with a typical IoT architecture with some actuators. In this chapter, an analysis on the existing architecture is presented. The top-level overview as it is shown in Figure 20, is composed by three major domains, namely: (i) the Sensors; (ii) the End-device; and (iii) the Cloud. The end-device with a Real-Time Operating System capable of sampling the variables - physical measurements of a sensor - send the samples to the cloud and handle an emergency. The end-device can be coupled with multiple sensors capable of monitoring environmental variables and it has a NB-IoT transceiver to communicate with a cloud. The cloud has a microservice structure, controlling the end-device and receiving the data collected from the sensors. To better understand the new features to be added, a use case diagram focusing on the Enddevice will be presented. Besides the diagram, research on the sensors to be used with the Enddevice is given. In order to sample the data from the sensors, different approaches on Analogue to Digital Converts is described. Finally, the software stack is introduced, ending with a prospect for the implementation bearing in mind the studies done earlier in the chapter. Figure 20 - Top-Level Overview
33 3.1. Requirements Due to this dissertation's being a continuation of the project Cognitive CMMS, it includes the project's requirements and adds new ones. • Collect air pressure and air flow data. • Transmit the collected data to the cloud. • Signal abnormal behaviour. • Receive commands from the cloud to configure the sensor drivers. • Receive commands from the cloud to sample the sensors’ data. • Collect data in an industrial environment. • Successfully transmit the data to the end-device. 3.2. Hardware The hardware is depicted in Figure 21. It is composed of several sensors capable of measuring temperature, humidity – HDC2080, acceleration – BMA400, and light – OPT3002. It has also the ATECC608A chip, which has multiple encryption algorithms for ensuring secure communications to the cloud. The communications are made through the Quectel BC66, allowing the system to use NB- IoT technology. All the chips are controlled by the Microcontroller Unit STM32L082KBU6. Figure 21 - System Hardware Overview.
34 The Cognitive CMMS Board 3D representation of front and back is depicted in Figure 22. Figure 22 - Cognitive CMMS Board 3D Representation. 3.2.1. Sensors The sensors are the devices that detect and respond to some type of input from the physical environment, thus allowing the system to monitor it. This end-device has three sensors to measure light, temperature, humidity, and acceleration. It is also prepared to read from any sensor with an I2C interface. All the sensors selected have low-power modes that enable continuous sampling and trigger an external pin. This enables signalling that the sample value is greater or less than the set threshold value. Table 2 displays some of the sensors’ specifications. Table 2 - Sensors Specifications. SENSOR POWER SUPPLY (V) SIZE (MM3) INTERFACE LOW-POWER MODE TYPICAL APPLICATION HDC2080 1.62 – 3.6 3x3 I2C Sleep Auto Triggered HVAC System Thermostat OPT3002 1.6 – 3.6 2x2 I2C Shutdown Single-Shot Continuous Optical-Based Diagnostic Systems BMA400 1.72 – 3.6 2x2 I2C, SPI Sleep Low-Power Normal Drop Detection for warranty logging
35 3.2.1.1. Temperature and Humidity – HDC2080 The HDC2080 device is an integrated humidity and temperature sensor that provides high accuracy measurements with a very low power consumption. It is a capacitive-based sensor with new integrated digital features and a heating element to dissipate condensation and moisture included. The HDC2080 digital features include programmable interrupt thresholds to provide alerts and system wakeups without requiring a microcontroller to be continuously monitoring the system. Combined with programmable sampling intervals, a low power consumption, and a support for a 1.8V supply voltage, the HDC2080 is designed for battery operated systems. It also provides high accuracy measurement capability for a wide range of environmental monitoring and Internet of Things applications such as smart thermostats and smart home assistants. 3.2.1.2. Luminosity – OPT3002 The OPT3002 light-to-digital sensor provides the functionality of an optical power meter within a single device. This sensor greatly improves system performance over photodiodes and photoresistors. The OPT3002 has a wide spectral bandwidth, ranging from 300 nm to 1000 nm. Measurements can be made from 1.2 nW/cm2 up to 10 mW/cm2, without the need to manually select the full-scale ranges by using the built-in, full-scale setting feature. This capability allows light measurement over a 23-bit effective dynamic range. The results are compensated for darkcurrent effects, as well as other temperature variations. It is used in optical spectral systems that require detection of a variety of wavelengths, such as optically based diagnostic systems. The interrupt pin system can summarize the result of the measurement with one digital pin. Power consumption is very low, allowing the OPT3002 to be used as a low-power, battery-operated, wake-up sensor when an enclosed system is opened. The OPT3002 is fully integrated and provides optical power reading directly from the I2C- and SMBus compatible, two-wire, serial interface. Measurements are either continuous or single shot. The OPT3002 fully operational power consumption is as low as 0.8 µW at 0.8 SPS on a 1.8V supply. 3.2.1.3. Accelerometer – BMA400 The BMA400 is a 12-bit, digital, triaxial acceleration sensor with smart on-chip motion and position-triggered interrupt features. It is an ultra-low power acceleration sensor with a low current consumption of data acquisition without compromising on performance, consuming
42 Figure 26 - ISE20A Theoretical Analogue Output Variation. Figure 27 illustrates both the internal wiring of the sensor, as well as the connections available to read the data. As depicted in the figure, it is possible to power the sensor with a voltage ranging from 12 to 24V DC through the brown and blue wires. Reading the analogue output is done through the use of the gray wire. The black and white wires are PNP outputs. Figure 27 - ISE20A-T-01-J Internal Circuit and Wire Example. 3.5.2. PFMC7501 Analysis PFMC7501-F04-E is a digital flow switch which its recommended applicable fluid is dry air and N2. To better understand what a flow switch is, one must understand what it is meant by “flow”. Flow refers to the velocity or physical movement of gas (in this context) within a pipe that triggers the actuation of the flow switch. When there is no flow present, the velocity either drops or completely stops. In either case, the switch will revert to its original position. A complete stoppage or decrease in velocity gets indicated when there is no flow. Also, the stoppage allows the switch to return to its
43 original position. The type of switch includes a paddle, which is connected to a circuit and placed in the channel through the gas is passing. This paddle is displaced when the air is flowing by and sends a signal reading back to a secondary component known as the transducer. The transducer will then decipher this signal into a readable format. Also, the PFMC7501 is endowed with a bypass structure with protruding part at the main piping. This will reduce the contact of moist air with the sensor, thus reducing the degradation suffered by the sensor and maintaining its accuracy. According to the datasheet of the sensor, it has a voltage output varying between 1 and 5V, with a total range of 4V. The maximum flow capable of measuring is 500l/min. For a better understanding of the Unit System, the Table 4 lists various types of Units. The smallest flow that the sensor is capable of detecting is 1l/min which translates in a variation of 0.008V in the output with an error of ±3%. Table 4 - General Flow Units. TO CONVERT FROM: GENERAL FLOW UNITS 𝐥/𝐬𝐞𝐜 𝐥/𝐦𝐢𝐧 𝐦𝟑/𝐡𝐫 𝐟𝐭𝟑/𝐦𝐢𝐧 𝐟𝐭𝟑/𝐡𝐫 Multiply by: 𝐥/𝐬𝐞𝐜 1 60 3.6 2.119093 127.1197 𝐥/𝐦𝐢𝐧 0.016666 1 0.06 0.035317 2.118577 𝐦𝟑/𝐡𝐫 0.277778 16.6667 1 0.588637 35.31102 𝐟𝐭𝟑/𝐦𝐢𝐧 0.4719 28.31513 1.69884 1 60 𝐟𝐭𝟑/𝐡𝐫 0.007867 0.472015 0.02832 0.01667 1 This digital switch analogue output varies linearly according to the flow rate that is being measured (Figure 28). The output can be interpreted by analysing the voltage in Volt, with a minimum of 1V when the flow rate is 0l/min, and 5V when the flow rate is 500l/min.
44 Figure 28 - PFMC7501 Theoretical Analogue Output Variation. This switch also brings in the datasheet notations for the internal circuit as well as wiring examples. This information is illustrated in Figure 29. Similar to the ISE20A, the switch can be powered with a voltage ranging from 12V to 24V DC through the use of the brown and blue wires. The output is read at the white wire, by measuring the electrical potential difference between the analogue output and the blue wire, GND. Besides that, there is a PNP output at the black wire. Figure 29 - PFMC7501-F04-E Internal Circuit and Wire Example. 3.5.3. Sensors Specifications Table 5 summarizes the sensors specifications for a better understanding of the information given in previous sections.
45 Table 5 - Air Sensors Specification. SENSOR POWER SUPPLY (V) SIZE (MM3) INTERFACE TYPICAL APPLICATION ISE20A-T-01-J 12 – 24 30x30x25 Analogue Output Suction Confirmation Systems. Hydraulic Cylinder Working Pressure. PFMC7501-F04-E 12 – 24 60x30 Analogue Output Control of Main Line and Branch Line Equipment. Control of the Air for Spays Control of Gas Cylinder. 3.5.4. Analogue to Digital Converters Analysis To read the sensors analogue output there is the need to select the adequate analogue to digital converter, with enough resolution to read both sensors minimum increment. To make this calculation, one can follow the following equation: 𝐴𝐷𝐶 𝑏𝑖𝑡 𝑟𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 (𝑛)=log𝑉𝐷×𝐸 𝑅×𝑉𝑆 log 2 + 𝐵 1 For the ISE20A, as studied in Section 3.5.1, the sensor is only capable of detecting changes in pressure of about 250Pa, which translates in a voltage output variation of 1mV. Since the sensor output ranges from 0.6V to 5V, its full range is 4.4V. With such knowledge, it is possible to apply the Equation 1, where 𝑉𝐷 represents the full-scale input voltage range of the data logger – in this case 5V is enough; 𝐸 represents the full-scale pressure of the sensor – 1MPa as previously mentioned; 𝑅 is the resolution desired – 250Pa which translates into 1mV; 𝑉𝑆 is the full-scale output voltage range of the signal to be measured – 4.4V; and finally, 𝐵 stands for the polarity of the data logger – since the 5V is what is required, there is no need to measure negative values, therefore it is 0. After applying the formula, the minimum bit resolution required for a data logger to be able to detect the minimum increments by ISE20A is of 13bits with +5V full-scale input voltage range. As for the PFMC7501, studied in Section 3.5.2, the minimum increment in flow is o 1l/min, which translates in a voltage output variation of 8mV. The full range of the output of the sensor is 4V. Applying the same formula above, but this time, 𝐸 is 500l/min; 𝑅 is 1l/min; and 𝑉𝑆 is 4 V.
46 The minimum bit resolution required for a data logger to be able to detect the minimum increments by PFMC7501 is of 10bits. To validate if the calculated bit resolution is correct, one can rearrange the Equation 1 to solve for 𝑅, the resolution. Using variable 𝑛 to represent the desired bit resolution there is: 𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 (𝑅)=𝑉𝐷 𝑉𝑆×2(𝑛−𝐵) × 𝐸 2 For the ISE20A sensor, using 𝑛 as 13, the result is 138.716Pa, which is smaller than the minimum increment, therefore it is more than enough. As for the PFMC7501 sensor, using 𝑛 as 10, the result is 0.610l/min. Once again, since it is smaller than the minimum increment, it is enough. The process of picking the ADCs must be done deliberately. Therefore, more than one solution is recommended. In such circumstance, four ADCs were selected to perform tests and survey the most suitable having in consideration the required resolution. The first and most obvious choice, is the native 12bit, extended to 16bit through hardware oversampling, analogue-to-digital converter embedded into STM32L082XX device. It has up to 13 external channels and 3 internal channels. Three channels are fast channels, while the others are standard channels. The ADC performs conversions in single-shot or scan mode. In scan mode, automatic conversion is performed on a selected group of analogue inputs. The ADC frequency is independent from the CPU frequency, allowing maximum sampling rate of 1.14 MSPS even with a low CPU speed. The ADC consumption is low at all frequencies (25 µA at 10 kSPS, 240 µA at 1MSPS). An auto-shutdown function guarantees that the ADC is powered off except during the active conversion phase. Though the standard 12bit resolution at the outset is not enough, by testing this ADC a general knowledge of the sensor’s working is obtained. Applying the Equation 2, the ARM Cortex-M0+ embedded ADC has a resolution of 199.751Pa for the ISE20A, and 0.110 l/min for the PFMC7501. Though it seems enough; the input range of the ADC is inferior to the necessary – 3.6V. But, although the standard 12bit resolution at the outset is not enough, by testing this ADC a general knowledge of the sensor’s working is obtained. Another option to conduct tests is the National Instruments USB-6218 Multifunction I/O Device, which is made with 32 single-ended or 16 differential analogue input channels, and 2 analogue output channels. The analogue input channels for this Multifunction I/O Device have 16-bit resolution. The sampling and update rates for signal streaming are a maximum of 250kS per second.
47 The maximum working voltage for analogue inputs, including signal plus common mode is 10.4V. This device is equipped with USB 2.0 bus for connecting to other devices. If the Equation 2 is applied with this ADC specifications, the resolution offered by it is 69.358Pa for the ISE20A, and 0.038l/min for the PFMC7501. For both sensors, it is enough to measure the minimum increment. Another option is the LTC2451. It is an ultra-tiny, 16-bit, analogue-to-digital converter. The LTC2451 uses a single 2.7V to 5.5V supply, accepts a single-ended analogue input voltage and communicates through an I2C interface. It uses a delta-sigma modulator as a converter core and provides single-cycle settling time for multiplexed applications. The LTC2451 includes a proprietary input sampling scheme that reduces the average input sampling current several orders of magnitude lower than conventional ∆∑ converters. The LTC2451 is capable of up to 60 conversions per second and, due to the very large oversampling ratio, has extremely relaxed antialiasing requirements. In the 30Hz mode, the LTC2451 includes continuous internal offset calibration algorithms which are transparent to the user, ensuring accuracy over time and over the operating temperature range. The converter has external REF+ and REF– pins and the input voltage can range from VREF– to VREF+. If VREF+ = VCC and VREF– = GND, the input voltage can range from GND to VCC. Following a single conversion, the LTC2451 can automatically enter sleep mode and reduce its power to less than 0.2µA. If the user reads the ADC once per second, the LTC2451 consumes an average of less than 50µW from a 2.7V supply. For the ISE20A, its resolution is of 17.340Pa, and for the PFMC7501 is of 0.010l/min. Both results are when the LTC2451 is powered with 5V. The last of the analysed ADCs is the ADS112U04. The ADS112U04 is a precision, 16-bit, analogue-to-digital converter that offers many integrated features to reduce system cost and component count in applications measuring small sensor signals. The device features two differential or four single-ended inputs through a flexible input multiplexer (MUX), a low-noise, programmable gain amplifier (PGA), two programmable excitation current sources, a voltage reference, an oscillator, and a precision temperature sensor. The device can perform conversions at data rates up to 2000 samples-per-second with single-cycle settling. At 20 SPS, the digital filter offers simultaneous 50Hz and 60Hz rejection for noisy industrial applications. The internal PGA offers gains up to 128. This PGA makes the ADS112U04 ideally suited for applications measuring small sensor signals, such as resistance temperature detectors (RTDs), thermocouples, thermistors, and resistive bridge sensors. The ADS112U04 features a 2-wire, UART-compatible interface. In applications that require galvanic isolation this universal asynchronous receiver/transmitter interface minimizes the number of digital
48 isolation channels, thus saving cost, board space, and power. For the ISE20A and PFMC7501, the resolution of this ADC is the same as it was with the LTC2451. The main reason for choosing two ADCs to test with identical specifications is on the communication interfaces they offer. The LTC2451 communicates through an I2C interface, while the ADS112U04 communicates through a UART interface. In industrial environment the electrical noise can greatly impact the surrounding electronics, especially transmission lines. Therefore, a solution for dealing with the noise must be well thought of. Another reason is the distance of the communication. Although I2C may suffice for smaller distances, when exposed to some larger, it may be affected by noise to the point where essential data is being lost. By testing an ADC with UART it is possible to connect a RS485 transceiver to it and make the communication through this protocol with more guarantees that data won’t be corrupted. On that matter, The SN65LBC176A-EP transceiver was also chosen to connect to the UART interface of the ADS112U04. Table 6 resumes all the ADCs to be tested and their specifications. Table 6 - ADCs Summary Specification. MAX POWER SUPPLY (V) BIT RESOLUTION INTERFACE MODULATION CHANNELS STM32L082XX ADC 3.6 12 - Sigma-Delta 13 NI USB-6218 ±10 16 USB 2.0 Sigma-Delta 32 LTC2451 5.5 16 I2C Sigma-Delta 1 ADS112U04 5.5 16 UART Sigma-Delta 4 3.5.5. ADC Interface 3.5.5.1. I2C Serial Communication BUS I2C is a combination of the best features of SPI and UART. With it, it is possible to connect multiple slaves to a single master, like SPI, and it is also possible to have multiple masters controlling one or multiple slaves. It is useful when there is more than one microcontroller logging data to a single memory card.
49 Just like UART communication, I2C only uses two wires to transmit data between devices: the SDA – Serial Data – the line for the master and slave to send and receive data; and the SCL – Serial Clock – the line that carries the clock signal, as it is illustrated in Figure 30. Figure 30 - I2C Wiring. Since it is a serial communication protocol, the data is transferred bit by bit along a single wire, the SDA. The output of bits by the I2C is synchronised to the sampling of bits. The synchronization is ensured by a clock signal shared by the master and the slave. The data is transferred in messages. Messages are broken up into frames of data. An I2C message, contains an address frame. This frame contains the address of the slave in binary. Besides the address frame, it also contains one or more frames with the data to be transmitted. Between data frames, there is the ACK/NACK bit. The message also includes a start and stop condition and read/write bits. As it is depicted in Figure 31, the Start Condition happens when the SDA line switches from a high voltage level to a low voltage level before the SCL line switches from high to low. The Stop Condition is the inverse of the Start Condition; the SDA line switches from a low to a high voltage level, after the SCL line switches from low to high. The Address Frame is a 7-to-10-bit sequence, unique to each slave, that identifies the slave when the master wants to communicate with it. The Read/Write bit is a single bit that specifies whether the master is sending data to the slave – low voltage level – or requesting data from the slave – high voltage level. Finally, the ACK/NACK bit appears after each frame in a message; if the address frame or data frame was successfully received, an ACK bit is returned to the sender from the receiving device.
50 Figure 31 - I2C Message Frames. 3.5.5.2. UART Serial Communication Universal Asynchronous Receiver-Transmitter – UART, is a communication protocol that, homologous to its name, uses asynchronous serial communication, therefore, there is no clock signal to perform the synchronization of the output bits going to the receiving end. It uses two lines to transmit data between two devices, as illustrated in Figure 32. One is the Transmitter – Tx – and the other is the Receiver – Rx. Due to its asynchronous communication, it is up to each device to settle the internal clock to the same speed to sample the incoming data and sending the data. This synchronization is managed by having the same baud rate on both the transmitting and receiving device. In case the baud rate is not the same, discrepancies during data handling may happen. Figure 32 - UART Wiring. The transmission of information is in packet mode. A packet consists of 1bit reserved for the start condition, a data frame, and 2 more bits reserved for the parity and stop bits, respectively (Figure 33).
51 Figure 33 - UART Packet. When the transmission is in standby mode, meaning there is no data to be transmitted, the line is held at a high voltage level. Therefore, to start a transmission, the line that transmits must be pulled from high to a low voltage level for just one clock cycle. When the receiving line detects this transition, it starts reading the bits matched to what is the data frame, at the frequency of the settled baud rate. This frame contains the data and information that is actually being transferred, and it can be from 5 up to 8 bits long in case parity is used. On the other hand, if no bit for the parity is being used, the data frame can go up to 9 bits, where the least significant bit is sent first. By using the parity bit, it is possible to detect if any data has changed or been lost during the transmission. If the parity is 0, the total number of bits in the data frame should be an even number. If the parity is 1, then the number of total bits should be odd. When the parity is checked and it matches the data, the integrity of the communication hasn’t been compromised. To end the communication, the transmission line is pushed from a low to a high voltage level for one cycle duration. 3.5.5.3. RS485 Standard RS485 defines a point-to-point communication of electrical devices in terms of the electrical interface and the physical layer. This standard is also known for its support on long cabling distances while preserving the communication signal in noisy industrial environments, and the ability to hold multiple devices on the same BUS. Since its creation in 1998, it has been the number one selection for many computer automation systems. This is due to the standard allowing for multiple devices on the same BUS and long cabling distances, as mentioned before, but also to his noise immunity and fast communication speed, making it very versatile and easy to understand why its frequent use in industrial environments. RS-485 is characterized by two lines, “A” and “B”. These lines must be differential and balanced – two lines twisted in a pair cable with similar impedance on each line. Besides the matched
58 As it is exemplified, the LTC2451 only needs to be connected to the Cognitive CMMS Board through the SDA and SCL lines for the I2C connection. Since the output of the pressure sensor and the flow rate sensor has a maximum range of 4.4V, the reference voltage only needs to be 5V with the same GND as the one powering the sensor. Besides the direct connection, the output of the sensor is connected to a comparator. This comparator is to detect some anomalies that might occur outside the reading period of the board. This way, if the comparator detects a reading over the specified, raises an interruption to the system so it starts reading. Besides the simple wiring, LTC2451 also has a simple implementation to be made. The flowchart in Figure 43, clarifies how the sensor works. Figure 43 - LTC2451 Configuration and Sampling Flowchart. The left-hand side flowchart matches what happens inside the Sensors Manager Thread, studied in section 3.6.2, specifically the “Configure Sensors” block. The LCT2451 essentially has two configurations, and these are about the operating mode. There is the 30Hz and the 60Hz mode. To configure the 30Hz mode, one must write to the ADC “0x01”, if the 60Hz mode is intended, then it is “0x00”. By choosing which mode the ADC must work, a different register is sent by I2C to the determined Address.
59 The flowchart in the middle corresponds to the Sample Variables Thread. By configuring the sensor in the previous thread, this one is automatically converting the analogue signal of the ISE20A into a digital one. To access the information, one only has to call the read function of the I2C protocol and convert the returned variable into the specific units – Pa in case of the pressure sensor; l/min in case of the flow rate sensor. 3.6.4. UART/RS485 ADCs In the case of the ADS112U04 it is more complicated. Since the goal of testing this solution is to minimize the noise affecting the signal in an industrial environment, it was decided to use a RS485 transceiver associated with the ADC interfaced by UART. Thus, there are 3 components between the MCU and the Sensor. The proposed wiring solution is represented in the Figure 44. Figure 44 - ADS112U04 & SN65LBC176A-EP Wiring Example. The connection to the board, as it is exemplified, is much complex than the LTC2451. Since there is not a Slave Processor to deal with one of the transceivers, the board must do all the work and control everything. Therefore, needs to be connected to both of the transceivers by one I/O pin each. Besides that, it needs to be directly connected by another set of two I/O pins to the “Reset” and “DRDY” pins of the ADS112U04 so it can easily reset and know when the sensor is ready to transmit data. And finally, a complementary solution, is the comparator circuit designed at the bottom of the figure. This circuit takes the Sensor Output on one side, and a Reference Voltage on the other. When the sensor output surpasses the reference voltage, which is essentially a manually determined threshold through the use of a variable resistor, the output of the Amp-Op turns on, signalling the MCU through the use of another I/O pin that said threshold was surpassed.
60 With that sense of thought, and with all that was explored before about RS485, the ADS112U04 through its datasheet, and about UART, it is possible to elaborate the flowcharts present in Figure 45. Figure 45 - ADS112U04 & SN65LBC176A-EP Initialize, Configuration, and Sampling Flowcharts. Once again, just as the wiring example, the flowcharts are also more complex when compared to the LTC2451 ones. Here, the ADC is much more configurable and has more steps to initialize it rather than just powering it on. One can initialize the sensor through the use of the “Reset” pin, or through a command. Either way, once reset is done, it is important to read back the configuration
61 registers and check if they are on default. This way it is possible to ensure the reset was properly done, and if the sensor is answering as it should. There are five available registers to configure. The first register, 00h, configures the PGA, Gain, and the Input Multiplexer. Leaving all the available configurations on default, the register has a value of 00h, which translates in a reset. The second register, 01h, enables the configuration of the Data Rate, Operating Mode, Conversion Mode, Voltage Reference, and Temperature Sensor Mode. As for the Data Rate it can be left as default with 20 samples per second. The operating mode is to be in normal mode, 256kHz. The conversion mode is continuous, so it is always converting and whenever the end-device requests a read, it takes the latest. The voltage reference must be external, and the temperature sensor mode may be disabled. To achieve such a configuration, the register must be set to 0Ah. The third register, 02h, configures the conversion flag, data counter, data integrity checker, burn-out current sources, and IDAC current setting. All of these configurations can be left in default, setting the register address to 00h. The fourth register, 03h, configures the routings and output mode. Once again, these configurations are the default, i.e., 00h. The fifth and last register, 04h, configures the GPIOs. All of these configurations are to be default, so is left as 00h. Contrarily to the LTC2451, the ADS has multiple possible configurations, as it is represented in the middle flowchart. Any configuration, or simply, communication between the MCU and the ADS must go through several steps since it is using RS485 as the middleman. If the MCU wants to send configurations or set register, it needs to activate the DE pin on the transceiver in its side, and active the RE pin on the transceiver in the sensor side; if the MCU wants to receive data from the sensor it must do the opposite. These tasks are as well represented in the flowcharts. Sampling the sensor only occurs once the initialization and configuration are cleared. Then, it waits for the pin connected to the output of the Amp-Op to signal abnormal behaviour. Then it reads the values, converting them to the proper units. 3.6.5. Dashboard Making use of the existing dashboard, a new section will be added. The dashboard is currently equipped with the home screen where it is possible to see how many devices are currently online, offline, with problems or emergencies – 1. Furthermore, it is possible to see the location of those equipped with GPS – Global Positioning System – 2, as well as the device state – 3, and possible
62 notifications they might have – 4. Figure 46 depicts the home screen of the dashboard at its current state of development. Figure 46 - Dashboard Home Screen Overview. Hovering the mouse in the left pane of the screen as depicted in Figure 47, a menu appears where it is possible to switch between the home screen – 1, the metrics screen – 2, where it is possible to monitor the state of each metric being measured – sensors configuration – 3, and the specification of the dashboard – 4. Besides those functionalities, another button exists on the bottom of the menu that corresponds to the “sign out” function. Figure 47 - Dashboard Viewing Menu Switching.
63 The window to be designed and implemented is in the metrics screen. The proposed visual design and interface is illustrated in Figure 48. The proposed interface is coupled with a top bar where it is possible to select the end-device – in this case it is important to select the one that measures the air pressure and flow metrics by previously knowing its ID. It is also possible to select the time period which is intended to be analysed. Besides that, on the settings wheel, a dropdown menu appears to configure which metric or metrics are to appear. Figure 48 - Proposed Design for the Dashboard. For each metric, there is a graph showing the latest sample received, on the left, a graph showing the variation of the metric along the time period chosen, on the middle, and finally, on the right, another graph with the average for that same time period.
64 Chapter 4 4. Implementation and Testing The implementation chapter is the phase of the realization of the previous chapter, the design phase. It presents a description of the workflow and how the different peripherals were implemented and tested. It begins by studying ADCs and implementing the interface to communicate with them on the end-device. After the implementation, testing is done to conclude if the objective is reached.
65 4.1. National Instruments USB-6281 ADC In this subsection the implementation for testing the National Instruments USB-6281 Logger is described. Consists of implementing in Matlab a data acquisition object for the logger, read a specific value at a certain sampling rate, and storing them in a .xlsx file. Later, take all the generated files and merging them so the data can be later processed. To test the sensors, a simple testing setup was built. The setup consisted in using the portable electric air compressor with a pressure gauge present in Figure 49. The compressor used, has an 8- bar maximum output and a 24L capacity. The output of the compressor was connected to the input of the sensor having into consideration any possible air leakage that could affect any measurement by isolating the air hose fittings with a special PVC sealer. Figure 49 - Air compressor specifications (a), instrument (b) and gauge (c). Tests were made by decreasing the gauge of the compressor to its minimum and verifying the output on the screen of the sensor with the setup on Figure 50.
66 Figure 50 - NI USB-6281 testing setup. This minimum was recorded and verified as 0,002 MPa on the sensor and the pointer practically on the 0 of the gauges in bar (actually 0,02 bar, although it was not possible to make such confirmation by the naked eye). The tests continued by increasing the pressure regulator until the sensor showed 0,005 MPa and then the increments were always of 0,005 MPa until the maximum of the portable electric air compressor was reached (about 0,685 MPa – 6,85 bar). For each increment, the data from the gauge was taken by naked eye to compare with the sensor screen and with the help of a MATLAB script on the NI USB-6218. To take into consideration, it wasn’t possible to record the full range of the sensor with both methods since the portable electric air compressor didn’t have the capacity to match the specified maximum of the sensor. For each increment, 10000 samples were taken over the span of 1 second. The creation and configuration of the object to retract data from the NI Logger is shown in Figure 51. Firstly, the object is created, then associated with the object, it is defined from which of the 16 inputs the read should be done, attributing it a name and a mode. As it is shown in the figure, from the object “d”, it was chosen the “Dev1” – device 1 – and the channel “ai0” to read Voltage. The configured mode is Single Ended. The sampling rate was set to 10kH. Figure 51 - NI USB-6281 Object Configuration. As demonstrated in Figure 52, after the object is configured, it is called the built-in function to read the data according to the parameters defined above. The signal is read in a timetable format for 1 second, gathering exactly 10000 values. Then, this table is exported to a .xlsx file.
67 Figure 52 - NI USB-6281 Read & Store Data. After all the data from the Logger is gathered, there are multiple separated files. Each file corresponds to a pressure level measured. To further analyse the data, all the files are merged still recurring to MATLAB. First, the directory of these files is specified, then using the “fullfile” function from MATLAB, a full filename from the directory and filename specified is built. After having the number of files and its names, the data inside them is iterated and stored in an array. Finally, a cycle is again created to take all the data in the array and transfer it to a single .xlsx file (Figure 53). Figure 53 - Store the data in a single .xlsx file. 4.1.1. National Instruments USB-6281 ADC Results To further investigate the data and arrange it in graphical form for an easier evaluation, Python was used, recurring to “numpy”, “matplotlib”, and “scipy” libraries. The script is the same for both of the sensors, only differing in the scales and Unit Systems. As shown in Figure 54, it starts by importing the file with all the data gathered from each sensor and creates arrays for the relating the pressure/flow rate with the voltage output.
74 Following the discussed guidelines in the above sections to maintain readability and coherence, the sensor struct is as follows in Figure 62. Figure 62 - ISE20A Variable and Sensor Struct. For the variable, the ISE20A, the units is defined as “MPa” since the output of the sensor is measured in Pascal, the default status is also defined, and the type is a 16bit integer. As for the sensor struct, the functions are defined. Since it is the pressure sensor that is being the example target, the initializing function follows the name of the sensor, as well as all other functions. Usually, an ADC has unique registers and IDs. In the code, one way to determine if the ADC is responding, is writing to those types of registers, and comparing their response with what is specified on the datasheet. However, this ADC is not coupled with those types of registers, therefore the only way to validate if the sensor is responding, is by triggering the reading mode. To configure the sensor, there are only two options. It can be configured to the 30Hz mode, or the 60Hz mode. The configuration is then sent via I2C to the LTC2451 (Figure 63).
75 Figure 63 - ISE20A w/ LTC2451 init & configure Functions. After sending the configuration, the sensor automatically starts converting the analogue signal into a digital one continuosly. To read, it is only necessary to call the read function, convert, and store the values (Figure 64). Figure 64 - Read the LTC2451 Conversion. 4.2.1. LTC2451 ADC Results To test the LTC2451 performance at reading the ISE20A and the PFMC7501 sensor, a similar setup to the previous tests was used. The same portable electric air compressor was used to change the sensors variable, and the measurements were taken with the end-device. Due to the small capacity of the air compressor, 24L, it is not possible, once again to measure the full scale and range of each sensor. Therefore, just a portion of the range was evaluated. For ISE20A, the tests consisted on taking ten thousand samples when the sensor was measuring 0.02MPa, repeating after incrementing to 0,05MPa, and so forth until 0.5Mpa – which translated as the maximum the air compressor could supply. As for the PFMC7501, tests began at 0l/min with increments of 10l/min until 60l/min – which translated once again the maximum the compressor could supply. With the PFMC7501, due to the air compressor small capacity, it is hard to maintain a steady air flow. This may reflect on the final values and conclusions.
76 Once more, after the retrieval of all the data as described above, the same Python script was used with minor adjustments, as illustrated in Figure 65, to create the diagrams and interpret the results. Figure 65 - Python Script to create the normal distribution and histograms. It starts by loading the file containing all the data. Then creates the arrays for the x axis – the pressure in MPa. After the axis are defined, in a for loop it is selected the first three pressure values to form the boxplots and histograms, then the middle three, and finally the last three. To compare with the National Instruments USB-6281 Logger, the same calculations were made and are referenced in Table 9 and Table 10. Table 9 - ISE20A Max & Avg Std Deviation from LTC2451. Average Standard Deviation [V] Average Standard Deviation [Pa] Maximum Deviation [V] Maximum Deviation [Pa] LTC2451 0.0037 916.5 0.015 3752.7 NI USB-6281 0.0017 425.1 0.027 6750 % Deviation when compared to the expected deviation 3.30% 13.39%
77 Table 10 - PFMC7501 Max & Avg Std Deviation from LTC2451. Average Standard Deviation [V] Average Standard Deviation [L/MIN] Maximum Deviation [V] Maximum Deviation [L/MIN] LTC2451 0.0116 1.444 0.0233 2.913 NI USB-6281 0.0025 0.3119 0.023 2.875 % Deviation when compared to the expected deviation 9.51 % 19.10% As expected, due to lower resolution of the LTC2451 comparatively to the NI USB-6281, the results aren’t so good. The standard deviation for the ISE20A only differs by 0.002V while on the PFMC7501 differs by 0.0091V. This difference is due to the capacity, and low maintenance, of the electric air compressor used in the tests. Since it was the only equipment available, there is no alternative to repeat the tests in attempt to get better ones. Although overall the results are worse than the results from the NI USB-6281, they aren’t of concern to the evaluation of the equipment that will be analysed, and show a better normal distribution, showing more repeatability around the expected theoretical value. Figure 66 illustrates graphically the results from the ISE20A with the LTC2451. This ADC has a transition noise of 1.4µV and an offset error of 0.5 to 2 mV. Taking into consideration once again the error induced by the sensor. The maximum predicted error can be of about 112mV for the ISE20A and 122mV for the PFMC7501. The standard deviation of the pressure sensor is far lower than that theoretical error, therefore it is of no concern. Even the maximum deviation that was measured, is in the threshold set by the theoretical error since it is only 13.39% of what was expected.
78 Figure 66 - ISE20A LTC2451 Results. Figure 67 illustrates the results for the PFMC7501 with LTC2451. Once again, the conclusion can be the same as the pressure sensor since the maximum deviation detected was only 19.10% of the maximum possible induced deviation by the devices. Once again, by having a more powerful air compressor that can stabilize for longer the output of air, and by reducing possible noise on the transmission lines, better tests can be done. Figure 67 - PFMC7501 LTC2451 Results.
79 4.3. ADS112U04 ADC With RS485 Communication Once the implementation of the ADC with I2C interface is done, successfully communicating with the database, and the data being properly displayed on the designed and implemented dashboard, a new test and implementation is to be done. One of the objectives of the dissertation is to settle the end-device in an industrial environment to monitor machines with air characteristics. Due to industrial environment being endowed with several electrical machines and components, magnetic fields are surely present. I2C isn’t an interface immune to magnetic fields, therefore the data that is being transmitted can no longer be considered reliable. On that note, through the use of RS485 coupled with UART interface, the signals can be improved in such environments. The new ADC previously analysed in the sections before needs a new board to be tested alongside with the RS485 transceiver. Just as the LTC2451 board, this one is to be the bridge between the sensors and the CMMS board. The board, on the side of the Sensors needs to have the ADC sampling the data directly from the Sensors, and a RS485 transceiver to convert the UART signal into an A/B signal. On the other side, the board on the side of the CMMS board, needs only to have another RS485 transceiver in order to convert the signal back to UART from the A/B. Figure 68 depicts the board circuit and the printed PCB design. Both boards and powered with 5V, that will also serve as an external reference voltage for the ADC. Figure 68 - ADS112U04 and SN65LBC176A-EP PCB Circuit.
80 The board represented by Figure 69 connects to the board on Figure 70 through two wires that are connected to the pins “Out_A” and “Out_B” of both boards. Figure 69 - ADS112U04 and SN65LBC176A-EP Top & Bottom View. Figure 70 - SN65LBC176A-EP Top View. Just as the LTC2451 board, after having the ADS112U04 printed according to its design, the code to test the ADC and communication needs to be implemented. Due to the ADS112U04 being out of stock, the board cannot be fully completed, hence tested. However, the communication was tested. Firstly the “OUT_A” and “OUT_B” pins from both the board missing the ADC and the board with just the transceiver need to be connected. Then using the CMMS board to send messages through UART to the board on Figure 69, it is possible to detect the reception of that same message on the board of the Figure 70 thus validating the communication. The tests to the boards and ADC, as well as to the RS485 communication routes to future work. 4.4. Dashboard Visualization For the purpose of the user being able to somewhat interact with the system, a page was added to the dashboard in order to visualize the data. As illustrated in the Section 3.6.4, the dashboard has to be able to show the data for the Pressure Sensor, as well as for the Flow Sensor. This is to be customizable, allowing the user to choose which one wants to be displayed, or even both. Besides
81 the data being displayed, the user can choose the time range for the data to be analysed. If there is data collected inside that range in the database, exemplified by the Figure 71, it is displayed. Finally, a last feature is the ability to select which units the data is displayed, for a more comprehensive interpretation. Figure 71 - MongoDB Database Example. Figure 72 corresponds to the configuration for the Pressure Sensor in the .yaml file. This file, and configuration, is useful for distinguishing the different implemented sensors, and for building the layout of the sensor on the dashboard. The structure is similar to all sensors. For instance, the flow sensor has the same structure, only varying on the “name”, “id”, “label”, “min”, “max”, and “unit” variables. Figure 72 - Pressure Sensor Configuration.
82 The different layouts of the several components of the Dashboard are designed by using Bootstrap. Figure 73 illustrates an example of the use of this tool. It is possible to notice that for the “units_description_layout”, it is returned a component of the Bootstrap that is a “Row”. This component is capable of wrapping several columns. Here, this specific row, is wrapping a description text and two buttons. Other layouts are implemented, with different characteristics and applications, such as the layout for the gauge diagrams, plots, and navigation bar. Figure 73 - Layout Example of the Dashboard using Bootstrap. An example of a button implementation, such as the one mentioned in the previous paragraph, can be analysed in the Figure 74. The purpose of this specific button is to display a list of possible selections. This selection determines the units that the data is going to be displayed. It is coupled with Pascal, bar, and psi. It returns a component of the Bootstrap, “Dropdown”, with a configuration to show a description and two buttons. One for the pressure units’ and another for the flow units. Its style is set to “none” in order to appear only when a specific board is selected. A similar button was created for the Flow Sensor with the units l/min, m3/h, and l/s.
83 Figure 74 - Button Example of the Dashboard using Bootstrap. Besides displaying customization functionalities, Figure 75, illustrates the callback functions where all the selections are processed. These callbacks are features of the “plotly dash” library and they have inputs and outputs defined as the arguments of the “@app.callback” decorator. These inputs and outputs are the properties of a particular component, therefore if the units button is updated, the callback where that component is an argument is called. In Figure 75, it is possible to comprehend that once the “sensor-container” is active, the function of this callback is executed. It detects which sensor is being displayed, and shows the respective button, or buttons, along with the description. This description is an update to the description mentioned in Figure 73. Figure 75 - Callback Function Example of the Dashboard. The implemented dashboard is illustrated in Figure 76. The figure a) corresponds to the dashboard when both the Pressure and Flow Sensors are selected in the Settings button. As for the figure b), corresponds to when only one sensor, in this case the Pressure Sensor, is selected. As it can be analysed, the descriptions and units’ buttons are different, according to what is selected.
90 [21] P. A. Higgs, R. Parkin, M. Jackson, A. Al-Habaibeh, F. Zorriassatine and J. Coy, “A Survey on Condition Monitoring Systems in Industry,” in Proceedings of ESDA 2000:7th Biennial ASME Conference Engineering Systems Design and Analysis , 2004. [22] E. Technology, “Importance of Condition Monitoring in Renewable Energy Asset Management (Photovoltaic Solar Plants),” Elegrow Technology, 2021. [Online]. Available: https://elegrow.com/case_study/photovoltaic-solar-plants/. [23] A. Akula, S. Goel and R. Ghosh, “Condition Monitoring Saves Money and Prevents Failures,” CSIR- Central Scientific Instruments Organisation, no. American Institute of Chemincal Engineers (AIChE), p. 5, 2017. [24] E. P. C. Morris, G. Feng and G. D. Horler, “Enabling the multiple use of condition monitoring devices for real-time monitoring, real-time data logging and remote condition monitoring,” in 7th IET Conference on Railway Condition Monitoring 2016 (RCM 2016) , 2016. [25] B. V. Sokolov, D. Ivanov and A. Dolgui, “Scheduling in Industry 4.0 and Cloud Manufactoring,” no. 3030431770, p. 274, 2020. [26] J. Holler, V. Tsiatsis, C. Mulligan, S. Karnouskos, S. Avesand and D. Boyle, Oxford: Academic Press, 2014. [27] M. H. Miraz, M. Ali, P. S. Excell and R. Picking, “A Review on Internet of Things (IoT), Internet of Everything (IoE) and Internet of Nano Things (IoNT),” 2015 Internet Technologies and Applications (ITA), pp. 219-224, 2015. [28] M. Vega, “Internet of things statistics, facts & predictions,” 2020. [Online]. [Accessed 4 7 2022]. [29] J. Y. Khan and M. R. Yuce, “Internet of Things (IoT) : systems and applications,” no. 9814800295, 2019. [30] R. Chow, “The last mile for iot privacy,” IEEE Security Privacy, vol. 15, pp. 70-80, 2017. [31] L. Xing, ““Reliability in internet of things: Current status and future perspectives,” IEEE Internet of Things Journal, vol. 7, no. 8, pp. 6700-6720, 2020.
91 [32] J. K. Reena and R. Parameswari, “A smart health care monitor system in iot based human activities of faily living: A review,” in 2019 Internation Conference on Machine Learning, Big Data, Cloud and Parallel Computing (COMITCon) , 2019. [33] F. Samie, L. Bauer and J. Henkel, “IoT technologies for embedded computing: A survey.,” in 2016 International Conference on Hardware/Software Codesign and System Synthesis , 2016. [34] Y. Song, J. Lin, M. Tang and S. Dong, “An internet of energy things based on wireless lpwan,” in Engineering , 2017, pp. 460-466. [35] M. Centenaro, L. Vangelista, A. Zanella and M. Zorzi, “Long-range communications in unlicensed bands: The rising stars in the iot and smart city scenarios,” in IEEE Wireless Communications , 2016, pp. 60-70. [36] D. Patel and M. Won, “Experimental study on low power wide area networks (lpwan) for mobile internet of things,” in 2017 IEEE 85th Vehicular Technology Conference (VTC Spring) , 2017. [37] U. Raza, P. Kulkarni and M. Sooriyabandara, “Low power wide area networks: An overview,” in IEEE Communications Surveys & Tutorials , 2017, pp. 850-870. [38] K. Mekki, E. Bajic, F. Chaxel and F. Meyer, “Overview of cellular lpwan technologies for iot deployment: Sigfox, lorawan, and nb-io,” in 2018 IEEE Iternational Conference on Pervasive Computing and Communications Workshops (percom workshops) , 2018. [39] L. Vangelista, A. Zanella and M. Zorzi, “Long-range iot technologies: The dawn of lora,” in Future Access enablers of ubiquitous and intelligent infrastructures , Springer, 2015, pp. 50-60. [40] Y. P. E. Wang, X. Lin, A. Adhikary, A. Grovlen, Y. Sui, Y. Blankenship, J. Bergman and H. S. Razaghi, “A primer on 3gpp narrowband internet of things,” IEEE Communciations Magazine, pp. 115-120, 2017. [41] Tumiran, “Development of CMMS (Computerized Maintenance Management System) in Yogyakarta Electric Power Distribution Network Company To Support The Strategic Maintenance,” in International Conference on Condition Monitoring and Diagnosis , Beijing, 2008. [42] G. M and P. Y, Maintenance assistée par ordinateur, Masson, 1985.
92 [43] IBM, “What is a CMMS?,” [Online]. Available: https://www.ibm.com/se-en/topics/what-is-a- cmms. [Accessed 02 12 2021]. [44] L. Zemmouchi-Ghomari, S. Chergui and A. Ouadah, “Proposal of an approach of Selection and Impact Study of CMMS use on Maintenance functioning, a case study,” in 1st International Conference on Innovative Research in Applied Science, Engineering and Technology (IRASET) , Meknes, 2020. [45] W. Cato and R. Mobley, Computer-managed maintenance systems: a step-by-step guide to effective management of maintenance, labor, and inventory., Butterworth-Heinemann, 2001. [46] C. O'Donoghue and J. Prendergast, “Implementation and benefits of introducing a computerised maintenance management system into a textile manufacturing company.,” J Mater Process Technol, 2004, pp. 153-154:226-32. [47] Z. Zhang, Z. Huo and Z. Li, “CMMS and its application in power system.,” Int J Power Energy Syst, 2006, pp. 26:75-82. [48] M. Craine, “The Role of CMMS A white paper on the selection and implementation of computerized maintenance management systems,” Industrial Technologies, pp. 1-7. [49] M. Carnero and J. Novés, “Selection og computerised maintenance management system by means of multicriteria methods,” Prod Plan Control, 2006, pp. 17:335-54. [50] A. Rastegari and M. Mobin, “Maintenance decision making, supported by computerized maintenance management system,” in Annu. Reliab. Maintainab. Symp., IEEE , 2016. [51] A. Labib, “A decision analysis model for maintenance policy selection using a CMMS,” J Qual Maint Eng, 2004, pp. 10:191-202. [52] S. Dudley, “What is CMMS? The quick guide to everything you need to know,” 06 01 2020. [Online]. Available: https://www.ibm.com/blogs/internet-of-things/iot-history-cmms/. [Accessed 01 12 2020]. [53] R. Rio, “ARC SOLUTION GUIDE. MRO Inventory Rationalization and Optimization VISION, EXPERIENCE, ANSWERS FOR INDUSTRY DECEMBER Executive Overview,” 12 2010. [Online]. Available: https://docplayer.net/54724808-Arc-solution-guide-mro-inventory-rationalization-and-
93 optimization-vision-experience-answers-for-industry-december-executive-overview.html. [Accessed 01 12 2020]. [54] DZone, “Top 11 Cloud Platforms for Internet of Things (IoT),” 27 12 2019. [Online]. Available: https://dzone.com/articles/10-cloud-platforms-for-internet-of-things-iot. [Accessed 09 07 2022]. [55] PTC, “The Power of Now,” ThingWorx, pp. 1-12, 12 2019. [56] P. Hewlett, “Real-Time Analysis and Condition. Monitoring with Predictive Maintenance. Transforming Data into Value with HPE Edgeline,” Development Enterprise Packard Hewlett, 2017. [57] Microsoft, “Azure,” IoT Concepts and Azure IoT Hub, 14 04 2022. [58] Microsoft, “Facilities management powered by mixed reality and IoT,” Microsoft, [Online]. Available: https://docs.microsoft.com/en-us/azure/architecture/solution-ideas/articles/facilitiesmanagement-powered-by-mixed-reality-and-iot. [Accessed 10 05 2022]. [59] Google, “Cloud Architecture Center: Technical overview of Internet of Things,” Google, 21 03 2016. [Online]. Available: https://cloud.google.com/architecture/iot-overview. [Accessed 10 05 2022]. [60] R. McCauley, “Using Alexa Skills Kit and AWS IoT to Voice Control Connected Devices,” 03 05 2016. [Online]. Available: https://developer.amazon.com/blogs/post/Tx3828JHC7O9GZ9/Using-Alexa-Skills-Kit-and-AWS- IoT-to-Voice-Control-Connected-Devices. [Accessed 10 05 2022]. [61] Amazon, “AWS IoT Core,” AWS, [Online]. Available: https://aws.amazon.com/pt/iot-core/. [Accessed 10 05 2022]. [62] R. Rajagopalan, A. Fernando and R. Vinayagam, “Transforming Smart Buildings and Facilities with Cognizant Connected Places on AWS,” 22 04 2019. [63] Oracle, “Oracle Internet of Things Cloud Service,” [Online]. Available: https://docs.oracle.com/en/cloud/paas/iot-cloud/index.html. [Accessed 12 05 2022].
94 [64] S. Paiva, ““Software/hardware co-design for nb-iot low-power applications: Consumption and performance analysis,” Master's Thesis, University of Minho, 2020. [65] J. M. M. Borges, “Robust Software Services for IoT Embedded Systems,” Master's Thesis, University of Minho. [66] “Flow sensors & flow monitors - autosen.com,” [Online]. Available: https://autosen.com/en/Process-Sensors/Flow-sensors. [Accessed 02 01 2022]. [67] M. A. Sharif and R. I. Grosvernor, “Process plant condition monitoring and fault diagnosis,” SAGE journals, vol. 212, no. 1, pp. 13-30, 1998. [68] S. Sikarwar, Satyendra, S. Singh and B. C. Yadav, “Review on pressure sensors for structural health monitoring,” Photonic Sensors, vol. 7, no. 4, pp. 294-304, 31 8 2017. [69] P. W. Chen and D. D. L. Chung, “Low-drying-shrinkage concrete containing carbon fibres,” Composites Part B-Engineering, vol. 27, no. 3-4, pp. 269-274, 1996. [70] X. L. Fu and D. D. L. Chung, “Self-monitoring of fatigue damage in carbon fiber reinforced cement,” Cement & Concrete Research, vol. 26, no. 1, pp. 15-20, 1996. [71] Avnet Abacus, “Pressure Sensors: The Design Engineer's Guide,” Avnet Abacus, [Online]. Available: https://www.avnet.com/wps/portal/abacus/solutions/technologies/sensors/pressuresensors/types/. [Accessed 01 01 2022]. [72] M. Asadnia, A. G. P. Kottapalli, Z. Shen , J. Miao and M. Triantafyllou, “Flexible and Surface- Mountable Piezoelectric Sensor Arrays for Underwater sensing in Marin Vehicles,” IEEE Sensors Journal, vol. 10, no. 13, pp. 3918-3925, 2013. [73] A. Aqilah, A. Jaffar, S. Bahari, C. Y. Low and T. Koch, “Resistivity characteristics of single miniature tactile sensing element based on pressure sensitive conductive rubber sheet.,” IEEE 8th International Colloquium on Signal Processing and its Applications, pp. 223-227, 2012. [74] W. C. Choi, “Polymer micromachined flexible tactile sensor for three-axial loads detection.,” Transactions on Electrical and Electronic Materials, vol. 11, no. 3, pp. 130-133, 2010.
95 [75] K. Noda, Y. Hashimoto, Y. Tanaka and I. Shimoyama, “MEMS on robot applications,” Proceedings of the International Solid-State Sensors, Actuators and Microsystems Conference, pp. 2176-2181, 2009. [76] H. K. Lee, J. Chung, S. I. Chang and E. Yoon, “Normal and shear force measurement using a flexible polymer tactile sensor with embedded multiple capacitors,” Journal of Microelectromechanical Systems, vol. 17, no. 4, pp. 934-942, 2008. [77] H. Takao, K. Sawada and M. Ishida, “Monolithic silicon smart tactile image sensor with integrated strain sensor array on pneumatically swollen single-diaphragm structure,” IEEE Transactions on Electron Devices, vol. 53, no. 5, pp. 1250-1259, 2006. [78] A. S. Fiorillo, “Design and characterization of a PVDF ultrasonic range sensor,” IEEE Transactions on Ultrasonics, Ferro-electrics, and Frequency Control, vol. 39, no. 6, pp. 688-692, 1992. [79] J. H. Shan, T. Mei, L. Sun, L. Ni, M. Meng and J. R. Chu, “The design and fabrication of a flexible three-dimensional force sensor skin,” in Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS '05) , 2005. [80] P. Rey, P. Charvet, M. T. Delaye and S. A. Hassan, “High density capacitive pressure sensor array for fingertip sensor application,” in Proceedings of the International Conference on Solid-State Sensors and Actuators , Chicago, 1997. [81] B. J. Kane, M. R. Cutkosky and G. T. A. Kovacs, “A traction stress sensor array for use in highresolution robotic tactile imaging,” Journal of Microelectromechanical Systems, vol. 9, no. 4, pp. 425-434, 2000. [82] E. Teomete, “Measurement of crack length sensitivity and strain gage factor of carbon fiber renforced cement matrix composites,” Measurement,, vol. 74, pp. 21-30, 2015. [83] J. Wang, C. Zhao, G. H. Zhao, X. F. Jin, S. M. Zhang and J. B. Zou, “All-quartz high accuracy MEMS pressure sensor based on double-ended tuning fork resonator,” Procedia Engineering, vol. 120, no. 1, pp. 857-860, 2015.
96 [84] A. Vogl, D. T. Wang, P. Storas, T. Bakke, M. M. V. Taklo, A. Thomson and L. Balgard, “Design, process and characterisation of a high-performance vibration sensor for wireless condition monitoring,” Sensors and Actuators A: Physical, vol. 153, pp. 155-161, 2009. [85] A. Rastegari and M. Mobin, “Maintenance decision making, supported by computerized maintenance management system,” 2016 Annual Reliability and Maintainability Symposium, pp. 1-8, 2016. [86] A. Bryman and E. Bell, Business Research Methods, 3rd ed., Oxford University Press, 2011. [87] J. Collis and R. Hussey, Business Research. A Practical Guide for Undergraduate and Graduate Students, 2nd ed., Palgrave Macmillan, 2003. [88] A. French and European Norms, x60-011, Maintenance: Vocabulary for Maintenance and Management of Durables, National Standards and National Normative Documents, 1981. [89] M.-A. Talva, “MobilityWork - The 5 Levels of Maintenance,” 06 07 2021. [Online]. Available: https://mobility-work.com/blog/maintenance-levels-afnor/. [90] P. I. P. d. Qualidade, Norma Portuguesa NP EN 15341. Manutenção. Marcadores de Desempenho da Manutenção (KPI), Caparica: elab. CT94 (APMI). Instituto Português da Qualidade, 2009. [91] D. Rigby, J. Sutherland and H. Takeuchi, “Embracing Agile: How to master the process that's transforming management.,” Agile Project Management, May 2016.