Build an AI-powered predictive maintenance solution with TinyML, Azure Sphere, and Microsoft Teams
Published Mar 28 2022 08:44 AM 5,032 Views

ML on embedded hardware


AI-powered predictive maintenance can help identify a faulty machine before a real problem occurs, reducing maintenance costs, improving availability and customer satisfaction. The advantages of predictive maintenance include:

  • Reduced carbon footprint. Keeping equipment running well has straightforward benefits for operating efficiency, but we should also ensure our processes are efficient. Fault monitoring can generate high volumes of low-value data. Sending this data to cloud systems consumes power and network resources. Running an ML model on embedded hardware consumes less electricity and network resources. Only predicted maintenance events get sent to the backend systems. Disabling network interfaces (for example, Wi-Fi) can further reduce power consumption until a high-value predictive maintenance event occurs.
  • Access to better data for faster fault resolution.
  • Low latency response to system faults. There are fault monitoring use cases that require immediate action to shut down a system. Sending fault monitoring data to cloud systems for processing might be too slow, further damaging the machine.


Predictive maintenance on Azure Sphere


Azure Sphere is a secure embedded platform that is ideal for quickly developing an IoT system. By providing a platform meeting all 7 properties of highly secured devices, Azure Sphere eliminates the need to be a hardware, OS, and security expert. These seven properties make Azure Sphere ideal for running and updating ML models. You don’t want to solve one problem (equipment operation) and introduce a larger one (security).


You can deploy up to 3 custom apps on Azure Sphere, including two ML workloads on the low-power real-time cores. The predictive maintenance solution runs a continuous movement classification TinyML model on one of the Azure Sphere real-time cores. When the TinyML model detects movement, for example, a rattle, or a faulty motor bearing, an event is sent to the predictive maintenance app running on the high-level core. The predictive maintenance app then powers up the network connection and sends the event to Azure IoT Central. Azure IoT Central exports the predictive maintenance event to a Logic App, which generates a message destined for Microsoft Teams.


The beauty of this solution is that you are combining building blocks. You don’t need to be a security expert, Azure Sphere has got you covered, Edge Impulse simplifies model development, and IoT Central, Logic Apps, Microsoft Teams are low code offerings making it easier to pull everything together.


The source code and documentation are available on the Azure Sphere Predictive Maintenance Wiki.




Building the TinyML model


The TinyML (TensorFlow Lite) model was built with Edge Impulse. Edge Impulse simplifies building machine learning models for embedded hardware such as Azure Sphere. The cloud service is designed for developers, so you don’t need to be a data science guru. There are tools for ML training data acquisition, and wizards lead you through the process of training, testing, and exporting models. Learn more about Edge Impulse on their getting started page.


Predictive maintenance in the cloud


Of course, not all embedded hardware can run ML models, or the cost to redeploy updated firmware may outweigh the benefits. If this is your scenario, running cloud-based ML models may be an option. The Azure Anomaly Detector API enables you to monitor and detect abnormalities in time series data. Learn how to Identify abnormal time-series data with Anomaly Detector.

ML Predictive maintenance introduction video


Be sure to watch the 10-minute end-to-end demonstration.




Any questions?


Please feel free to post any questions you may have.


Cheers Dave

1 Comment
Version history
Last update:
‎Mar 28 2022 08:50 AM
Updated by: