Challenge
On a production line, modules are filled with a mixture and weighed on electronic scale indicators — but the readings lived only on the local displays. There was no central record to monitor throughput, trace batches, or compare each weighing against its configured mass limits (empty-module tare, upper and lower bounds for a correctly filled module). The goal was to capture every weighing automatically and land it in a database, without altering the scales themselves.
Solution
My responsibility was the hardware and the backend — getting a raw weight off each indicator and reliably into the database.
- Reading the scale (hardware): a WiFi microcontroller (Arduino + WiFiNINA) taps each weighing indicator over a dedicated serial link and parses the live weight value off the data stream. A per-controller ID maps each device to its specific production line in the database.
- Operator feedback: a piezo buzzer fires a short two-tone confirmation the moment a reading is captured, so the operator gets immediate, eyes-free assurance the weighing was recorded.
- Connectivity: controllers join the local WiFi with a fixed DNS resolver; each captured reading is assembled into a compact JSON payload (line id + weight).
- Backend ingestion: an HTTP endpoint receives the JSON over the network and writes every measurement into a MySQL database, where readings accumulate per line for monitoring and charting against the configured thresholds.
- Engineering iteration: the first prototype opened a MySQL connection directly from the microcontroller; I moved to an HTTP/JSON ingestion endpoint to decouple the field devices from the database — more reliable on flaky WiFi, far easier to evolve, and safer than embedding database credentials in every controller on the floor.
Result
A working end-to-end prototype: weight readings that were previously trapped on local indicators are now captured automatically, confirmed to the operator by buzzer, and stored centrally in MySQL — ready for threshold-based monitoring and charting per line. Built and demonstrated on training controllers as an applied embedded-systems project, it covers the full path from a sensor on the shop floor to a queryable record in the database.