— 2025—2026 · Research assistant — TÜBİTAK STAR
Lab Instruments GUI
A Python control interface over SCPI + MQTT for high-precision measurement equipment.
Problem
The ITU Power Electronics Lab runs an Electric Vehicle Battery Systems R&D project with over $15K of Prodigit and Keithley measurement equipment — but each device ships with its own vendor software (totaling ~$1,000), its own USB/GPIB protocol, and its own command set.
Goal: drive every device from the same interface, log battery performance metrics (voltage, current, temperature) into a single data stream, and make measurements visible remotely — including OBD-II and GPS data captured during EV field tests.
Approach
SCPI unification. For each device type I wrote a Python driver extending a common base class. Above the base class, the GUI and logger get a single high-level API like device.measure().
Tkinter desktop UI. Tkinter because Python is already installed on lab machines, with no extra dependencies needed.
Raspberry Pi + MQTT telemetry. During EV field tests, the Pi publishes OBD-II diagnostics and GPS data (speed, coordinates, altitude, RPM, engine load) to an MQTT broker. A Grafana + InfluxDB stack captures the full time series for analysis.
Lessons
- A properly shaped abstraction layer pays for itself immediately — adding a new instrument reduced to a couple hundred lines.
- SCPI documentation is messy: vendors’ 400-page PDFs are rarely clear, and you often work from hex packets and hand-written notes.
- MQTT is lightweight in theory: QoS levels, retained messages, and duplicate client IDs still ate a lot of my time.