Thursday, December 4, 2025

AI Vehicle Predictive Maintenance

Modern vehicle engines emit distinct sounds when operating normally or malfunctioning. AI-driven continuous monitoring detects abnormalities early, preventing costly breakdowns.

This system leverages Google Teachable Machine to train an AI model to differentiate between normal and faulty engine sounds. Designed for predictive maintenance, the system offers a low-cost, efficient solution.

POC Video Tutorial

Teachable Machine Model

A machine learning model is trained to recognise normal and abnormal engine sounds. It runs in a browser, continuously monitoring the engine’s sound. If an anomaly is detected, it immediately triggers an alert.

- Advertisement -

When the AI model detects an abnormal condition, it sends an HTTP request to the IndusBoard Coin. The IndusBoard Coin, acting as a web server, receives and processes the alert.

The IndusBoard Coin hosts a webpage that visually displays the system status. If a fault is detected, the page turns red and shows an alert message. Simultaneously, the IndusBoard Coin activates a blinking LED as a warning indicator.

- Advertisement -

Fig. 1 shows the webpage UI running the trained ML model. Fig. 2 shows the prototype with an IndusBoard Coin. The components required to build this system are listed in the Bill of Materials table. Fig. 3 shows the ML model being trained in Teachable Machine.

Teachable Machine Model Webpage UI running the trained ML
Fig. 1: Webpage UI running the trained ML model
Prototype of Engine Fault Detection by Sound
Fig. 2: Author’s prototype of Engine Fault Detection by Sound
Bill of Materials
ComponentSpecificationQuantity
IndusBoard CoinCoin V2 development board1
LaptopFor simulation1
Car engineAny working vehicle engine or motor for testing1
AI based Predictive Maintenance for Vehicles
Fig. 3: Training the ML model in the Teachable Machine

Creating the AI model using Teachable Machine

1. Go to Teachable Machine

2. Click on ‘Audio Project’

3. Record and label two categories:

• ‘Normal Engine’ (record sounds of a healthy engine).

• ‘Defective Engine’ (record sounds when faults occur like knocking and misfires.).

4. Train the model and export it as a TensorFlow.js model

5. Upload the ML model

6. Copy the model.json URL for use in our HTML file

HTML code for Vehicle Predictive Maintenance
Fig. 4: Snippet of the HTML code running the ML model and connection setup
Code for Vehicle Predictive Maintenance System
Fig. 5: Snippet of the source code

Modifying the Teachable Machine Code

The HTML file integrates the trained model and continuously monitors audio input. When an anomaly is detected, it sends an HTTP request to the IndusBoard Coin. The URL it calls should be the IndusBoard’s IP address plus the hosted page.

For example:

http://192.168.230.48/alerton

IndusBoard Coin code implementation

The IndusBoard Coin acts as a web server that:

  • Receives alerts from the Teachable Machine model.
  • Controls an LED to indicate an engine fault.
  • Hosts a simple HTML page for visual monitoring.
ML asking mic permission and model predicting engine fault using sound
Fig. 6: ML asking mic permission and model predicting engine fault using sound
engine fault detection
Fig. 7: Webpage output on engine fault and reset button

The code is created in Arduino IDE. First, configure the Wi-Fi SSID in the provided code by setting it with the network’s Wi-Fi SSID and password. Then, upload the code to the board, obtain the IP address, and copy it. Replace the IP address in the HTML code for Teachable Machine, as shown earlier:

fetch(‘http://192.168.230.48/alerton’); // Sends alert to IndusBoard Coin.

Testing and Running the System

Power the IndusBoard Coin using a 5V VIN pin or a USB port. Alternatively, connect it to a 3.3V pin. Wait for the coin to connect to the Wi-Fi network.

Run the Teachable Machine code on a laptop in a web browser.

Click the ‘Start’ button and grant microphone permission.

Once the microphone is granted access, the engine sound will be monitored.

If an abnormal sound is detected:

  • The IndusBoard Coin will send data to the laptop and display an alert.
  • The onboard alert LED on pin 33 will blink.
  • A buzzer can be added for additional alerts.
  • The webpage will indicate that the engine is faulty.

A new webpage with a ‘Reset’ button will appear on the laptop. Clicking the ‘Reset’ button will stop the alert.


Ashwini Kumar Sinha, an IoT and AI enthusiast, is Tech Journalist at EFY.

Ashwini Sinha
Ashwini Sinha
A tech journalist at EFY, with hands-on expertise in electronics DIY. He has an extraordinary passion for AI, IoT, and electronics. Holder of two design records and two times winner of US-China Makers Award.

SHARE YOUR THOUGHTS & COMMENTS

Most Popular DIY Projects

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics

×