Factory Ghost:用於工業馬達監測的本機 AI 助手
Factory Ghost: A Local AI Assistant for Industrial Motor Monitoring
Factory Ghost 是一個工業馬達監測示範專案,結合模擬感測數據、規則警示、互動儀錶板及本機 AI 解説。專案透過 Ollama 本機執行 Gemma 2 2B,根據温度、震動及電流的模擬讀數解釋狀況;讀數及示例閾值僅供學習,不用於診斷實際故障或預測實際失效。
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:
- Install Python and Ollama.
- Download the model:
ollama run gemma2:2b
- In the project folder, install dependencies:
py -m pip install -r requirements.txt
- Generate simulated motor readings:
py motor_simulator.py
- Start the dashboard:
py -m streamlit run dashboard.py
- Open
http://localhost:8501in 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:
- Rule-based monitoring: Example thresholds classify simulated readings as normal or warning.
- 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
來源:DEV Community · dev.to
