2025 ASEE Annual Conference & Exposition

Python GUI for Data Acquisition

Presented at Instrumentation Methods and Techniques

Data acquisition (DAQ) involves sampling signals utilizing sensors that measure various electrical parameters, processing these signals, and displaying real-world results. This system is often implemented with a USB DAQ device (e.g., myDAQ, etc.) connected to a PC, or a controller module (e.g., Raspberry Pi Pico, Arduino, etc.), and software employed with graphical or text-based programming (e.g., LabVIEW, Matlab, etc.). With the increasing availability of free and open-source software package availability in Python and the increasing demand for Python skills among graduates, some courses are now incorporating Python for software development in practical applications. Python comes with a module called tkinter (short for “Tk interface”) that allows users to create simple and quick GUI programs. The tkinter module provides various graphical widgets (e.g., Button, Entry, Label, Radiobutton, etc.) with which the user can interact or view. A more robust method for creating advanced Python GUI program uses PySide6 and Qt Designer.

The goal of this paper is to utilize Python with the myDAQ to develop GUI programs suitable for lab projects in electrical and computer engineering and engineering technology, software engineering, and computer science programs. First, a lab project is shown to introduce students to Python GUI development using the tkinter module for simulating various waveforms (sinusoidal, square, and triangular), determining the spectrum of these signals, and displaying both the time-domain and frequency-domain representation of these waveforms. The GUI allows the user to select the waveform type, amplitude characteristics (peak amplitude, DC offset), frequency, signal duration, and sample rate. The second lab project introduces students to Python GUI development, using tkinter, for data collection with the myDAQ and plotting the time-domain and frequency-domain representation of the data collected. Then, these programs are developed using PySide6 and Qt Designer. Each project includes detailed engineering requirements, software code, and outcomes.

Authors
  1. Prof. David R. Loker Pennsylvania State University, Behrend College [biography]
  2. Prof. Teck Meng (Jonathan) Liaw Pennsylvania State University, Behrend College [biography]
  3. Dr. Steven Nozaki Orcid 16x16http://orcid.org/0000-0003-4733-246X Pennsylvania State University, Behrend College [biography]
Note

The full paper will be available to logged in and registered conference attendees once the conference starts on June 22, 2025, and to all visitors after the conference ends on June 25, 2025