DEV Community

Vipparthi Sriram
Vipparthi Sriram

Posted on

Factory Ghost: A Local AI Assistant for Industrial Motor Monitoring

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

šŸ‘»

What I Built

What if a machine could report unusual operating
 conditions and an AI assistant could explain what the readings might mean?

I built Factory Ghost, an educational industrial motor monitoring demo combining simulated sensor readings, rule-based warnings, an interactive dashboard, and a locally running AI model.

The project simulates three motor parameters:

  • šŸŒ”ļø Temperature
  • šŸ“³ Vibration
  • ⚔ Electrical current

The dashboard displays the latest readings, warning status, and history charts. Users can click a button to ask a local AI model to explain the simulated readings in simple English.

I interpreted Ghost in the Machine as giving a machine a voice: the system produces data, and AI turns it into a human-readable explanation.

Note: The readings are simulated, and the example thresholds are for learning only. This project does not diagnose real motor faults or predict real-world failures.

Demo

Factory Ghost currently runs locally on my Windows laptop.

To run the demo:

  1. Install Python and Ollama.
  2. Download the model:
   ollama run gemma2:2b
Enter fullscreen mode Exit fullscreen mode
  1. In the project folder, install dependencies:
   py -m pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode
  1. Generate simulated motor readings:
   py motor_simulator.py
Enter fullscreen mode Exit fullscreen mode
  1. Start the dashboard:
   py -m streamlit run dashboard.py
Enter fullscreen mode Exit fullscreen mode
  1. Open http://localhost:8501 in your browser.

Demo video or screenshot: Add a screenshot of the working dashboard or a public video link here if available.

Code

šŸ”— GitHub repository: Factory Ghost

The repository includes the Python simulator, Streamlit dashboard, sample CSV data, dependency list, and README instructions.

How I Built It

I used these tools:

  • Python for the motor simulator.
  • Pandas for reading and handling the CSV data.
  • Streamlit for the interactive dashboard.
  • Ollama to run the model locally.
  • Gemma 2 2B to generate explanations.
  • Git and GitHub for version control and sharing the source code.

The application combines two approaches:

  1. Rule-based monitoring: Example thresholds classify simulated readings as normal or warning.
  2. Local AI explanation: When the user clicks the explanation button, Gemma receives the latest simulated readings and explains the condition, possible causes, and safe next steps.

The AI explains the readings; it does not independently validate a fault or predict a motor failure.

Why Does Open Innovation Matter?

Open innovation allowed me to experiment with tools I could inspect, run locally, and connect together.

Using Ollama with an open-weight Gemma model let me explore AI inference without relying on a hosted AI inference API. With local configuration, the readings sent to the model can remain on my computer.

Open-source tools also make it easier for students and developers to learn, modify the code, and extend the project with real sensors in the future.

As a Robotics and Automation student, I wanted to explore how local AI could complement traditional industrial monitoring. Factory Ghost is my first step toward that goal.

My Agent Session

This project currently uses a locally running Ollama model through a Python application. I have not included a DevRelay agent session.

The Spirit of It

The moment that made this project exciting was seeing unusual simulated motor readings on the dashboard and then asking the local AI assistant to explain them.

Instead of looking at numbers alone, I could ask the machine's digital assistant what the readings might mean.

It was a small experiment, but it made the idea of a machine communicating its condition feel more tangible—and motivated me to explore the intersection of AI, robotics, and industrial automation.

Prize Categories

Check the official challenge rules and list only the partner categories this project actually qualifies for. Remove this section if you are not entering any partner categories.


Thanks for checking out Factory Ghost! I'd love to hear suggestions for improving it.

AI #Python #Robotics #OpenSource #Hacktoberfest

Top comments (2)

Collapse
 
ch1310_ profile image
Charan Medipalli •

Insightful

Collapse
 
vipparthi_sriram_8a4748b8 profile image
Vipparthi Sriram •

thankyou