- Use cases: IoT, Analytics
- Industries: Manufacturing and Mobility
- Products and tools: Atlas, Time Series, Atlas App Services, Atlas Device Sync, Atlas Triggers, Atlas Charts, Connector for Business Intelligence
- Partners: Microsoft Azure
The modern factory floor is full of unique machines and widgets, each producing its own sets of data, and interconnecting with each other to make a complex system that supports complex manufacturing processes and produces countless goods.
Being able to understand how the system is operating, and how to troubleshoot errors and bottlenecks, is critical to driving operational efficiency and building smarter manufacturing applications.
This solution shows how MongoDB Atlas can be used to radically simplify an IoT landscape, taking data from disparate edge devices and using that data to power smart applications for a variety of data consumers.
Automotive: Automotive is a subset of manufacturing. Car makers need to develop efficient production factories and manage a complex inventory of parts and services in order to maximize throughput of finished cars.
Healthcare: The healthcare industry is proving to be one of the largest industries affected by IoT. Wearable and connected devices are critical for providing care both within medical institutions and increasingly in other areas, such as within a patient’s own home and on their personal devices.
Telecommunications: Telecommunications is at the heart of edge and IoT as more people around the world conduct their lives and businesses through mobile and connected devices.
It’s common in many manufacturing environments to have unique systems running their own proprietary software, often with a relational database in the background, or a niche database covering time-series and graph use cases.
The challenge with this approach is that as the number and type of databases becomes unmanageable, architectural complexity increases, and it becomes more difficult to move data between disparate systems and connect them to newer, smarter applications.
With MongoDB Atlas, architectural complexity is reduced, as the versatility of the document model allows teams to structure data in any way their application needs. The expressive API and indexing also allow teams to query data any way they want.
Sensors in a factory may be streaming time-series data for multiple machines, capturing the following data points:
In a relational database, you would likely have to create multiple tables to effectively store this varied data. But with MongoDB and the flexible document data model, you can use a single collection to store all sensor data coming in using time-series collections. For example:
We can then use the MongoDB aggregation framework to easily query time-series data. For example, we can group documents by the date of the sensor measurement and return functions like average.
This solution showcases how you can build a smart manufacturing hub using MongoDB Atlas and Azure IoT Edge. The example use case is sending sensor data from CNC machines to Azure IoT Hub, with selected data streamed to MongoDB Atlas for use in a variety of data consumers, such as factory workers with mobile devices, and analysts using MongoDB Charts.
To illustrate this solution in practice, we will create a machine learning model that will predict the root cause of machine failure based on sensor data. The detailed guide and associated sample data, functions, and code can be found in this solution repository.
You can use MongoDB as a feature store to train ML models, and once models are trained, those binaries can be converted and stored in another MongoDB collection for analysis. Refer to this notebook to train your ML model, and once your models are trained, use this model to make predictions using Azure functions.
We use Azure IoT Hub to connect, monitor, provision, and configure IoT devices. Use this link to set up IoT Hub in your Azure account, and when you’re ready, register a new device.
To generate data for our sample solution, we built this web app to simulate data flow to Azure IoT.
Once data is in Azure IoT Hub, it can then be served to Stream Analytics for filtering, then pushed into MongoDB. Follow these instructions to set up a Stream Analytics job, then add IoT Hub as an input for that job.
Now that data is in Stream Analytics, you can push it to a time-series collection in MongoDB Atlas using this function to serve a variety of use cases and data consumers. You can also run your machine learning model to get failure inferences using this function.
Once your machine failure data is in MongoDB Atlas, you can easily put it in the hands of users through MongoDB’s platform services. You can build a mobile app using Atlas Device Sync to send notifications and alerts to floor supervisors, or you can use Mongo Charts to create visualizations for BI teams.
Create this solution yourself with the associated sample data, functions, and code.
Learn how MongoDB’s developer data platform supports the entire IoT data life cycle.
See how MongoDB Atlas addresses common IoT challenges across a variety of industries.
See how MongoDB’s next-generation developer tools are being used to build smarter factories and warehouses.