AnnouncementIntroducing MongoDB 8.0, the fastest MongoDB ever! Read more >
NEWSLearn why MongoDB was named a leader in the 2024 Gartner® Magic Quadrant™ Read the blog >
AnnouncementIntroducing Search Demo Builder, the newest addition to the Atlas Search Playground Learn more >

Solutions

Automotive diagnostics using Atlas Vector Search

Leverage MongoDB Atlas Vector Search and AWS Bedrock for advanced root cause diagnostics, integrating diverse data types for real-time analysis and proactive maintenance.
Start Free
Illustration of the vector search function
Solutions Overview

The manufacturing industry is supported by a complex value chain that spans from inventory management to connected equipment and products. The key to solving problems, improving processes, and boosting the overall efficiency and quality of this value chain is root-cause diagnostics. Unlike predictive maintenance, which focuses on symptom management, root-cause diagnostics digs deeper to identify the underlying sources of issues, ensuring they are fixed permanently and do not recur.

Root-cause diagnostics offers several benefits:

  • Eliminates recurring problems: By addressing the true root cause, we avoid temporary fixes and prevent the same issue from recurring, saving time, money, and resources.

  • Enhances process efficiency: Identifying bottlenecks and inefficiencies at their source leads to increased output and lower production costs.

  • Promotes safety and environmental practices: Proactive interventions and risk mitigation foster safer and more environmentally friendly operations.

  • Drives continuous improvement: The systematic approach of root-cause diagnostics encourages ongoing process improvement and innovation.

However, implementing root-cause diagnostics in manufacturing can be challenging. The vast amounts of complex and noisy data from sensors and machines, along with the need to integrate diverse data types, make it a formidable task. Traditional methods rely heavily on human expertise, knowledge, and experience. Our solution explores the application of AI and MongoDB Atlas Vector Search for advanced root-cause diagnostics using sound input and the integration of AWS Bedrock for real-time report generation on detected anomalies, enhancing real-time monitoring and maintenance.

Reference Architecture

The demo architecture comprises several key components working together to capture, store, analyze, and report data.

  1. Engine and Raspberry Pi
    • Engine control: A Raspberry Pi is connected to the engine, controlling it via a relay.
    • Telemetry sensors: The Raspberry Pi is equipped with sensors to measure telemetry data such as temperature and humidity.
  2. Car digital twin and mobile app
    • Virtual and physical integration: A car digital twin in JavaScript and an iPhone app are connected to the setup. Commands from the apps are sent to MongoDB, which streams them to the Raspberry Pi, triggering the relay to start both the physical engine and the digital twin.
  3. Audio diagnostics
    • Audio recording: Every second, the engine’s audio is recorded.
    • Vector conversion: The audio clips are converted into vectors through an embedder and stored in MongoDB.
    • Vector search: Using Atlas Vector Search, the system predicts the engine's status (off, running normally, detecting a metallic or soft hit). This information is displayed on the apps, providing real-time diagnostics.
  4. AWS Bedrock integration
    • Automated reporting: When an anomaly is detected (e.g., abnormal audio), Atlas triggers a function to send telemetry data and sound analysis results to AWS Bedrock.
    • Report generation: AWS Bedrock generates a detailed report based on the findings, which is then sent back to the dashboard for review.

This architecture creates a feedback loop where edge devices generate data for real-time control and monitoring, now enhanced with audio diagnostics through vectors. The integration showcases the power of utilizing Atlas Vector Search for root-cause diagnostics, significantly improving efficiency, reliability, and innovation in manufacturing operations.

Demo Architecture
Building the Solution
Step 1: Get your hardware ready

To replicate this demo, you will need:

  • An engine to simulate the real use case of a machine—we are using the four-cylinder Teching DM13 engine replica, but you can run this demo with any piece of hardware (even a real machine) that can run and make noise.
  • A Raspberry Pi 5, which will be the bridge to host the software that communicates with the cloud.

To find the detailed information about our hardware and how to set it up, visit this GitHub page.

Simulate this solution without the physical engine here.

Step 2: Set up MongoDB Atlas

In order to make the demo work from end to end, you will need to set up the backend.

The first step is to create a MongoDB cluster. If you don't have an Atlas account, create an account following these steps. Once that’s complete, under the Data Services tab, click "Database" in the sidebar, then "+ Create" to create a new MongoDB cluster in your preferred region.

After your cluster is ready, you’ll need to replicate the application database. This database includes sample vehicle and sensor data, which are necessary to start using the app. To load this data, a dump file is available in the GitHub repository, which you can use with the mongorestore command to import the data into your cluster.

Step 3: Anomaly detection through sound input

Complete instructions can be found on this GitHub page, including how to set up the analytics dashboard, link it to the correct data source, and create a vector search index.

Step 4: Integrate AWS Bedrock for AI-enhanced analytics

We have followed a simple approach to integrate with AWS Bedrock, which can serve as a baseline for more complex approaches implementing more real-time data from sensors and implementing a retrieval-augmented generation (RAG) architecture.

To learn how to integrate AWS Bedrock with Atlas Triggers, see our GitHub page.

Step 5: Run the web portal UI

The web portal, built with Next.js, includes the vehicle's digital twin, an acoustic diagnostics interface for audio streaming and training, and the analytics dashboard. To set it up, update the environment variables with your MongoDB cluster connection string and the URL of your Atlas Charts dashboard. Once updated, simply run the Next.js application. Refer to the GitHub repository for specific commands and additional setup details.

Step 6: Bonus! Control your vehicle from a mobile device

For a more realistic connected vehicle experience, you can control the engine replica and digital twin from a mobile app. Open the Swift project in Xcode, update the environment variables, and run the app on an emulator or your own iOS phone or tablet.

Key Learnings
  • Enhanced diagnostics: Integrating Atlas Vector Search with audio diagnostics enables precise identification of engine statuses and anomalies, providing deeper insights into root causes.
  • Real-time monitoring: Using MongoDB and Atlas Vector Search allows for real-time data processing and immediate response to anomalies, crucial for proactive maintenance.
  • Data integration: MongoDB’s document model efficiently handles diverse data types, simplifying the integration of structured telemetry data and unstructured audio data.
  • Scalability: The architecture supports scalable data management, accommodating the vast volume of IoT signals generated in a manufacturing environment.
  • Automation: AWS Bedrock automates the generation of detailed reports based on detected anomalies, streamlining the reporting process.
Technologies and Products Used
MongoDB developer data platform:
Partner technologies:
  • Amazon Bedrock
  • NextJS
  • Audio embedding generation with panns-inference
Authors
  • Humza Akhtar, MongoDB
  • Rami Pinto, MongoDB
  • Ainhoa Mugica, MongoDB
Related resources
general_features_tools

Acoustic Based Real-Time Diagnosis for Machines Using Atlas Vector Search

Recreate this demo yourself by following the examples in this solution’s repository.

general_content_white_paper

Generative AI in Predictive Maintenance Applications

Explore how gen AI enhances predictive maintenance in manufacturing, reducing downtime and boosting productivity.

Explore the capabilities of Atlas Vector Search

Build intelligent applications powered by semantic search and generative AI over any type of data using a full-featured vector database.
Learn more
Illustration of hands typing on a laptop in the foreground and a superimposed desktop window and coffee cup in the background.