prototype
factory-monitor
- Python
- SQLite
- GPIO
The problem
On a manufacturing line, the OK/NG judgement a person makes at the end of a process, and the machine’s real run history, usually aren’t recorded anywhere.
What I built
factory-monitor reads a signal per shot — either simulated, or from GPIO in a test setup I built myself — and records it to SQLite: per-shot OK/NG, cycle time, a defect breakdown, and temperature/humidity, all shown on a browser dashboard on the local network. It’s Python standard library only: no install, no internet connection, and it runs from a laptop or a Raspberry Pi. The dashboard is in Japanese, Portuguese and English. There’s also an early visual-inspection experiment — spotting burrs and missing parts — that I built with AI help while I’m still learning image processing myself.
I’ve been building this on my own time since 2024. It is a prototype: the signals it reads are simulated, or come from GPIO in a test setup — it is not deployed at any workplace.
The hard decision
Only one part of the code — the Sensor class — is allowed to know anything about the
hardware. The recording layer and the dashboard only ever talk to that interface; they don’t
know or care whether the signal behind it is a real sensor or a simulation. That’s what let me
build and test the whole system without a real production line: develop against the simulator
today, and swap in the real GPIO reader later by changing one class.
日本語の要約
成形ラインの稼働状況を記録するダッシュボードです。センサーからの信号(疑似、またはテスト環境のGPIO)をPythonで受け取り、SQLiteに記録し、ブラウザで確認できます。標準ライブラリのみで、インストールもインターネット接続も不要です。2024年から個人の時間で開発しているプロトタイプで、どの職場にも導入されていません。