Sie sind auf Seite 1von 74

Remote Pump Monitoring System at NETZSCH

Acknowledgements

I respect and thank Mr Sachin Mirajkar (Director, Operations NETZSCH India Pvt. Ltd),
for providing me with an opportunity to do the project work in NETZSCH Verna facility
and giving us all support and guidance which made me complete the project duly. I am
extremely thankful to him for providing such a nice support and guidance, although he
had a busy schedule managing the factory affairs. I would like to Thank Mr Nikhil Naik
(Senior Design Engineer, NETZSCH Goa) for his constant guidance and support. I owe
my deep gratitude to our project guide Prof. Mahesh Caisucar, who took a keen interest
in our project work and guided us all along, by providing all the necessary information for
developing a good system.
I wish to convey my deep gratitude to Dr Vinay Shirodkar, HOD of the Mechanical De-
partment for his encouragement and moreover for his timely support and guidance.
I am thankful for and fortunate enough to get constant encouragement, support and guid-
ance from all Faculties of Mechanical Department which helped us in our project work.
Also, I would like to extend our sincere gratitude to all staff in the laboratory for their
timely support.
I heartily thank our Principal, Dr M.S.Krupashankar, for his guidance during this project.

Parth Kunkolienkar
Abhijeet Mordekar
Sharmad Madkaikar
Siddhant Naik

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. ii


Remote Pump Monitoring System at NETZSCH

Abstract

The Internet of Things (IoT) has been envisioned as the next wave in the era of cyber
technology, in which millions of smart devices (including various sensors and actuators)
are wirelessly connected and integrated via the Internet. This emerging paradigm will
fundamentally create and boost a number of new applications across many fields, including
environmental monitoring, precision agriculture, smart grids, smart cities and e-health
systems. It is of critical importance to provide the next generation of computer scientists
and engineers an opportunity to not only understand the concepts and principles of IoT,
but also to study the practical development of IoT solidly, so that students can learn how
to apply theories to real applications. Many universities have started to introduce IoT
courses into their undergraduate curriculum.
The main objective of this project work i.e., design the electronic hardware using Rasp-
berry Pi 3B and Arduino ATMega2560 Microcontroller for a Progressive Cavity Pump and
update the parameters in real time and store it on a cloud. Monitoring of parameters alter-
nating current, temperature , speed of shaft, flow, pressure. Advanced Sensing makes the
motor to run in healthy mode. Which saves the motor from burn out during short circuit
condition. The flow and pressure are further used to calculate Mechanical and Volumetric
Efficiency of the Pump thus achieving full Remote Performance Monitoring.

Keywords: Progressive Cavity, Raspberry Pi, Arduino, Microcontroller, Motor, Perfor-


mance Monitoring

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. iii


Remote Pump Monitoring System at NETZSCH

Contents

Acknowledgements ii

Abstract iii

List of Figures vii

1 Introduction 1
1.1 About NETZSCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Progressive Cavity Pump . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Testing Bed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Remote Monitoring System . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Problem Statement 6
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Quality Function Deployment- House Of Quality . . . . . . . . . . . . . . . 8
2.4 FMEA- Failure Mode Effect Analysis . . . . . . . . . . . . . . . . . . . . . 9
2.5 Scope of Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3 Project Implementation 12
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2 Hardware Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.1 Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2.2 Arduino ATMega 2560 . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.3 Zener Diode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3 Sensor Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.1 Hall Effect Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.2 IR Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3.3 Wika S-10 Pressure Transmitter . . . . . . . . . . . . . . . . . . . . 19
3.3.4 PT 100 Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.4 Hardware Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.4.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.4.2 Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.4.3 I to V circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.5 Software Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. iv


Remote Pump Monitoring System at NETZSCH

3.5.1 Raspbian OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.5.2 Arduino IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.5.3 VNC Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.6 Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.6.1 SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.7 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.7.1 PyFirmata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.7.2 Beautiful Soup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.8 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.8.1 Data Acquisition and Processing . . . . . . . . . . . . . . . . . . . 32
3.8.2 Interfacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.8.3 Cloud Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

4 Data Analysis 39
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.2 Curve Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5 Results and Discussion 46


5.1 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.2 Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

6 Conclusion 51
6.1 Profitability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.3 Future Prospects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

References 54

Appendices 56

A Main Program 56

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. v


Remote Pump Monitoring System at NETZSCH

List of Figures

1.1 NETZSCH Goa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


1.2 NEMO Progressive Cavity Pump . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1 House Of Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8


2.2 FMEA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 Revised FMEA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12


3.2 Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4 Zener diode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5 Current Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6 IR Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.7 P30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.8 PT100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.9 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.10 Current Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.11 Speed Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.12 Pressure Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.13 Temperature Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.14 SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.15 Data Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.16 IR Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.17 Pressure Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.18 Temperature Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.19 Interfacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.20 Thingspeak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

4.1 Expected Actual Flow Data . . . . . . . . . . . . . . . . . . . . . . . . . . 39


4.2 Code for generating flow data . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.3 Flow data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.4 Zoomed View of Flow data . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.5 Code for opening Curve Fitting Tool . . . . . . . . . . . . . . . . . . . . . 41
4.6 Fitted Curve for Polynomial of Degree 1 . . . . . . . . . . . . . . . . . . . 41

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. vi


Remote Pump Monitoring System at NETZSCH

4.7 Fitted Curve for Polynomial of Degree 2 . . . . . . . . . . . . . . . . . . . 41


4.8 Fitted Curve for Polynomial of Degree 3 . . . . . . . . . . . . . . . . . . . 42
4.9 Fitted Curve for Polynomial of Degree 4 . . . . . . . . . . . . . . . . . . . 42
4.10 Fitted Curve for Polynomial of Degree 5 . . . . . . . . . . . . . . . . . . . 42
4.11 Fitted Curve for Exponential . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.12 Plot of Residual for Polynomial of Degree 2 . . . . . . . . . . . . . . . . . 45
4.13 Code for Comparing Original and Predicted Flow Data . . . . . . . . . . . 45
4.14 Plot for Comparing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.1 Email Alert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47


5.2 Increasing Pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.3 Decreasing Pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.4 Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.5 Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.1 Final System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52


6.2 Casing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. vii


Remote Pump Monitoring System at NETZSCH

Chapter 1

Introduction

1.1 About NETZSCH


NETZSCH Technologies India Private Ltd. a member of the NETZSCH Business Unit
Pumps Systems manufactures NEMO R Progressing Cavity Pumps and TORNADO R

Rotary Lobe Pumps for the South Asian Markets from the latest manufacturing facility
in Goa, India. Their Products cater to offer Pumping Solutions for handling complex
fluids in Food, Chemical, Oil Gas, Waste Water, Renewable Energy and more Industries.
They are located with Sales Offices and Service Centers in eight cities across the Indian
Sub-Continent with Partners for the neighbouring countries in South Asia.

Figure 1.1: NETZSCH Goa

NETZSCH is the world market leader in NEMO R Progressing Cavity Pumps over six

decades with state of the art facilities for Research Development, Production, Sales and
Service in its Headquarters in Germany for Europe Middle East and Africa markets; in
Brazil for the Continents South and Central America; in the United States for North
America; China for China and South East Asia as well Australia.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 1


Remote Pump Monitoring System at NETZSCH

1.2 Progressive Cavity Pump


The Progressive Cavity Pump is an extremely versatile pump that can be used in many
different pumping applications. It offers all the advantages of a positive displacement pump
and is specially designed for abrasion resistance in tough pumping applications.[1] This is
different than the more commonly used centrifugal pump. A centrifugal pump is a good,
economical choice when pumping water like fluids with low viscosity and when a fixed flow
and constant discharge pressure are the basis of the application. A well-applied centrifugal
pump will offer years of reliable service in simple pumping applications. A progressive
cavity pump is used when the pumping application is not suited to a centrifugal pump.
One of the clearest examples of when to use a progressive cavity pump is when the liquid
has a higher viscosity, or thickness, than water. Centrifugal pumps become very mechanical
and volumetrically inefficient when the viscosity of the liquid goes up, meaning the flow
goes down and the power consumption goes up. The opposite occurs with a progressive
cavity pump, the mechanical efficiency and volumetric efficiency goes up when the viscosity
increases, lower power and more flow. A progressive cavity pump is therefore ideal for
liquids with higher viscosities. In addition, a progressive cavity pump will have about the
same flow no matter what the viscosity of the liquid is. If you have a pumping application
where you need a constant flow, but the liquid viscosity is variable and will change, then
the PC pump is an ideal choice. Additionally, a progressive cavity pump is an ideal pump
when the application requires a varied flow. A progressive cavity pump has a precise flow
per revolution of the pump. It is therefore quite easy to regulate the pump flow by just
simply regulating the pump speed. Modern pump speed controllers like variable frequency
drives (VFD’s) are well suited to be used with progressive cavity pumps for varying pump
speed and flow control. Another good example of when to use a progressive cavity pump is
when the suction conditions of the pumping applications are not ideal. A progressive cavity
pump requires much lower Net Positive Suction Head (NPSH) as compared to a centrifugal
pump because the internal pump velocity is lower. A progressive cavity pump can pump
when the suction pressure is as low as 28” of mercury (Hg), a centrifugal pump cannot do
this. A progressive cavity pump will easily fill and pump in difficult applications when a
centrifugal pump will not. Progressive cavity pumps are ideal for applications where the
liquid is sheer sensitive again because of lower internal velocity. A good example would be
pumping oil and water mixtures to separation devices. The separation device works much
better when the oil droplets are larger. A progressive cavity pump will not change the oil
droplets where a centrifugal pump will emulsify the oil and make the oil droplets very small
and reduce the separation performance of the separator.
The best application for a progressive cavity pump is when the liquid contains abrasive
solids. Most other types of positive displacement pumps can’t pump solids very well or for
very long due to their close tolerances and all metal designs. A gear pump or vane pump
will simply wear out when solids are present in the liquid and the same would also happen
to most centrifugal pumps and they could clog. A progressive cavity pump is designed to

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 2


Remote Pump Monitoring System at NETZSCH

Figure 1.2: NEMO Progressive Cavity Pump

last longer than all other pumps on abrasive applications. The pump design with the rotor
and stator is the heart of the pump design for abrasion resistance. The internal velocity
of the liquid as it travels through the pump is much lower than other types of positive
displacement pumps and centrifugal pumps and the rubber stator. This is because the flow
travels axially, ”long ways” through the pump and is not travelling around the outside of a
casing in a high-speed circle like it would in other pump designs. The abrasive particles are
travelling in parallel to the pumping surfaces and at low speeds thus not abrading them. In
addition, the rubber stator of a progressive cavity pump has ”bounce”. If a particle comes
in contact with the stator, the stator has some flexibility to move and not abrade, this
makes it last longer than the metal parts in other types of pumps on abrasive applications.
[2]

1.3 Testing Bed


The pumps before being dispatched are tested for optimal performance. Important param-
eters like inlet pressure
• Outlet pressure
• Inlet temperature
• Outlet temperature
• Current drawn
• Pump speed
• Current frequency
Are observed and logged into the parent system. The data is studied for consistency to make
sure the pump is operating normally. Frequency of the current is varied along with outlet
pressure to simulate different working scenarios. The reaction of the other parameters
is observed in response to this change in pressure and frequency change.[3] The testbed
consists of two beds where the pumps are mounted. Two large tanks with capacities of

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 3


Remote Pump Monitoring System at NETZSCH

17500 litres are used to store liquid which is used to test the pump. Usually, the liquid used
is water. A large array of pipes are used to feed the liquid to the pump and back to the
tank. Sensors are mounted onto the pump depending on the parameters to be measured.
The data acquisition system used is located beside the test bed, the sensors are connected
to this system via data cables. The data acquired is displayed onto a monitor and the
data is logged into an xls file. The system is a closed loop system where the same liquid is
circulated in a loop. After rigorous testing for a day or two as needed, the pump is passed
onto packaging if all parameters behave normally. The data captured is stored for further
reference for the company.

1.4 Remote Monitoring System


NETZSCH PVT LTD manufactures special purpose Progressive Cavity Pump (PCP).
These pumps are used to pump different kinds of liquids ranging from low viscous like
water to high viscosity liquids like petroleum oil. The pumps can also be used for pumping
solids like apples, fish etc. Dense and high viscosity liquids like adhesives, cement etc.
These pumps use components which are manufactured with high durability and reliability,
they promise a long life of operation finding application in critical parts of manufacturing
processes. A small breakdown or repair shutdown can affect the production of the industry
to a large extent. Performance tracking of such pumps can help in keeping them working
at max efficiency and also reduce repair cost and time. Large amounts of capital are
often invested in developing monitoring systems to track performance. Industries seek
cheaper sources to do the job while promising accuracy and reliability. Remote Pump
Monitoring System is a microcontroller based monitoring system which tracks the real-time
pump performance. It uses educational based microcontroller and sensors to read pump
parameter values and display this data to the operator in the form of graphs which makes it
easy to understand. Two microcontrollers namely Raspberry Pi 3 B+ and Arduino Atmega
read the data of the sensor and send the data to the cloud where it can be accessed by
different operators with valid login credentials. The Arduino Atmega acts as an interfacing
front i.e. it is responsible for reading the sensor values and carry out data processing. The
sensors like the current sensors, speed sensors are connected to the Arduino directly and
are also powered by the Arduino. Since the sensors operate on 5V power they can directly
be powered by the 5V GPIO pin of the Arduino. The industrial grade sensors like the
temperature, pressure sensor require 24 V DC input and thus are powered externally by
a 24 V AC-DC converter. These sensors are connected to the Arduino through a voltage
divider circuit, as the output of these sensors is 4-20mA thus they cannot be connected to
the Arduino directly. The Raspberry Pi 3 is the processing hub. The data collected by the
Arduino is processed by the raspberry pi. The sensor values are converted to actual values
by using mapping function taking input as the maximum and minimum reading capacity
of the sensor. The data is then pushed to the cloud where it can be viewed by the operator.
The raspberry pi requires an active internet connection to upload the data to the cloud.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 4


Remote Pump Monitoring System at NETZSCH

However, it also saves the data offline in the form of an .xls file which can be accessed
via a computer. The raspberry pi communicates with the Arduino via a serial connection.
The system has the capability of measuring readings several hundred times a second. The
latency comes into play because of internet bandwidth availability and data storing speed.
A metal box houses the microcontrollers along with the current sensor and a breadboard.
Jumper cables are used for fast and reliable connections. Cable management is done to
avoid confusion and for better presentation.

Figure 1.3: System

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 5


Remote Pump Monitoring System at NETZSCH

Chapter 2

Problem Statement

2.1 Introduction
A Positive Displacement Pump, displaces a fixed quantity fluid for every rotation. A
Progressive Cavity Pump uses a screw rotor to create cavities in the stator rotor interface to
pump the fluid. Over the life of the pump the efficiency gradually decreases as the tolerances
increase due to wear. The wear in the components is difficult to identify manually. Tracking
the basic pump parameters such as flow, pressure, temperature helps in estimating the wear
which result in reduction of efficiency. Since it is a special purpose pump it operates in
diverse conditions. The maintenance of such sophisticated pumps necessitates a scientific
methodology and utilization of latest trends in maintenance engineering. In the current
scenario all the pumps irrespective of running conditions have a scheduled maintenance to
follow which is not only uneconomical but also ineffective in maintaining the overall health
of the system. An Internet of Things(IoT) based real time monitoring system backed by
mathematically intensive data analysis can not only monitor the real time health of the
system but also predict the time and nature of maintenance that is required in the future.

2.2 Literature Review


A field visit to NETZSCH Industries Pvt Ltd was organised by the professors. An
interaction with the engineers revealed an opportunity to design Pump Location Monitoring
System. In response a Remote Pump Monitoring System, tracking basic pump parameters
was proposed. The company asked for a Performance Monitoring system which includes
Volumetric Efficiency, Mechanical Efficiency, and Overall Efficiency as well as Condition
Monitoring System which includes Vibration Analysis. An IoT based Monitoring System
which can be viewed remotely from any device connected to the internet was discussed
with senior officials. This system allows the company to monitor performance and plan
maintenance of pumps already installed without actually visiting the location. It also
helps the company to dispatch replacement parts before the pump failure. CAMS which
is Computer Aided Maintenance System utilizes software to organize, planning, scheduling

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 6


Remote Pump Monitoring System at NETZSCH

and support of maintenance and repair can be implemented using the data from this system.
To take guidance on monitoring systems we approached an industry expert who has worked
on condition monitoring for Netzsch, Zuari and various other process industries in Goa as
well as surrounding states. We realized that there is no remote monitoring system in Goa
but only in-house monitoring system in few industries for testing. Customers can neither
avail this facility nor is the facility portable. With the help of our professors, we decided to
focus only on performance monitoring and rejected condition monitoring because together
both will require more time and vibration analysis is mathematically intensive. Calibrating
accelerometers to detect small vibrations in all three axes could be quite complex.
Different control technologies are used for monitoring and control of the systems, whereas
the communication between a system and a user is generally realized online via wireless
communication techniques such as RF, ZigBee and Bluetooth. Also, SCADA programs
are utilized for developing user interfaces. However, SCADA programs do not provide
adaptability for users because of their expensive libraries. RF, ZigBee and Bluetooth
technologies are widely preferred in easy-to-use applications due to the short range between
the sender and the receiver, and the small volumes of data transferred. The ZigBee, RF and
Bluetooth wireless communication techniques are generally restricted to simple applications
because of their slow communication speeds, distances and data security.[4]
In this section, the related work of Industrial Internet of Things(IIOT) is explained. There
are many ways to develop the system. In Survey paper [5], the system is based on the
raspberry pi which enables the cost-effective environment monitoring. The author uses
the Python programming language to control the industrial parameters and access them
through IoT and Xively is the IoT platform which is used in this paper.
C. Balasubramaniyan and D. Manivannan.[6] developed the system Air Quality Monitoring
System (AQMS) using Raspberry Pi and integrated with Internet of Things (IoT) gateway.
In his work, generic sensor nodes/motes, sensor web nodes are designed using Raspberry Pi
as processing unit, GrovePi+ electronic shields are used for interfacing sensors and Wi-Fi
is used as a transceiver for data communication between web node and server. ThingSpeak
is the IoT sever which is used in this paper. The present study reports on monitoring
of the parameters of a Progressive Cavity Pump using Wifi communication technology.
Educational based microcontrollers, Arduino ATMega 2560 and a Raspberry Pi Model
3B unit are chosen, as it is preferred in small-scale projects and it is cheaper than other
Microcontroller products. Wifi is used as the form of Internet access, The Raspberry Pi
has a wifi module which is used to connect to any router. The web-based user interface
for monitoring was developed by the ThingSpeak and then it was presented online to users
via the Thingspeak WebServer program. Communication between the user interface and
the system was realized by a Cloud Service Provider Thingspeak.com. The Cloud Service
allows Real-time monitoring of the parameters of the Progressive Cavity Pump.
After identifying the parameters we met an electronic project consultancy Smart Marine
Electricals for guidance over equipment to be used and other procurement related issues.
The sensors were analysed based on ease of coding, cost and compatibility issues. Electrical

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 7


Remote Pump Monitoring System at NETZSCH

circuits were also suggested for signal conditioning.

2.3 Quality Function Deployment- House Of Quality


Quality must be designed into the product, not inspected into it. Quality can be defined
as meeting customer needs and providing superior value. This focus on satisfying the cus-
tomer’s needs places an emphasis on techniques such as Quality Function Deployment to
help understand those needs and plan a product to provide superior value. Quality Function
Deployment (QFD) is a structured approach to defining customer needs or requirements
and translating them into specific plans to produce products to meet those needs. The
”voice of the customer” is the term to describe these stated and unstated customer needs
or requirements. The voice of the customer is captured in a variety of ways: direct dis-
cussion or interviews, surveys, focus groups, customer specifications, observation, warranty
data, field reports, etc. This understanding of the customer needs is then summarized in
a product planning matrix or ”house of quality”. These matrices are used to translate
higher level ”what’s” or needs into lower level ”how’s” - product requirements or technical
characteristics to satisfy these needs. A House of Quality Analysis is conducted for real

Figure 2.1: House Of Quality

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 8


Remote Pump Monitoring System at NETZSCH

time performance monitoring system. Customer requirements like automation, Real-Time


Monitoring, Preventive Maintenance and costs are taken into consideration. Product Pa-
rameters like accuracy, reliability, sensors, data analysis, competitors, cloud and robustness
are considered. The analysis shows that the factors like sensors, data analysis, cloud are of
high importance. Using better sensors increases accuracy and reliability but also increases
the cost. Since accuracy and reliability are of lesser importance, the project being a proof
of concept, sensors of appropriate grade are chosen. Data analysis is important for better
results and understanding of the raw data. Improving data analysis also enhances accuracy
and cloud data representation. A good cloud service is chosen for a secure connection and
good data visualisation. Analysis of the competitor’s product helps to identify the region
where factors are to be concentrated for developing an all round system. Reducing cost
and providing better real time monitoring services will develop a better product. Factors
like robustness and compactness could be exempted as their need is less.

2.4 FMEA- Failure Mode Effect Analysis


A Failure Mode Effect Analysis is a process used to identify and evaluate the failure modes
for a system. This is done by considering the severity and likelihood of the failures. A
systematic approach is adopted for FMEA activity to identify potential failure mode, it
causes, the impact of these potential failures and the prioritising actions to reduce or
eliminate these failures. Failure modes are faults in component or system, those that af-
fect the proper functioning. Effect analysis refers to studying the consequences of those
failures. The underlying principle of FMEA is to resolve potential problems before they
occur, enhancing safety, and increasing customer satisfaction. FMEA is an analytic tool
that combines technology and experience of people in identifying probable failure mode of
production process and planning for its abolition. FMEA provides a discipline for docu-
menting this analysis for future use and continuous process improvement. It is a systematic
approach to the analysis, definition, estimation and evaluation of risks. FMEA analysis
may easily help in improving the efficiency of the manufacturing process and quality of the
product thus decreasing the number of defective products and saving of rework cost and
time.
A failure mode effect analysis of a progressive cavity pump was conducted. Different
failure modes like elastomer, rotor, and motor were identified. Upon proper analysis, it
was determined that elastomer was the critical failure mode. Failure of the rotor through
abrasive wear and pitting corrosion was rare even though it has a significant impact on
pump performance characteristics such as the decrease in efficiency. Offsetting of the rotor
can lead to wear of the inner lining of the elastomer but the occurrence is rare as the
manufacturer takes measures to avoid it. Failure because of high load and alignment error
can cause overheating and bearing failure. The motor is connected to the pump rotor
through a set of reduction gears. Proper alignment is the key to good efficiency. Thus
the manufacturer does the alignment in house and sells the pump motor as one assembly

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 9


Remote Pump Monitoring System at NETZSCH

Figure 2.2: FMEA

fixed on the bed. Since the machines operate for a significant time, wear in bearings can
lead to unbalance of lateral forces. This leads to vibrations. Condition monitoring is thus
performed to pinpoint the cause of such vibrations and eliminate them. The critical mode
of failure i.e. elastomer housed inside the pump allows the rotor and stator to operate with
zero tolerance. The pump being a positive displacement pump, this zero tolerance is very
crucial for its optimal performance. Any alignment error of the rotor can result in wear of
the elastomer. Gradually the tolerances will increase and the efficiency of the pump will
decrease. These being special purpose pumps, the elastomer would require a replacement
as it cannot be repaired and this will lead to a long haul breakdown and repair time. As the
elastomer swells, it is restricted expanding outwards by casing, thus it expands inwards.[7]
This reduces tolerance and thus results in wear due to rubbing of elastomer and rotor.
Another factor is the inlet fluid temperature. The elastomer has an operating range of
temperature within which it operates at optimal properties. Increasing the temperature
beyond acceptable limit would result in the elastomer losing its characteristics. Using
corrosive fluid could make the inner lining of the elastomer brittle, which would then
require replacement. In case of the sudden stoppage of fluid, the pump would keep on
running with no fluid. This increases elastomer temperature and this condition is known
as Dry running. Dry running is to be avoided as it may damage the elastomer.
After a proper group discussion and brainstorming session, the solutions to these problems

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 10


Remote Pump Monitoring System at NETZSCH

were discussed and identified. Starting with the critical failure mode i.e. Elastomer Using
a temperature sensor at the inlet allows the operator to track the temperature of the fluid
entering the pump. The system proposed, would read the values of the sensor and check it
against a limiting value. If the temperature increase above the limit, the system warns the
operator. Thus preventing the swelling and wear of the elastomer. Using a temperature
sensor in the elastomer to read the elastomer temperature and check if they fall within the
operating range of the elastomer. Any unwanted deviations are recognised by the system
and the operator is warned. The system also compares the inlet temperature with the
elastomer temperature to check for dry running condition. The manufacturer prescribes 5
degree Celsius change in the elastomer and inlet temperature as dry running condition. The
system would recognise this difference and alert the operator. The system has capabilities
to trip the Motor with help of relays.

Figure 2.3: Revised FMEA

2.5 Scope of Work


The project began by carefully analysing our system and the pump characteristics,
using Six Sigma Tools such as QFD(Quality Function Deployment) and FMEA(Failure
Mode and Effect Analysis). With the help of these methods, it was inferred that since the
project is a proof of concept we would focus on cheap and reliable sensors, compactness and
proper analysis of data. Accordingly, with the help of QFD, we found the best possible
locations where the sensors are to be placed and how they will help in determining the
characteristics of the pump. Sensors and Microcontrollers such as Arduino and Raspberry
Pi were procured. The sensors were then interfaced with Arduino and the Arduino was
connected to Raspberry Pi. Thereafter the data was sent to the cloud via Wifi. Based on
the values that are obtained, inferences are drawn.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 11


Remote Pump Monitoring System at NETZSCH

Chapter 3

Project Implementation

3.1 Introduction
The project is implemented in phases. The first phase includes identification of sen-
sors. Once the sensors are identified the method to connect different sensors with available
microcontrollers was studied. The sensors were then programmed based on the type of
output it generates. The data acquired is then sent to the cloud using a unique API key.
Thereafter a suitable place is identified for mounting the sensors and the system is tested.
The data available is remotely accessed and may be further used for data analysis and
monitoring of the pump.

3.2 Hardware Description

Figure 3.1: Block Diagram

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 12


Remote Pump Monitoring System at NETZSCH

3.2.1 Raspberry Pi
The Raspberry Pi[8] is a low cost, credit-card sized computer that plugs into a computer
monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that
enables people of all ages to explore computing and to learn how to program in languages
like Scratch and Python. It’s capable of doing everything you’d expect a desktop computer
to do, from browsing the internet and playing high-definition video, to making spreadsheets,
word-processing, and playing games.

Figure 3.2: Raspberry Pi

Benefits of Raspberry Pi

Power consumption :- The Pi draws about five to seven watts of electricity. This is about
one-tenth of what a comparable full-size server box can use. Since servers are running
constantly night and day, the electrical savings can really add up.
Affordable :- Compared to other similar alternatives, the Pi (revision B) offers the best
specs for the price. It is one of the few devices in its class that offers 1 GB of RAM. The Pi
has come down in price since it first arrived, and is finally affordable as a hobby, business
use, or whatever need there is.
Huge community support :- The Pi has phenomenal community support. Support can be
obtained quite easily for the hardware and/or GNU/Linux software that runs on the Pi
mainly in user forums, depending on the GNU/Linux distribution used.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 13


Remote Pump Monitoring System at NETZSCH

3.2.2 Arduino ATMega 2560


Arduino is an open-source physical computing platform based on a simple microcontroller
board and a development environment for writing software for such board. Arduino started
in 2005 as a project for students at the Interaction Design Institute Ivrea. Today, Arduino
platform has several configurations, however, according to the number of bits they use,
they can be classified in two; the based on 8-bit Atmel AVR microcontrollers, and other
ones that use 32-bit Atmel ARM processors. Whatever the platform, it provides a set of
digital and analog input/output pins that allows interacting with various extension boards.
It is based on C/C++ programming languages.

Figure 3.3: Arduino

Arduino is a development board that integrates a microcontroller and its support circuitry
with digital and analog inputs and outputs. It has an open source computing development
platform based on an environment for programs creation.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 14


Remote Pump Monitoring System at NETZSCH

3.2.3 Zener Diode


Diodes generally are known as a device that allows the flow of current in one direction
(forward biased) and offers resistance to the flow of current when used in reverse bias. Zener
Diode (Named after the American scientist C. Zener who first explained its operational
principles) on the other hand, not only allow the flow of current when used in forward
bias, but they also allow the flow of current when used in the reversed bias. So far the
applied voltage is above the breakdown voltage known as the Zener Breakdown Voltage.
Or in other words, the Breakdown voltage is the voltage, on which Zener Diode starts
conducting in reverse direction.[9]

Operational Principle

In normal diodes, the breakdown voltage is very high and the diode gets damaged totally
if a voltage above the breakdown diode is applied, but in Zener diodes, the breakdown
voltage is not as high and does not lead to permanent damage of the Zener diode if the
voltage is applied. As the reverse voltage applied to the Zener diode increases towards
the specified Breakdown Voltage (Vz), a current starts flowing through the diode and this
current is known as the Zener Current and this process is known as Avalanche Breakdown.
The current increases to a maximum and get stabilized. This current remains constant over
the wider range of applied voltage and allows the Zener diode to withstand higher voltage
without getting damaged.

Figure 3.4: Zener diode

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 15


Remote Pump Monitoring System at NETZSCH

3.3 Sensor Technology


When considering sensor technologies for the Remote Monitoring System, the operating
environment must be considered. The pump is intended to operate in tough geographical
locations, in difficult environment. The obstacles encountered will primarily be either
furniture, features of architecture, and people. Another obstacle is the affordability and
compatibility with microcontrollers like Arduino and Raspberry Pi.

3.3.1 Hall Effect Sensor


A Hall Effect sensor[10] is a transducer that varies its output voltage in response to a mag-
netic field. Hall effect sensors are used for proximity sensing, positioning, speed detection,
and current sensing applications. In a Hall Effect sensor, a thin strip of metal has a current
applied along with it. In the presence of a magnetic field, the electrons in the metal strip
are deflected toward one edge, producing a voltage gradient across the short side of the strip
(perpendicular to the feed current). Hall Effect sensors have an advantage over inductive
sensors in that, while inductive sensors respond to a changing magnetic field which induces
a current in a coil of wire and produces a voltage at its output, Hall Effect sensors can
detect static (non-changing) magnetic fields.

Working Principle

When a beam of charged particles passes through a magnetic field, forces act on the par-
ticles and the beam is deflected from a straight path. The flow of electrons through a
conductor form a beam of charged carriers. When a conductor is placed in a magnetic
field perpendicular to the direction of the electrons, they will be deflected from a straight
path. As a consequence, one plane of the conductor will become negatively charged and the
opposite side will become positively charged. The voltage between these planes is called
the Hall voltage.
ACS712 Current Sensor The Allegro R ACS712 provides economical and precise solu-

tions for AC or DC current sensing in industrial, commercial, and communications systems.


The device package allows for easy implementation by the customer. Typical applications
include motor control, load detection and management, switched-mode power supplies, and
overcurrent fault protection.
The device consists of a precise, low-offset, linear Hall sensor circuit with a copper conduc-
tion path located near the surface of the die. Applied current flowing through this copper
conduction path generates a magnetic field which is sensed by the integrated Hall IC and
converted into a proportional voltage. Device accuracy is optimized through the close
proximity of the magnetic signal to the Hall transducer. A precise, proportional voltage is
provided by the low-offset, chopper-stabilized BiCMOS Hall IC, which is programmed for
accuracy after packaging.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 16


Remote Pump Monitoring System at NETZSCH

Figure 3.5: Current Sensor

Specifications :-

• 5.0V single supply operation.

• 66 to 185 mV/A output sensitivity.

• Output voltage proportional to Ac or DC currents.

• Ratio metric output from supply voltage.

• Bidirectional in nature.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 17


Remote Pump Monitoring System at NETZSCH

3.3.2 IR Sensor
IR Sensor module has great adaptive capability of the ambient light, having a pair of
infrared transmitter and the receiver tube, the infrared emitting tube to emit a certain
frequency, encounters an obstacle detection direction (reflecting surface), infrared reflected
back to the receiver tube receiving, after a comparator circuit processing, the green LED
lights up, while the signal output will output digital signal (a low-level signal), through
the potentiometer knob to adjust the detection distance, the effective distance range 2
to 10cm working voltage of 3.3V-5V. The detection range of the sensor can be adjusted
by the potentiometer, with little interference, easy to assemble, easy to use features, can
be widely used robot obstacle avoidance, obstacle avoidance car assembly line count and
black-and-white line tracking and many other occasions.

Figure 3.6: IR Sensor

Features

• When the module detects obstacles in front of the signal, the circuit board green in-
dicator light level, while the OUT port continuous output low-level signals, the module
detects a distance of 2 to 10cm, detection angle 35, the detection distance can be potential
adjustment with adjustment potentiometer clockwise, the increase in detection distance;
counterclockwise adjustment potentiometer, the detection distance decreased.
• The sensor active infrared reflection detection, target reflectivity and shape of the detec-
tion distance of the key. The black minimum detection range, white maximum; small area
object distance is small, a large area from the large.
• The sensor module output port OUT can be directly connected with the microcontroller
IO port can also be driven directly to a 5V relay; Connection: VCC-VCC; GND-GND;
OUT-IO.[11]
• The comparator using LM393, stable.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 18


Remote Pump Monitoring System at NETZSCH

• 3-5V DC power supply module can be used. When the power is turned on, the red power
LED is lit.
• With the screw holes of 3mm, easy to install.
• Board size: 3.1 cm * 1.5 cm.

3.3.3 Wika S-10 Pressure Transmitter


Introduction

A diaphragm pressure transducer[12] is used for low-pressure measurement. They are com-
mercially available in two types – metallic and non-metallic. Metallic diaphragms are known
to have good spring characteristics and non-metallic types have no elastic characteristics.
Thus, non-metallic types are used rarely and are usually opposed by a calibrated coil spring
or any other elastic-type gauge. The non-metallic types are also called slack diaphragm.

Working Principle

The functional principle of a resistive pressure transmitter[13] is very simple. The pressure
sensor converts the mechanical pressure value into a proportional electrical signal. The
pressure sensor typically consists of a stable main body and a (thin) diaphragm. The
diaphragm is the most important element for the measurement of the pressure and is
equipped with strain-sensitive and compression-sensitive resistance structures, so-called
strain gauges (DMS). The diaphragm is deflected under the influence of pressure.
Thus, the strain gauges attached to it are elongated or compressed and its electrical re-
sistance changes. This change in resistance is directly proportional to the pressure. For
example, if the resistors are wired to a Wheatstone measuring bridge, the resulting electrical
signal can be measured and transferred to an indicator.

Figure 3.7: P30

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 19


Remote Pump Monitoring System at NETZSCH

Specifications

• Measuring ranges from 0 to 60 bar

• Non-linearity 0.2 percentage of span (BFSL)

• Output signals: 4 - 20 mA, DC 0 - 10 V, DC 0 - 5 V and others

• Electrical connections: Angular connector form A, circular connector M12 x 1, various


cable outlets and others

• Zero point and span adjustable via internal potentiometer

3.3.4 PT 100 Sensor


Introduction

Resistance thermometers[14], also called resistance temperature detectors (RTDs), are sen-
sors used to measure temperature. Many RTD elements consist of a length of fine wire
wrapped around a ceramic or glass core but other constructions are also used. The RTD
wire is a pure material, typically platinum, nickel, or copper. The material has an accurate
resistance/temperature relationship which is used to provide an indication of temperature.
As RTD elements are fragile, they are often housed in protective probes. RTDs, which
have higher accuracy and repeatability, are slowly replacing thermocouples in industrial
applications below 600 ◦ C.

Operating Principle

The principle of operation is to measure the resistance of a platinum element[15]. The most
common type (PT100) has a resistance of 100 ohms at 0 ◦ C and 138.4 ohms at 100 ◦ C.
There are also PT1000 sensors that have a resistance of 1000 ohms at 0 ◦ C. The relationship
between temperature and resistance is approximately linear over a small temperature range:
for example, if you assume that it is linear over the 0 to 100 ◦ C range, the error at 50 ◦ C
is 0.4 ◦ C. For precision measurement, it is necessary to linearise the resistance to give an
accurate temperature. The most recent definition of the relationship between resistance
and temperature is International Temperature Standard 90 (ITS-90). The linearization
equation is:
Rt = R0 ∗ (1 + A ∗ t + B ∗ t2 + C ∗ (t − 100) ∗ t3) (3.1)

Where:
Rt is the resistance at temperature t
R0 is the resistance at 0 ◦ C
A= 3.9083 E–3
B = –5.775 E–7

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 20


Remote Pump Monitoring System at NETZSCH

C = –4.183 E–12 (below 0 ◦ C) or


C = 0 (above 0 ◦ C)
For a PT100 sensor, a 1 degree celsius temperature change will cause a 0.384 ohm change
in resistance, so even a small error in measurement of the resistance (for example, the
resistance of the wires leading to the sensor) can cause a large error in the measurement
of the temperature. For precision work, sensors have four wires- two to carry the sense
current, and two to measure the voltage across the sensor element. It is also possible to
obtain three-wire sensors, although these operate on the (not necessarily valid) assumption
that the resistance of each of the three wires is the same.

Function

Resistance thermometers are constructed in a number of forms and offer greater stability,
accuracy and repeatability in some cases than thermocouples. While thermocouples use
the Seebeck effect to generate a voltage, resistance thermometers use electrical resistance
and require a power source to operate. The resistance ideally varies nearly linearly with
temperature per the Callendar–Van Dusen equation. The platinum detecting wire needs
to be kept free of contamination to remain stable. A platinum wire or film is supported
on a former in such a way that it gets minimal differential expansion or other strains from
its former, yet is reasonably resistant to vibration. RTD assemblies made from iron or
copper are also used in some applications. Commercial platinum grades exhibit a temper-
ature coefficient of resistance 0.00385/◦ C (European Fundamental Interval). The sensor
is usually made to have a resistance of 100 ohms at 0 degress Celsius. This is defined in
BS EN 60751:1996 (taken from IEC 60751:1995). The American Fundamental Interval is
0.00392/◦ C, based on using a purer grade of platinum than the European standard. The
American standard is from the Scientific Apparatus Manufacturers Association (SAMA),
who are no longer in this standards field. As a result, the ”American standard” is hardly
the standard even in the US. Lead-wire resistance can also be a factor; adopting three- and
four-wire, instead of two-wire, connections can eliminate connection-lead resistance effects
from measurements (see below); three-wire connection is sufficient for most purposes and is
an almost universal industrial practice. Four-wire connections are used for the most precise
applications.

Features

The type of probe and cable should be chosen carefully to suit the application. The main
issues are the temperature range and exposure to fluids (corrosive or conductive) or metals.
Clearly, normal solder junctions on cables should not be used at temperatures above about
170 ◦ C. Sensor manufacturers offer a wide range of sensors that comply with BS1904 class
B (DIN 43760): these sensors offer an accuracy of 0.3 ◦ C at 0 ◦ C. For increased accuracy,
BS1904 class A (0.15 ◦ C) or tenth-DIN sensors (0.03 ◦ C). Companies like Isotech can
provide standards with 0.001 ◦ C accuracy. Please note that these accuracy specifications

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 21


Remote Pump Monitoring System at NETZSCH

relate to the SENSOR ONLY: it is necessary to add on any error in the measuring system
as well. Related standards are IEC751 and JISC1604-1989. IEC751 also defines the colour
coding for PRT sensor cables: the one or two wires attached to one end of the sensor are
red, and the one or two wires at the other end are white.

Specification

• Nominal resistance: 100 ohms at 0 ◦ C (Pt 100)

• Basic thermistor values: for platinum measuring resistors as in chart

• Measuring range: -50 ◦ C to +230 ◦ C, other ranges on request

• Measuring current: max. 1mA (no self-heating!)

• Circuit: standard: 2-wire,

• on request: 3-wire or 4-wire circuit

• Insulation strength: 2.5 kV, on request up to 8 kV

Figure 3.8: PT100

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 22


Remote Pump Monitoring System at NETZSCH

3.4 Hardware Implementation


3.4.1 Block Diagram

Figure 3.9: Block Diagram

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 23


Remote Pump Monitoring System at NETZSCH

3.4.2 Circuits

Figure 3.10: Current Sensor

Figure 3.11: Speed Sensor

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 24


Remote Pump Monitoring System at NETZSCH

Figure 3.12: Pressure Sensor

Figure 3.13: Temperature Sensor

3.4.3 I to V circuit
4-20 mA current loop is the most common and widely used communication method in
an industrial environment. This 4-20 mA current loop interface is also known as 2 wire
interface technology. This 4-20 mA current loop technology is used in temperature sensors,
pressure sensors, current sensors, distance sensors, magnetic field sensors and much more.
A typical 4-20 mA current loop setup contains 3 things.

• Power supply — Most of the devices work at 24 V DC but there are other voltage
standards available as well.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 25


Remote Pump Monitoring System at NETZSCH

• 4-20 mA current loop sensor — this is the device which works as 4-20 mA standard.
for example, it could be a temperature sensor which gives the temperature value in
the form of 4-20 mA.

• 4-20 mA current loop receiver — this is the device which will be used for readings
4-20 mA current loop signal and will convert into digital or real world values.

Working of 4-20 mA Current Loop

The 4-20 mA current loop output devices give data output in the form of current consump-
tion. To measure the change in the current we will need to put the correct receiver circuit
in the series. so, for example, let’s say you have a pressure sensor which works at 4-20 mA
current loop principle and it is capable of measuring 0-50 psi. so when you connect the
4-20 mA current receiver circuit in the series and read the sensor it will read 4 ma when
the pressure is 0 psi and it will read 20 mA when the pressure is 50 psi. This conversion
will be a linear conversion, so you will be able to calculate the real pressure value at any
given point. This 4-20 mA current loop method is really popular in automation and sensing
industry due to high reliability, easy installation, fewer components, and wires can be long.
4-20 mA receiver devices could be really expensive but it can be done at a much lower cost
using ncd.io[16] 4-20mA current loop receiver boards.

Working Principle

For a 4-20 mA current, you need to choose a resistance that gives voltages that are within
the 5V range so that an Arduino can read. The biggest voltage drop across the resistor
will occur when the current is at maximum (20mA) so you can use that to calculate a good
resistor value to use:
R = V /I = 5/0.02 = 250 (3.2)

And for the same resistance at minimum current:

V = IR = 0.004 ∗ 250 = 1 (3.3)

And for the same resistance at maximum current:

V = IR = 0.020 ∗ 250 = 5 (3.4)

This range falls between the operating range of an Arduino (0-5 V), therefore this circuit
is appropriate to interface 4-20 mA industrial sensor with Arduino.[17]

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 26


Remote Pump Monitoring System at NETZSCH

3.5 Software Description


3.5.1 Raspbian OS
Raspbian is a Debian-based computer operating system for Raspberry Pi. There are several
versions of Raspbian including Raspbian Stretch and Raspbian Jessie. Since 2015 it has
been officially provided by the Raspberry Pi Foundation as the primary operating system
for the family of Raspberry Pi single-board computers. Raspbian was created by Mike
Thompson and Peter Green as an independent project. The initial build was completed
in June 2012. The operating system is still under active development. Raspbian is highly
optimized for the Raspberry Pi line’s low-performance ARM CPUs.
Raspbian uses PIXEL, Pi Improved X-Window Environment, Lightweight as its main desk-
top environment as of the latest update. It is composed of a modified LXDE desktop
environment and the Openbox stacking window manager with a new theme and few other
changes. The distribution is shipped with a copy of computer algebra program Mathe-
matica and a version of Minecraft called Minecraft Pi as well as a lightweight version of
Chromium as of the latest version.

3.5.2 Arduino IDE


The Arduino integrated development environment (IDE) is a cross-platform application
(for Windows, macOS, Linux) that is written in the programming language Java. It is
used to write and upload programs to Arduino compatible boards, but also, with the help
of 3rd party cores, other vendor development boards.
The source code for the IDE is released under the GNU General Public License, version
2. The Arduino IDE supports the languages C and C++ using special rules of code
structuring. The Arduino IDE supplies a software library from the Wiring project, which
provides many common input and output procedures. User-written code only requires two
basic functions, for starting the sketch and the main program loop, that is compiled and
linked with a program stub main() into an executable cyclic executive program with the
GNU toolchain, also included with the IDE distribution. The Arduino IDE employs the
program avrdude to convert the executable code into a text file in the hexadecimal encoding
that is loaded into the Arduino board by a loader program in the board’s firmware.

3.5.3 VNC Viewer


In computing, Virtual Network Computing (VNC) is a graphical desktop sharing system
that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer.
It transmits the keyboard and mouse events from one computer to another, relaying the
graphical screen updates back in the other direction, over a network.
VNC is platform-independent – there are clients and servers for many GUI-based operating
systems and for Java. Multiple clients may connect to a VNC server at the same time.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 27


Remote Pump Monitoring System at NETZSCH

Popular uses for this technology include remote technical support and accessing files on
one’s work computer from one’s home computer, or vice versa.
VNC was originally developed at the Olivetti Oracle Research Lab in Cambridge, United
Kingdom. The original VNC source code and many modern derivatives are open source
under the GNU General Public License.
VNC in KDE 3.1 There are a number of variants of VNC which offer their own particular
functionality; e.g., some optimised for Microsoft Windows, or offering file transfer (not
part of VNC proper), etc. Many are compatible (without their added features) with VNC
proper in the sense that a viewer of one flavour can connect with a server of another; others
are based on VNC code but not compatible with standard VNC.
VNC and RFB are registered trademarks of RealVNC Ltd. in the US and some other
countries.

3.6 Networking
3.6.1 SSH
Secure Shell (SSH) is a cryptographic network protocol for operating network services
securely over an unsecured network. Typical applications include remote command-line
login and remote command execution, but any network service can be secured with SSH.
SSH provides a secure channel over an unsecured network in a client–server architecture,
connecting an SSH client application with an SSH server. The protocol specification dis-
tinguishes between two major versions referred to as SSH-1 and SSH-2. The standard TCP
port for SSH is 22. SSH is generally used to access Unix-like operating systems, but it can
also be used on Microsoft Windows. Windows 10 uses OpenSSH as its default SSH client.
Raspberry PI is first connected to the laptop via Ethernet and is accessed using software
called Putty. Using default login ID and password it is accessed over the Ethernet. Then
a file named wpa supplicant.conf is edited to make the Raspberry Pi connect to the WiFi
when booted. The WIFI login credentials required to connect are entered in this file. In
this case, the WiFi ID was ‘DLink’ and password ‘sharingan’.

3.7 Libraries
3.7.1 PyFirmata
The Raspberry Pi is sometimes seen as competition to micro controllers like the Arduino,
or PICs. However the Raspberry Pi has a different sweet spot and can easily be combined
with an Arduino to accomplish a wider range of tasks than otherwise possible. While the
Raspberry Pi is great at interfacing to other components or interacting with users (i.e. usb,
display, ethernet), its also good for computationally expensive tasks like computer vision.
Arduino is great at doing things with very strict timing constraints or with very little power.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 28


Remote Pump Monitoring System at NETZSCH

Figure 3.14: SSH

Arduinos are also good for compatibility with existing circuitry or Arduino specific shield
(add-on boards such as motor control, MIDI interfaces, and more). To combine Raspberry
Pi with an Arduino, we used the Firmata protocol with Python bindings. Firmata is a
serial communication protocol that can control the Arduino’s GPIO ports, read analog
inputs, and control PWM and Servo pins.

Setting up Arduino for Firmata

Firmata control of the Arduino requires loading an Arduino with the special Firmata sketch.
After opening the Arduino IDE, the following steps were followed to install Firmata on
Arduino[18]:

• Click File; Examples; Firmata; StandardFirmata

• From the Tools; Board menu, select the type of Arduino you are using.

• From the Tools; Serial Port menu, choose the USB port to which your Arduino is
connected.

• Click the upload button (it looks like a right arrow, just next to the checkmark) and
wait for your sketch to upload. A message in the bottom black window will indicate
success or failure

• Once the Firmata sketch is loaded on your Arduino, you can test it out with the
Firmata Test Program.

Controlling your Arduino from Python

Raspberry Pi must be set up with the python firmata libraries by running the following
commands:

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 29


Remote Pump Monitoring System at NETZSCH

sudo apt-get install python-pip python-serial


sudo pip install pyfirmata

A USB cable is used to connect the Arduino with the Raspberry Pi. The USB name of the
Arduino can be found by running ’ls -lrt /dev/tty*’. In this Raspberry Pi, it was listed
as /dev/ttyACM0.

Connecting to an Arduino

To control an Arduino from a Python script on Raspberry Pi, import the Arduino and util
classes from the pyfirmata module. Then, create an object using the USB address found
in the previous step.

from pyfirmata import Arduino, util


\newline
board = Arduino(’/dev/ttyACM0’)

Controlling Arduino pins

The Arduino’s digital input and output ports can be controlled using the board.digital[]
list. Calling write() can set the pin values high or low (1 and 0 respectively). The read()
method returns the current value of the pin.

board.digital[2].write(1)
\newline
print board.digital[2].read()

3.7.2 Beautiful Soup


Beautiful Soup is a library that makes it easy to scrape information from web pages. It
sits atop an HTML or XML parser, providing Pythonic idioms for iterating, searching, and
modifying the parse tree.

Parsing a Document

A Beautiful Soup constructor takes an XML or HTML document in the form of a string
(or an open file-like object). It parses the document and creates a corresponding data
structure in memory. If you give Beautiful Soup a perfectly-formed document, the parsed
data structure looks just like the original document. But if there’s something wrong with
the document, Beautiful Soup uses heuristics to figure out a reasonable structure for the
data structure.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 30


Remote Pump Monitoring System at NETZSCH

Installation

Beautiful Soup 4 is published through PyPi, so it can be installed with easy install or pip.
The package name is beautifulsoup4, and the same package works on Python 2 and Python
3.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 31


Remote Pump Monitoring System at NETZSCH

3.8 Algorithm

Figure 3.15: Data Flow Diagram

3.8.1 Data Acquisition and Processing


The Data Acquisition front deals with sensors and the Arduino to acquire real-time values
of physical parameters. The sensors are interfaced with the Arduino through signal condi-
tioning modules. The current sensors and the speed sensor are powered by the Arduino’s
5V GPIO output while the robust industrial sensors like the temperature sensor and the
pressure sensor are powered by a 24V DC supply. The Arduino is powered by the Rasp-
berry Pi. The program code instructs the Arduino to get data values from the sensors at a
rate of 1 reading per second. The output of the current and speed sensor is analogue and is
directly interfaced with the Arduino. The output of the pressure and temperature sensor
requires signal conditioning by using a 4-20 mA to 0-5 V I to V converter. The Arduino
acts as a data acquisition front as it only acquires data and the processing is done in the
following stage by the raspberry pi.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 32


Remote Pump Monitoring System at NETZSCH

Current Sensor

The Progressive cavity pump uses a 3 Phase AC Motor. The current flowing in each phase
is Alternating in nature and follows a sinusoidal curve when plotted versus Time. Three
ACS712 current sensors are connected in series with each phase to measure the value of
current in each phase. The ACS712 current sensor produces a voltage proportional to the
amplitude of current flowing through it. The voltage generated will also be sinusoidal in
nature. This voltage is measured by Raspberry Pi through the Arduino. Over a period of
one second, this voltage is measured and the highest and the lowest value of voltage is taken
for the calculation. The Voltage measured is in 10 bit digital form and is so converted to
voltage values by multiplying with 5 and dividing by 1024. The Minimum value of voltage
is subtracted from the Maximum value and is divided by 2 to get the amplitude value. The
amplitude is then multiplied by 0.707 to get the Root Mean Square value. The Voltage
amplitude value is then converted to Current amplitude value by multiplying with 1000
and dividing by mVperAmp which is characteristic of the sensor chosen. In this case, its
value is 100 and is given in the ACS712 current sensor datasheet. The Current value is
thus calculated for all three phases simultaneously.

Result = ((M axV alue − M inV alue) × 5)/1024 (3.5)

V RM S = Result/2 × 0.707 (3.6)

AmpsRM S = (V RM S × 1000)/mV perAmp (3.7)

Speed Sensor

To calculate the RPM of the shaft IR sensor is used. The sensor gives the output as either a
HIGH or a LOW. When a shiny object comes in front of the sensor, the IR rays transmitted
by the sensor’s Transmitter probe, gets reflected and comes back to the Receiver probe and
the sensor gives the output as HIGH. When no object comes in front, or a black object
which absorbs IR rays comes in front, the Receiver probe doesn’t receive any signal and the
sensor gives output as LOW. The Raspberry Pi measures such HIGHs and LOWs through
Arduino over a period of two seconds.

When the Sensor gives a LOW, a timer is started and the time between each LOW signals
is measured. Also, the number of times LOWs appeared in two seconds is measured. The
RPM is then calculated by simply multiplying the number of LOWs with 60 and dividing
by the total time between each LOWs. The scan time for RPM measurement is taken as
two seconds to improve the range of RPM measurement to 60 RPM. When the RPM is
below 60 RPM, we may get inaccurate RPM readings.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 33


Remote Pump Monitoring System at NETZSCH

Figure 3.16: IR Sensor

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 34


Remote Pump Monitoring System at NETZSCH

Pressure Sensor

The Pressure sensor used is Industrial grade and so its output is 4-20 mA. Since it cannot
be connected directly to Arduino, its output is converted to 1-5 V using a resistor. As
the pressure in the pump increases, the output signal current value also increases linearly.
Thus the voltage drop across resistor also varies linearly. The Raspberry Pi measures this
voltage through Arduino and uses the voltage values for pressure values calculation. For

Figure 3.17: Pressure Sensor

pressure calculation, the Raspberry Pi uses a map function. This map function creates a
linear function using two points. We need to know the voltage values and corresponding
Pressure values at those points. The two points taken were 1 Bar and 4 Bar pressure with
the help of Pressure gauge mounted at the discharge of the Pump. Thus using this map
function the voltage drop values are converted to Pressure readings.

Output = map(pressure, 210, 1023, 0, 60) (3.8)

Temperature Sensor

The Temperature sensor used is Industrial grade and so its output is converted from 4-20
mA to 1-5 V using a resistor. As the Temperature increases, the output signal current
value also increases linearly. Thus the voltage drop across resistor also varies linearly.
The Raspberry Pi measures this voltage through Arduino and uses the voltage values for
Temperature values calculation. For Temperature calculation, the Raspberry Pi uses a

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 35


Remote Pump Monitoring System at NETZSCH

Figure 3.18: Temperature Sensor

map function. This map function creates a linear function using two points. We need
to know the voltage values and corresponding Temperature values at those points. The
two points taken were the extreme points of the sensor range that is 0 degree Celsius
and 100 degrees Celsius. The corresponding voltage drop for extreme temperate range
points will be the extreme points of voltage drop. Using these map function was developed
for temperature. Thus using this map function the voltage drop values are converted to
Temperature readings.

Output = map(temp, 210, 1023, 0, 100) (3.9)

3.8.2 Interfacing
Since Raspberry Pi and Arduino work on two completely different platforms it is necessary
to translate codes for the two microcontrollers to communicate. This is achieved by using
a standard library named Pyfirmata. The Standard Pyfirmata Code is uploaded onto the
Arduino and the library is called in python scripts in Raspberry Pi. The library allows
Raspberry Pi to establish Serial Communication with Arduino and allow it to call Arduino
whenever it needs Sensor data.
While the Raspberry Pi is great at interfacing to other components or interacting with
users (i.e. USB, display, ethernet), its also good for computationally expensive tasks like
computer vision. Arduino is great at doing things with very strict timing constraints or
with very little power. Arduinos are also good for compatibility with existing circuitry or
Arduino specific shield (add-on boards such as motor control, MIDI interfaces, and more).

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 36


Remote Pump Monitoring System at NETZSCH

To combine Raspberry Pi with an Arduino, you can use the Firmata protocol with Python
bindings. Firmata is a serial communication protocol that can control the Arduino’s GPIO
ports, read analog inputs, and control PWM and Servo pins.

Figure 3.19: Interfacing

3.8.3 Cloud Service


ThingSpeak is an IoT analytics platform service that allows you to aggregate, visualize
and analyse live data streams in the cloud. ThingSpeak provides instant visualizations
of data posted by the sensors to ThingSpeak. ThingSpeak is often used for prototyping
and proof of concept IoT systems that require analytics. The website makes it easier to
display data in form of graphs using its simple User-Interface on its website without the
need of website designing knowledge. A free account can be created with an Email-ID.[19]
From Raspberry Pi the data is sent to ThingSpeak channel which the user creates from
a ThingSpeak account. A unique write API (Application Program Interface) Key of the
channel is generated which is used by Raspberry Pi to send parameter values. Each Message
that Raspberry Pi sends can carry up to 8 variables data. The data is then represented in
graphical form on the ThingSpeak website. The Free version of ThingSpeak account used,
accepts data at the maximum rate of one Message per 15 seconds. Once all the parameter
values are calculated, it is sent to ThingSpeak channel using Raspberry Pi connected to
WiFi. A ThingSpeak account is created and on that, a channel is created. This channel
contains the parameters to be monitored as field variables. There are six parameters to
be monitored and so five field variables are created and named accordingly. The channel
has a unique API key which is entered in Raspberry Pi code to send data to ThingSpeak.
After calculating all parameters the Raspberry Pi sends a ‘message’ to the channel created
using the unique API key of that channel. Each message can contain data of up to 8 field
variables. Once ThingSpeak receives the ‘message’ it extracts each field variable data from
it and displays it in the form of a graph for each parameter. All this is executed using
BeautifulSoup library.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 37


Remote Pump Monitoring System at NETZSCH

Figure 3.20: Thingspeak

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 38


Remote Pump Monitoring System at NETZSCH

Chapter 4

Data Analysis

4.1 Introduction
The assumption made is that the flow data of the pump is monitored over a period of
time. The flow in the pump decreases over time due to the increased wearing of elastomer
lining over time. The degradation of seals also leads to leakages and a further decrease
in flow. The assumption made is that the flow decreases exponentially due to this. Since
actual flow readings are not available, MATLAB is used to generate randomly distributed
and exponentially decreasing points as the flow reading. The initial part of the curve is
used to predict the remaining part of the curve. It is similar to taking flow data from the
data monitoring system and determining its future behaviour to plan maintenance of the
pump accordingly. Curve fitting techniques are used to find out the nature of the flow
points. At some point, flow will decrease to such a critical low value that it is better to
replace or repair the parts. Using curve fitting predict the time when the flow reaches the
critical minimum value and plan its maintenance accordingly. The flow data from data
monitoring system is in raw form and requires some cleaning of data as the pump will not
be running continuously and the flow in the pump becomes zero during shift change or on
holidays depending upon its application. The data monitoring system stores reading during
downtime too. The expected actual flow data may look something like shown below.[20]

Figure 4.1: Expected Actual Flow Data

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 39


Remote Pump Monitoring System at NETZSCH

4.2 Curve Fitting


For the purpose of analysis, the assumption made is that of a continuously running pump.
The flow data from the actual pump after removing unwanted points can be made into
continuous form for analysis. To create artificial flow data, initial flow in the pump is taken
as 250 m/hr and it decreases exponentially as shown in the fig. 4.3. The critical minimum
flow is 220 m/hr. The flow is measured per minute of the pump operation. The flow data is
exponentially decreasing curve created and randomized using MATLAB function exprnd().
The artificial flow data thus produced is shown below. The zoomed-in view is also shown
in fig. 4.4 to see the variations.

Figure 4.2: Code for generating flow data

Figure 4.3: Flow data

The initial part of the curve till 15000 minutes is used for predicting the remaining part of
the curve.
To predict the remaining curve, Curve Fitting Tool of MATLAB is used. This tool can
automatically fit different curves and also display their residuals and errors. The various
curves taken into consideration are polynomial functions from degree one to five and the
exponential curve with 1 term. The fitted curves are as shown below.
The deciding factors chosen for getting the best fits are Visual inspection, Residual inspec-
tion, Sum of Squares due to Error (SSE), R-Square, Adjusted R-Square and Root mean
squared error (RMSE).
Sum of Squares Due to Error
This statistic measures the total deviation of the response values from the fit to the response

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 40


Remote Pump Monitoring System at NETZSCH

Figure 4.4: Zoomed View of Flow data

Figure 4.5: Code for opening Curve Fitting Tool

Figure 4.6: Fitted Curve for Polynomial of Degree 1

Figure 4.7: Fitted Curve for Polynomial of Degree 2

values. It is also called the summed square of residuals and is usually labelled as SSE.[21]
n
X
SSE = wi (yi − ŷi )2 (4.1)
i=1

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 41


Remote Pump Monitoring System at NETZSCH

Figure 4.8: Fitted Curve for Polynomial of Degree 3

Figure 4.9: Fitted Curve for Polynomial of Degree 4

Figure 4.10: Fitted Curve for Polynomial of Degree 5

A value closer to 0 indicates that the model has a smaller random error component, and
that the fit will be more useful for prediction.
R-Square
This statistic measures how successful the fit is in explaining the variation of the data. Put
another way, R-square is the square of the correlation between the response values and the
predicted response values. It is also called the square of the multiple correlation coefficient

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 42


Remote Pump Monitoring System at NETZSCH

Figure 4.11: Fitted Curve for Exponential

and the coefficient of multiple determination. R-square is defined as the ratio of the sum
of squares of the regression (SSR) and the total sum of squares (SST). SSR is defined as
n
X
SSR = wi (ŷi − ȳ)2 (4.2)
i=1

SST is also called the sum of squares about the mean, and is defined as
n
X
SST = wi (yi − ȳ)2 (4.3)
i=1

where SST = SSR + SSE. Given these definitions, R-square is expressed as

R − square = SSR/SST = 1 − SSE/SST (4.4)

R-square can take on any value between 0 and 1, with a value closer to 1 indicating that
a greater proportion of variance is accounted for by the model. For example, an R-square
value of 0.8234 means that the fit explains 82.34 of the total variation in the data about
the average.
Degrees of Freedom Adjusted R-Square
This statistic uses the R-square statistic defined above, and adjusts it based on the residual
degrees of freedom. The residual degrees of freedom is defined as the number of response
values n minus the number of fitted coefficients m estimated from the response values.

v = n–m (4.5)

v indicates the number of independent pieces of information involving the n data points
that are required to calculate the sum of squares. Note that if parameters are bounded
and one or more of the estimates are at their bounds, then those estimates are regarded as

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 43


Remote Pump Monitoring System at NETZSCH

fixed. The degrees of freedom is increased by the number of such parameters. The adjusted
R-square statistic is generally the best indicator of the fit quality when you compare two
models that are nested - that is, a series of models each of which adds additional coefficients
to the previous model.

R − square = SSR/SST = 1 − SSE/SST (4.6)

The adjusted R-square statistic can take on any value less than or equal to 1, with a value
closer to 1 indicating a better fit. Negative values can occur when the model contains terms
that do not help to predict the response.
Root Mean Squared Error
This statistic is also known as the fit standard error and the standard error of the regression.
It is an estimate of the standard deviation of the random component in the data, and is
defined as

RM SE = s = M SE (4.7)

where MSE is the mean square error or the residual mean square

M SE = SSE/v (4.8)

Just as with SSE, an MSE value closer to 0 indicates a fit that is more useful for prediction.
Residual Analysis
The residuals from a fitted model are defined as the differences between the response data
and the fit to the response data at each predictor value.

residual = data–f it (4.9)

Assuming the model fitted to the data is correct, the residuals approximate the random
errors. Therefore, if the residuals appear to behave randomly, it suggests that the model
fits the data well. However, if the residuals display a systematic pattern, it is a clear sign
that the model fits the data poorly.
Visual Inspection
If the fitted curve behaves differently in the predicted region, the curve is discarded. The
fitted curve should not show abnormal behavior in the extrapolated region.[22]
Applying all these factors to the fitted curves we observe:
By visual inspection the polynomial curves of degrees 3 and 5 bend in upward direction
making it a bad candidate for curve fitting and so we discard them. The abnormal change
in shape of polynomial of degree 4 also makes it a bad candidate for fit and so we discard
it. The high Sum of Squares due to Error (SSE) and Root Mean Square Error (RMSE)
values and lower R-Square and Adjusted R-Square values of Polynomial fit of degree 1
and exponential fit make them a bad candidates and hence we discard them. The only
remaining fit is polynomial of degree 2. Taking a closer look at residual of Polynomial
of degree 2 the residuals are appearing randomly, indicating a good fit. Hence we chose

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 44


Remote Pump Monitoring System at NETZSCH

Figure 4.12: Plot of Residual for Polynomial of Degree 2

polynomial of degree 2 as our final fitted curve.

Figure 4.13: Code for Comparing Original and Predicted Flow Data

Figure 4.14: Plot for Comparing

Plotting the fitted curve and comparing it with the original flow data it is observed that
the fit is close enough to the original flow data. The curve fitting tool gives the equation
of the fitted curve which helps to find the time for the flow to reach a critical minimum of
220 m/hr.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 45


Remote Pump Monitoring System at NETZSCH

Chapter 5

Results and Discussion

5.1 Testing
At the time of final testing all the connections and mountings were made. IR sensor
was mounted with utmost care in order to ensure that it transmits and receives signals as
intended. Wire harness was managed carefully in order to ensure safety on the test bed and
to instill professionalism in project.The output that was obtained was real time data points
on a cloud which were plotted in the form of graphs. The cloud could be accessed remotely
with login credentials. The system was finally deployed on test bed and the pump used for
our demonstration was NEMO 45. The results were then cross checked with the LABVIEW
based offline system which the company is using. Along with it some results were also cross
checked with the mechanical gauges which were mounted with the help of adapter at the
exit of the pump. After getting the output from the sensors and calibrating the device
using linear interpolation, along with the cloud transfer of data we also included an offline
excel file which would take data points at a faster rate for the purpose of data analysis
and to preserve the points in case of internet disconnection. The system was run for hours
and huge quantum of data was generated for further analysis. The data was then analysed
using MATLAB. Curve fitting tool which is the most widely used tool in MATLAB was
used to fit curve using initial points and predict its behaviour for predictive maintenance.
The microcontrollers that were used have a very high reliability and can be used for decades
without any difficulty however other components like wiring were susceptible to damage in
an industrial environment thus hampering the overall system reliability. One option that
could be explored in converting hard wired circuit on a custom made PCB reducing the
size of equipment and increasing the reliability of the system. Since some pumps are not
run in same operating conditions and also time for which they are used may vary based
on application, the time remaining for maintenance will also vary. The data monitoring
system takes data from each pump and so analyzed data will give separate solution for each
pump and hence the solutions obtained will be more reliable than assuming same time for
all pumps.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 46


Remote Pump Monitoring System at NETZSCH

5.2 Case Study


Nemo 45 pump operates at varying pressure levels depending on the size. The pump used
for testing the system had an operation range of 1 bar to 6 bar. Although the pumps are
manufactured to withstand almost twice the pressure this can incur damage to the pump.
The pump is mounted on the company’s test bench. The pump is connected in a closed
loop to a water large tank (Capacity 17000 litres). Sensors are mounted onto the pump and
connected to the RPMS system. Pressure sensor (Wika S-10) is mounted on the discharge
end of the pump before the discharge valve. Temperature sensor (PT-100) is mounted on
the inlet pipe. Three current sensors (ASC 712-20A) are used, one for each phase. IR
sensor(LM393) is used to detect the pump speed. The pump is connected to three phase
440 V AC current source operating at 50 Hz.
Pressure :- For the test run the critical limit was set at 4 bar. The system takes this as the
critical value or the limiting value. Thus if the pressure increases beyond 4 bar, the system
sends an email to the operator warning about the situation. In an industry, such condition
might occur due to :-

• Accidental shutting of the discharge valve.

• Blockage in the pipeline.

For the purpose of testing, this condition was replicated by slowly closing the discharge
valve.

Figure 5.1: Email Alert

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 47


Remote Pump Monitoring System at NETZSCH

Observation 1
Increasing Pressure: Initially, the pressure is kept stable at 2.49 bar. The valve is now
slowly closed. Pressure increases gradually until it reaches 2.74 bar. Now the valve is
rapidly closed and the pressure increases to 4.85 bar and is kept stable. Effect of this
sudden rise in pressure is checked by monitoring other parameters. The inlet temperature
has little to negligible change, however, a change in the current drawn is observed. Current
value increases from 2.49 Amps to 3 Amps. This rise is however rapid and initial and
flattens as pressure continues to earn stability. There is a slight variation in the current
following the sudden rise.

Figure 5.2: Increasing Pressure

Inference: The crucial characteristic of the positive displacement pump is that the speed
remains independent of the flow rate. The pump is designed to maintain a constant rpm
at the given frequency (here 50 Hz) the pump runs at a constant 321 rpm. Thus in order
to maintain this constant rpm, the motor draws more current from the source against the
increased load due to an increase in pressure. This justifies the rise in current.
System :- The system takes the critical value as an input. The critical value is set to 4
bar. Thus as the pressure exceeded 4 bars, an email was sent to the operator. This can
also be observed from the data that is sent online. Thus the operator can monitor the
data online and check how other parameters are behaving. This helps the operator to get
a broad picture of the situation. When the pressure reduces to be within the acceptable
range, the system sends another email stating the situation has escalated.

Observation 2
Reducing pressure: The pressure is now reduced by opening the discharge valve. The
pressure drops from 4.7bar to 3.1bar rapidly. This decrease in pressure now relieves the
load on the pump. Thus the current drawn by the motor now reduces from 2.9Amps to
2.5Amps. Other parameters are not affected by this drop in pressure.
Observation 3
Starting and Shutdown :- The graph of pressure versus current shows that the current

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 48


Remote Pump Monitoring System at NETZSCH

Figure 5.3: Decreasing Pressure

drawn increases to a very high value when the pump starts and shuts even though the
pressure is within limits.

Figure 5.4: Start

Inference: The starting and shutdown of the pump are done according to the procedure.
The pump is connected to a three phase AC source. The frequency of the current is
gradually increased to the desired operating frequency. The speed of the motor varies
depending upon the frequency of the input current. The testing was done at 50 Hz frequency
AC current resulting in pump speed of 321 rpm. As this frequency is gradually increased
from 0 Hz, the current drawn increases rapidly to values higher than usual operating
values. Although this situation is alarming but is an acceptable starting procedure. A
similar situation is observed during pump shutdown. The frequency is reduced to 0 Hz
gradually, the pump slows down to a stop and the current rises rapidly to value as high as
4.01 Amps.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 49


Remote Pump Monitoring System at NETZSCH

Figure 5.5: Shutdown

Discussion

Performance monitoring is intended to measure the current status of an operational item


but it does not automatically imply that a predictive maintenance policy is in place. There
has to be a system that receives the parameter values measured by the condition monitor-
ing technique and utilise these values as an input to the predictive maintenance strategy.
A performance monitoring programme is an irreducible minimum for the predictive main-
tenance strategy to hold but a successful predictive maintenance concept is a consciously
applied policy. The evolving paradigms of the Industrial Internet of Things (IIoT) gives
credence to the prediction of the 4th industrial revolution which was first identified in
Germany as Industry 4.0.[23] The disruptive nature of an industrial revolution means that
there will be a shift in the general ways of doing things and there has been discussions in
the maintenance engineering communities as per the impacts of these shifts in practice.
The relevance of this report and the results obtained from the investigations are grounded
in the reach to provide some basic proposals on how to structure and analyse data for the
purpose of predictive maintenance and systems prognosis. It is expected to be a means
to bridge the state-of-the-art in maintenance and the future maintenance practice which is
smart by its perspective and data driven by application.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 50


Remote Pump Monitoring System at NETZSCH

Chapter 6

Conclusion

From the first Industrial visit in July 2018 and thereafter through literature review we
realised that the Indian Private Sector is keen to take the automation bus. So far cloud
based automation was a thing in the West. In this project we have investigated the use of
such system on a product which is of great importance in any industry. A low cost system
for the purpose of proof of concept was developed and tested on the industry test bed with
direct comparison with existing system.
The presented system worked perfectly fine with minor latencies due to free version of 3rd
party services. We could thus conclude that cloud based automation is perfectly viable for
a scenario like ours. The system was portable and could be deployed on any pump around
the globe. The benefit of monitoring several parameters on one screen is that the supervisor
can make a much more informed inference and the action thus initiated will thus be more
logical. Another important advantage is that right from pump installation till the end of
its life each and every second of how it has functioned can be documented on an external
server. The data can be further used in R&D , to predict maintenance by studying trends
and other mathematical analysis.
Data points for flow is artificially generated using MATLAB and is used for analysis. The
Curve Fitting Tool of MATLAB is used to fit curve for the initial flow data and polynomial
curves of degree one to five and exponential curve was tested for goodness of fit. Polynomial
of degree two is found to be the best fit and it’s equation is used to find the time for flow
to reach the critical minimum limit. The time obtained is used in predictive maintenance
of the pump. Such forecasting methods can be used to not only predict but also detect any
outliers and accommodate the inaccuracies of cheap sensors which we used for the purpose
of this project.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 51


Remote Pump Monitoring System at NETZSCH

Figure 6.1: Final System

6.1 Profitability
This IoT investment has to be studied both from the technological and business side
and also an optimal profitability analysis method for the capital budgeting processes for
the IoT investments. However, a very interesting future research topic would be to analyse
the managerial flexibility of IoT investments, especially related to the intelligence layer and
monetization of the data produced from the IoT sensors. In many ways the IoT investment
can be considered as an instrumentation process of sensors to collect all the available data
of the various processes of the companies and then extracting value from that sensor data.
There are many possible ways to extract value from that data which provides the flexibility
to change the IoT investment when situations change regarding the investment. In our case
comparing Raspberry Pi based system with LABVIEW it is no brainer fact that LABVIEW
is several times more expensive however it is much more professionally suited to perform
the intended application on the test bed. The application areas are completely different,
the system developed by us for this project is intended to be portable system and serve as
an accessory sale with the pump.

6.2 Limitations
The project has several limitations. The system needs internet connectivity all the
time. Pumps in remote geographical locations with no access to internet will not be able

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 52


Remote Pump Monitoring System at NETZSCH

to use all the features of this system. The sensors used are cheapest in the market thus
the accuracy of the data is compromised. There is a 15 second latency in data transfer
over cloud due to free version of cloud service. The overall reliability of system is relatively
low and it is not susceptible for industrial environment because of fragile jumpers used for
connections. The size of the casing is also relatively large and there is scope for reducing
the size to ensure ease of portability.

6.3 Future Prospects


Since IoT is an extensive field of research there is always more to do. Condition
monitoring is monitoring bearing vibrations over cloud. The most critical component in a
pump is the bearing thus condition monitoring is important to know the health of bearing.
The rationale of this entire idea lies in data analysis and actually predicting maintenance
which will help the customer at the end. Data Analysis and using concepts of Big Data is
trending currently. One of the major parts for IoT is the provision of information as a basis
for decision-making. Whether the purpose is to provide information to an individual or
another actuation system, the decision-making in the end revolves around information. One
major area is to develop a closed loop network which is possible if a feedback is programmed
and several actuators are used to take actions based on information. Actuation based relay
systems or Pneumatic systems can be an extension to this project. Since we envision
that the product can be sold as an accessory with the pump it is of utmost importance
to achieve economies of scale and bring the cost down. Also the product needs to meet
industry specification to be deployed on shop floor. In the future we can work on how the
system can be put into mass manufacturing and give it a commercial angle.

Figure 6.2: Casing

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 53


Remote Pump Monitoring System at NETZSCH

References

[1] Thomas Boehme, NETZSCH Pumps Systems GmbH, Head Of Business Field Oil Gas
Mid- Dowstream, Page 6

[2] Gamboa, J., Olivet, A., Iglesias, J. and Gonzalez, P., 2002, “Understanding the Perfor-
mance of a Progressive Cavity Pump with a Metallic Stator,” Petroleos de Venezula,
S.A (PDVSA), Los Teques, Venezula. p. 19-21

[3] Sorelys Espı́n, Frank Kenyery; Model for Performance Prediction of Progressive Cavity
Pumps; SPE International; p 6.

[4] “Real-Time Monitoring and Control of the Parameters of an Induction Motor”, De-
partment Of Electrical and Electronics Engineering, Technology of Faculty, Gazi Uni-
versityTeknikokullar Ankara, Turkey

[5] Mohammad Ibrahim, Abdelghafor Elgamri and Ahmed Mohamed, Internet of Things
based Smart Environmental Monitoring using the Raspberry-Pi Computer,ISBN: 978-1-
4673-6832-22015 IEEE.Ding, W. and Marchionini, G. 1997 A Study on Video Browsing
Strategies. Technical Report. University of Maryland at College Park.

[6] Mauro C. Balasubramaniyan* and D. Manivannan, IoT Enabled Air Quality Monitoring
System (AQMS) using Raspberry Pi,Indian Journal of Science and Technology, Vol
9(39), DOI:10.17485/ijst/2016/v9i39/90414, October 2016.

[7] Maintenance and Troubleshooting of Progressive Cavity Pump, Chad Huskey, MOYNO
Cavity Pumps.pdf

[8] Matt Richardson, Shawn Wallace; Getting Started with Raspberry Pi; O’Reilly Media,
Inc. p 75-82.

[9] https://circuitdigest.com/tutorial/zener-diode-types-applications-and-operational-
principle

[10] Hall Effect Sensing and Application, Pages 1-8.


https://sensing.honeywell.com/hallbook.pdf

[11] Infrared IR Sensor Circuit Diagram and Working Principle


https://www.elprocus.com/infrared-ir-sensor-circuit-and-working/

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 54


Remote Pump Monitoring System at NETZSCH

[12] Diaphragm Pressure Transducer http://www.instrumentationtoday.com/diaphragm-


pressure-transducer/2011/09/

[13] Pressure transmitter, model S-10, Pages 19-22.


https://www.wika.co.in/upload/OI S 10 en de fr es 6295.pdf

[14] Resistance Thermometer https://en.wikipedia.org/wiki/Resistance thermometerTwo-


wire configuration

[15] PT100 Platinum Resistance Thermometers https://www.picotech.com/library/application-


note/pt100-platinum-resistance-thermometers

[16] https://ncd.io/reading-4-20ma-current-loop-sensors-using-arduino/

[17] https://arduino.stackexchange.com/questions/45485/reading-4-to-20ma-pressure-
sensor-using-uno

[18] https://raspberrypi-aa.github.io/session3/firmata.html

[19] Sharmad Pasha, Thingspeak Based Sensing and Monitoring System for IoT with Mat-
lab Analysis, International Journal of New Technology and Research (IJNTR) ISSN:
2454-4116, Volume-2, Issue-6, June 2016 Pages 19-23

[20] Ramasamy Karthikeshwaran, Leakage Analysis of Metal Progressive Cavity Pump,


Department of Petroleum Engineering, AMET University, Chennai - 603 112, India.
BIOSCIENCES BIOTECHNOLOGY RESEARCH ASIA, October 2014. Vol. 11(Spl.
Edn. 1), p. 357-361.

[21] Evaluating Goodness of Fit, Mathworks Documentation


https://in.mathworks.com/help/curvefit/evaluating-goodness-of-fit.html

[22] Mathworks Documentation, https://in.mathworks.com/help/curvefit/examples/polynomial-


curve-fitting.html

[23] Jay Lee, Behrad Bagheri, Hung-An Kao, A Cyber-Physical Systems architecture for
Industry 4.0-based manufacturing systems, Manufacturing Letters, Volume 3, January
2015, Pages 18-23.

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 55


Remote Pump Monitoring System at NETZSCH

Appendix A

Main Program

def map(a,b,c,d,e):
return (a-b)*(e-d)/(c-b)+d

#Average MaxMin Pressure


def getpres():
maxValuep = 0
minValuep = 1024
start_time = time.time()
while(time.time()-start_time<1):
time.sleep(0.0005)
a = Tv5.read()
if a is not None:
b = a*1024
if b > maxValuep:
maxValuep = b
if b < minValuep:
minValuep = b
result = (maxValuep + minValuep)/2
return result;

"""#Total Average Pressure


def getpres():
total = 0
count = 0
anikidetari = 1
start_time = time.time()
while(time.time()-start_time<1):
time.sleep(0.0005)
a = Tv5.read()
if a is not None:

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 56


Remote Pump Monitoring System at NETZSCH

b = a*1024
total = total + b
count = count + 1
if (count == 0):
anikidetari = 210
total = 1
count = 1

result = (total)*(anikidetari)/count
return result;"""

#1 sec current
def getVPP():
maxValue1 = 0
minValue1 = 1024
maxValue2 = 0
minValue2 = 1024
maxValue3 = 0
minValue3 = 1024
start_time = time.time()
while(time.time()-start_time<1):
time.sleep(0.0005)
a1 = Tv1.read()
if a1 is not None:
b1 = a1*1024
if b1 > maxValue1:
maxValue1 = b1
if b1 < minValue1:
minValue1 = b1
time.sleep(0.0005)
a2 = Tv2.read()
if a2 is not None:
b2 = a2*1024
if b2 > maxValue2:
maxValue2 = b2
if b2 < minValue2:
minValue2 = b2
time.sleep(0.0005)
a3 = Tv3.read()
if a3 is not None:

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 57


Remote Pump Monitoring System at NETZSCH

b3 = a3*1024
if b3 > maxValue3:
maxValue3 = b3
if b3 < minValue3:
minValue3 = b3

result1 = (maxValue1 - minValue1)*5.0/1024.0


result2 = (maxValue2 - minValue2)*5.0/1024.0
result3 = (maxValue3 - minValue3)*5.0/1024.0
return result1,result2,result3;

"""#3Sec Current
def getVPP1():
maxValue = 0
minValue = 1024
start_time = time.time()
while(time.time()-start_time<1):
time.sleep(0.0005)
a = Tv1.read()
if a is not None:
b = a*1024
if b > maxValue:
maxValue = b
if b < minValue:
minValue = b
result = (maxValue - minValue)*5.0/1024.0
return result;

def getVPP2():
maxValue = 0
minValue = 1024
start_time = time.time()
while(time.time()-start_time<1):
time.sleep(0.0005)
a = Tv2.read()
if a is not None:
b = a*1024
if b > maxValue:
maxValue = b

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 58


Remote Pump Monitoring System at NETZSCH

if b < minValue:
minValue = b
result = (maxValue - minValue)*5.0/1024.0
return result;

def getVPP3():
maxValue = 0
minValue = 1024
start_time = time.time()
while(time.time()-start_time<1):
time.sleep(0.0005)
a = Tv3.read()
if a is not None:
b = a*1024
if b > maxValue:
maxValue = b
if b < minValue:
minValue = b
result = (maxValue - minValue)*5.0/1024.0
return result;"""

try:
from pyfirmata import Arduino, util
except:
import pip
pip.main([’install’,’pyfirmata’])
from pyfirmata import Arduino, util
from bs4 import BeautifulSoup

import time
import os
from time import sleep
from datetime import datetime
import smtplib
import datetime

import httplib, urllib


sleep = 1 # how many seconds to sleep between posts to the channel
key = ’MJLGOLS8C46I6U3X’ # Thingspeak channel to update

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 59


Remote Pump Monitoring System at NETZSCH

board = Arduino(’/dev/ttyACM0’)

iterator = util.Iterator(board)
iterator.start()

fromaddr = ’Kakashi15897@gmail.com’
toaddrs = ’sidvnaik@gmail.com’

# Credentials (if needed)


username = ’Kakashi15897@gmail.com’
password = ’KaKaShI?158’

msg1a = ’The current in phase 1 is above 7Amps!’


msg1b = ’The current in phase 1 is now below 7Amps!’
msg2a = ’The current in phase 2 is above 7Amps!’
msg2b = ’The current in phase 2 is now below 7Amps!’
msg3a = ’The current in phase 3 is above 7Amps!’
msg3b = ’The current in phase 3 is now below 7Amps!’
msg5a = ’The pressure is above 5Bar!’
msg5b = ’The pressure is now below 5Bar!’
msg6a = ’The Inlet temperature is above 35 Degree Celsius!’
msg6b = ’The Inlet temperature is now below 35 Degree Celsius!’
msg7a = ’The Elastomer temperature is above 40 Degree Celsius!’
msg7b = ’The Elastomer temperature is now below 40 Degree Celsius!’
msg8a = ’The Motor temperature is above 50 Degree Celsius!’
msg8b = ’The Motor temperature is now below 50 Degree Celsius!’

count = 0
counts = 0
rpm = 0
exact = 0
something = 0
kidetari = 1
sent1 = 0
sent2 = 0
sent3 = 0
sent4 = 0
sent5 = 0
sent6 = 0

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 60


Remote Pump Monitoring System at NETZSCH

sent7 = 0
sent8 = 0

tp = time.time()
t0 = time.time()

Tv1 = board.get_pin(’a:0:i’)
Tv2 = board.get_pin(’a:1:i’)
Tv3 = board.get_pin(’a:2:i’)
Tv4 = board.get_pin(’d:2:i’) #Speed
Tv5 = board.get_pin(’a:3:i’) #Pressure
Tv6 = board.get_pin(’a:4:i’) #TemperatureInlet
"""Tv7 = board.get_pin(’a:5:i’) #TemperatureElastomer
Tv8 = board.get_pin(’a:6:i’) #TemperatureMotor """

file = open("/home/pi/data_lognotfinal.csv", "a")


if os.stat("/home/pi/data_lognotfinal.csv").st_size == 0:
file.write("Time,Current1,Current2,Current3,Pressure,RPM,InletTemperature,E

while True:
time.sleep(0.0005)

"""#CURRENT 3 sec
result1=getVPP1()
VRMS = (result1/2.0)*0.707
mVperAmp=100
AmpsRMS1 = (VRMS*1000)/mVperAmp
print AmpsRMS1 , "Amps1"
if (AmpsRMS1 > 7):
if (sent1 == 0):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg1a)
server.quit()
sent1 = 1
elif(AmpsRMS1 < 7):
if (sent1 == 1):

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 61


Remote Pump Monitoring System at NETZSCH

server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg1b)
server.quit()
sent1 = 0

result2=getVPP2()
VRMS = (result2/2.0)*0.707
AmpsRMS2 = (VRMS*1000)/mVperAmp
print AmpsRMS2, "Amps2"
if (AmpsRMS2 > 7):
if (sent2 == 0):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg2a)
server.quit()
sent2 = 1
elif(AmpsRMS2 < 7):
if (sent2 == 1):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg2b)
server.quit()
sent2 = 0

result3=getVPP3()
VRMS = (result3/2.0)*0.707
AmpsRMS3 = (VRMS*1000)/mVperAmp
print AmpsRMS3 , "Amps3"
if (AmpsRMS3 > 7):
if (sent3 == 0):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg3a)
server.quit()
sent3 = 1

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 62


Remote Pump Monitoring System at NETZSCH

elif(AmpsRMS3 < 7):


if (sent3 == 1):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg3b)
server.quit()
sent3 = 0"""

#CURRENT 1 sec
cur1,cur2,cur3=getVPP()
VRMS = (cur1/2.0)*0.707
mVperAmp=100
AmpsRMS1 = (VRMS*1000)/mVperAmp
print AmpsRMS1 , "Amps1"
if (AmpsRMS1 > 7):
if (sent1 == 0):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg1a)
server.quit()
sent1 = 1
elif(AmpsRMS1 < 7):
if (sent1 == 1):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg1b)
server.quit()
sent1 = 0

VRMS = (cur2/2.0)*0.707
AmpsRMS2 = (VRMS*1000)/mVperAmp
print AmpsRMS2 , "Amps2"
if (AmpsRMS2 > 7):
if (sent2 == 0):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg2a)

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 63


Remote Pump Monitoring System at NETZSCH

server.quit()
sent2 = 1
elif(AmpsRMS2 < 7):
if (sent2 == 1):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg2b)
server.quit()
sent2 = 0

VRMS = (cur3/2.0)*0.707
mVperAmp=100
AmpsRMS3 = (VRMS*1000)/mVperAmp
print AmpsRMS3 , "Amps3"
if (AmpsRMS3 > 7):
if (sent3 == 0):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg3a)
server.quit()
sent3 = 1
elif(AmpsRMS3 < 7):
if (sent3 == 1):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg3b)
server.quit()
sent3 = 0

#SPEED
starttime = time.time()
tp = 0
tq = 0
exact = 0
counts = 0
finishtime = time.time()
#r = (t1-t0)
while ((finishtime- starttime) < 2):

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 64


Remote Pump Monitoring System at NETZSCH

time.sleep(0.0005)
i=Tv4.read()
#print i
if (i == True):
if (something == 0):
if (count == 0):
count = count + 1
tp = time.time()
#exact = exact + (time.time() - tp)
something = 1
else :
exact = exact + (time.time() - tp)
counts = counts + 1
something = 1
tp = time.time()
elif (i == False):
something = 0
finishtime = time.time()
#exact = exact + (tq - tp)
if (exact == 0):
kidetari = 0
exact = 1
rpm = (counts*60)*kidetari/exact
#print exact
print rpm , "RPM"
count = 0
kidetari = 1
exact = 0
#t0 = time.time()

#PRESSURE
x = getpres()
pressure=map(x,210,1023,1.013,25)
print pressure,"Pressure"
print "\n"
if (pressure > 5):

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 65


Remote Pump Monitoring System at NETZSCH

if (sent5 == 0):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg5a)
server.quit()
sent5 = 1
elif(pressure < 5):
if (sent5 == 1):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg5b)
server.quit()
sent5 = 0

"""#INLET TEMPERATURE
tempi= (Tv6.read()*1024)
outputti=map(tempi,210,1023,0,100)
print ("Temperature")
print outputti
print "\n"
if (outputti > 35):
if (sent6 == 0):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg6a)
server.quit()
sent6 = 1
elif(outputti < 35):
if (sent6 == 1):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg6b)
server.quit()
sent6 = 0

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 66


Remote Pump Monitoring System at NETZSCH

#ELASTOMER TEMPERATURE
tempe= (Tv7.read()*1024)
outputte=map(tempe,210,1023,0,100)
print ("Temperature")
print outputte
print "\n"
if (outputte > 40):
if (sent7 == 0):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg7a)
server.quit()
sent7 = 1
elif(outputte < 40):
if (sent7 == 1):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg7b)
server.quit()
sent7 = 0

#MOTOR TEMPERATURE
mtemp=(Tv8.read()*500)
print mtemp
print "\n"
if (mtemp > 50):
if (sent8 == 0):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg8a)
server.quit()
sent8 = 1
elif(mtemp < 50):
if (sent8 == 1):
server = smtplib.SMTP(’smtp.gmail.com:587’)
server.starttls()
server.login(username,password)

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 67


Remote Pump Monitoring System at NETZSCH

server.sendmail(fromaddr, toaddrs, msg8b)


server.quit()
sent8 = 0"""

"""params = urllib.urlencode({’field1’: AmpsRMS1,’field2’:


AmpsRMS2,’field3’: AmpsRMS3,’field4’: rpm,’field5’: pressure,’field6’:
outputti,’key’:key })
headers = {"Content-typZZe": "application/x-www-form-urlencoded","Accept":
"text/plain"}
conn = httplib.HTTPConnection("api.thingspeak.com:80")
try:
conn.request("POST", "/update", params, headers)
response = conn.getresponse()
print temp
print response.status, response.reason
data = response.read()
conn.close()
except:
print "connection failed"
#break
now = datetime.datetime.now()
file.write(str(now)+","+str(AmpsRMS1)+","+str(AmpsRMS2)+","+str(AmpsRMS3)+
","+str(rpm)+","+str(pressure)+","+str(outputti)+"\n")
file.flush()

if __name__ == "__main__":
while True:
time.sleep(sleep)"""

Mechanical Engineering Department, Goa College of Engineering, Farmagudi. 68

Das könnte Ihnen auch gefallen