1) Introduction

Predictive analytics is the process of using data analytics to make predictions based on data. This process uses data along with analysis, statistics, and machine learning techniques to create a predictive model for forecasting future events.

Digital twin technology implies creating a virtual representation of a physical asset or a system; to model its state and simulate its performance. Digital twins are continuously learning systems, powered by machine learning algorithms, which makes them adaptive to the changes in the state and configuration of a physical twin.

This project would be combining the duos for predictive maintenance of 3D Printer (Tevo Tarantula) through Raspberry Pi3B+ Octoprint server and Avnet Azure Sphere MT3620 Starter Kit.

                                   

 

* Note: Any 3D printer following the footsteps of Project RepRap can be easily implemented through this methodology.

 

2) Hardware Requirements

- Avnet Azure Sphere MT3620 Starter Kit

- A working 3D printer

- A Raspberry Pi 3B+

- Power supply for RPi 3B+(optional); can be powered through SMPS of 3D printer

- USB cables for azure sphere kit and 3D printer

- Ethernet cable for preliminary configuration of RPi

 

3) Software Requirements

- Visual Studio 2017 with Azure Sphere SDK

- Microsoft Azure Web Service

- Github : Azure Sphere Repository

- Octoprint Image(latest and stable)

- Terminal program like Putty & Hterm(optional)

 

4.1) Azure Sphere - Goals fulfilled...

-Use onboard ambient-environment sensor for detecting 3D printer's enclosure temperature, pressure and lux levels.

-Use onboard IMU unit for sensory feedback of 3D printer

-Use onboard wifi for OTA updates and periodic sync with azure cloud services.

 

4.2) Azure Sphere - Programming & Code Modifications

The project involves the use of handy code provided by AVNET and Azure Sphere Github workspace as well as modified repo provided at the end of the project. Starting with the Relay-Click and the Current-Click and moving further to the PWM, ADC(hardcore) and the IntercoreComms. Getting on-board sensor data was fun especially the Inertial Measurement Unit and the environment sensor, where I combined the codes from toggling on-board RGB LED, and relay module for change in gyroscopic values.

The light sensor's ADC value was visualized in Hterm application through the use of  USB to Serial converter that was connected to azure sphere's J11 pins, that needs to be soldered manually. Using azure sphere; helped myself accelerate the concept into prototype in the most simplistic method I have ever witnessed.

 

5) Methodology

Step 1. Creating a digital twin for 3D Printer;

3D Model of my printer

Building an accurate 3D model of Tevo tarantula; and powering the model with IoT data integrated from Azure Sphere IMU and Octoprint server

To build a 3D model of our 3D printer we have modelled each part of the system to our close approximation through Solidworks and Fusion360, collaborating the mechanical, electrical and process engineering to describe and virtually present the physical properties of printer and its components (e.g., vibration, fatigue in x-axis extruder tension belt, wobbling in z-axis, ambient temperature, 3D axis movement, etc.). Then, this 3D model is powered with IoT data fetched from Avnet Azure Sphere MT3620 Starter Kit mounted overboard the X-axis carriage(refer the diagrams for more detail). This data includes records about printer's performance, condition and environment and combines this data with the real-time data obtained from the raspberry powered Octoprint server.

 

Step 2. Putting the digital twin into real action;

            

The digital twin-based predictive maintenance software takes in real-time sensor records about the health and working conditions of printer and analyzes it against collected and simulated historical data about the printer’s failure modes and it's associated criticality.

A neural network model (designed through MatLab) detects abnormal patterns in the incoming sensor data and reflects the patterns in predictive models, which are then used to predict failures. This way, if the printer's current configuration is likely to lead to a failure, the digital twin software localizes the issue, assesses its criticality, notifies the owner, and would probably recommend a mitigating action(currently working on).

The current setup possess the ability to simulate different maintenance scenarios. Hence we can use this digital twin to test maintenance scenarios or particular fixes and see how it works for our targeted equipment before applying to the physical twin(Tevo Tarantula).

 

6) Resources

Avnet Azure Sphere Kit setup

Octoprint setup for RaspberryPi3B+

Tevo Tarantula 3D Model

 

7) Assembly

Azure Sphere MT3620 exposes every interface required for the project, here raspberry pi 3/3B+ is connected to the printer via blue USB cable and azure sphere connected through black USB cable, azure sphere logs the raw onboard (IMU) sensor to the azure cloud service, and MKSgen board (spinoff MEGA2560) logs the fine details of 3D printer to RPi powered Octoprint server, the trio devices can be easily powered through the printer's SMPS, while the data can be accessed to local private network.

The entire setup is tried and tested barely, and soon would be revamped with 3D printed custom ABS enclosure.

 

Code

Github Repo

 

Future Work

Prescriptive Analytics for close feedback C.A. Manufacturing of 3D printer's parts(classified until publish)...