Predictive Maintenance and Machine Health Monitoring Using Losant and ncd.io Current Monitor
Predictive Maintenance and Machine health monitoring is one of the most critical and important parts of the automation industry. In an automation or production factory these machines work on an average 20 hours per day. In modern automation, all these machines work together and stay in sync, so its very important that every single machine is healthy. In the old days, the usual ways to monitor machine health was manual inspection and occasional temperature readings. With modern day technology, we can monitor these machines 24-7 and analyze the health. By doing this we keep an eye on every single change the machine is going through. The machine health monitoring is also known as predictive maintenance.
Whats Predictive Maintenance and Machine Health Monitoring?
Predictive maintenance and machine health monitoring go side by side. If we know whats going on with the machine, we can predict when it needs repair or the end of it’s useful life. By knowing these two things we can work on fixing the problem on a schedule without any operational down-time. There are quite a few ways we can monitor device or machine health and a send notification to a technician when a machine needs some attention. There are few device which are used to connect machine health data:
- Temperature and Humidity Data Monitoring
- Current and Voltage Monitoring
- Vibration Monitoring
In this article, we will read current and publish the data on Losant. Losant supports graphs, UI, notifications, and emails. These features make it ideal for predictive maintenance analysis. In this project, we will use the following hardware:
On the software side we will use Arduino IDE to program the ESP8266 and will use Losat to display the data and plot the graphs.
Configuring Losant for Current Monitoring Applications
If you haven’t checked out our last article, we recommend reading the Getting Started with Losant and a NCD Temperature Humidity Sensor
In this article you can learn how to setup Losant to read any ncd.io hardware and display the data. Once you get to know the interface, you can easily connect any ncd hardware. Here we will go through some basic steps:
- Click on dashboard and create a new dash board
2. Create a new device
3. Define the attributes
4. Generate the access key and the security key
Now we can work on writing ESP8266 code. This code can be found on github as well.
//----------I2CCallback-----------// void taskI2CCallback(){ Serial.println("taskI2CStarted"); Serial.print("timeout for this task: t"); Serial.println(tI2C.getTimeout()); unsigned int data[2]; // Start I2C transmission Wire.beginTransmission(Addr); // Send humidity measurement command, NO HOLD master Wire.write(0xF5); // Stop I2C transmission Wire.endTransmission(); delay(500); // Request 2 bytes of data Wire.requestFrom(Addr, 2); // Read 2 bytes of data // humidity msb, humidity lsb if(Wire.available() == 2) { data[0] = Wire.read(); data[1] = Wire.read(); // Convert the data float humidity = (((data[0] * 256.0 + data[1]) * 125.0) / 65536.0) - 6; // Output data to Serial Monitor Serial.print("Relative Humidity :"); Serial.print(humidity); Serial.println(" %RH"); humid = humidity; } // Start I2C transmission Wire.beginTransmission(Addr); // Send temperature measurement command, NO HOLD master Wire.write(0xF3); // Stop I2C transmission Wire.endTransmission(); delay(500); // Request 2 bytes of data Wire.requestFrom(Addr, 2); // Read 2 bytes of data // temp msb, temp lsb if(Wire.available() == 2) { data[0] = Wire.read(); data[1] = Wire.read(); // Convert the data float cTemp = (((data[0] * 256.0 + data[1]) * 175.72) / 65536.0) - 46.85; float fTemp = (cTemp * 1.8) + 32; tempC = cTemp; tempF = fTemp; // Output data to Serial Monitor Serial.print("Temperature in Celsius :"); Serial.print(cTemp); Serial.println(" C"); Serial.print("Temperature in Fahrenheit :"); Serial.print(fTemp); Serial.println(" F"); } }
Arduino Output on the Serial Monitor
AC current Data when the device is off:
AC Current data when the device is power on:
Once data has reached Losant, you can trigger events, send emails, push notifications, and much more.
There are so many things which can be done by monitoring the power consumption data. When a device is having any issues, the first thing it will show is a change in the power consumption (in most cases). Using this application, we can trigger and event or an alarm if we see any irregular changes in power consumption. The same setup can be used to trigger an alarm when a device goes offline unexpectedly. The same setup can be used to count the number of hours machines have been in operation and number of hours a machine has been in idle state. Using these data, we can extrapolate an extended life span based past experiences with similar equipment.