Article Preview
Top1. Introduction
Researchers from different fields frequently require data acquisition devices to record various signals relevant to their field of interest. In some cases, scientific research requires the development of experimental setups and novel methods to capture unknown phenomenon and signals of interest while others rely on expensive proprietary data acquisition devices. However, there is a significant proportion of researchers including students of universities, school-going students, and hobbyists, for their preliminary data acquisition needs, requires an inexpensive and quick to deploy which can be realized with limited engineering capabilities, falls under their resource constraints, and easy to use. Particularly in the biofeedback domain, there is a need for affordable and quick to deploy data acquisition tool for quick prototyping and out-of-lab experiments (Fortin-Côté et al., 2019).
In recent years, in pursuit of affordable and flexible data acquisition systems, researchers have shifted their focus to using open-source electronics platforms like Arduino (D’Ausilio, 2012; Pearce, 2012; Polo et al., 2018). An Arduino is a low-cost open-source microcontroller board used for quick prototyping for electronics projects. The dedicated integrated development environment of Arduino is available for different operating systems like Windows, Mac OS, and Linux, and simplifies the process of editing, compiling, and uploading of software code into the microcontroller. The huge online community and support forums are an additional advantage of the Arduino ecosystem. The low cost associated with the Arduino ecosystem makes it stand apart from other hardware alternatives for data acquisition like myRIO (National Instruments, Austin TX, USA), LabJack (LabJack Corporation, Colorado, USA), and others. The cost of the cheapest alternatives is $130 for the Labjack device whereas Arduino comes for $10.
For the software part of data acquisition, software like MATLAB (Mathworks, Natick MA, USA) have been extensively used for its quick prototyping abilities and ease of use (Toulson, 2008). MATLAB is a widely used software in universities around the world. It offers very powerful data processing capabilities with an exhaustive library of functions spanning various fields. It also offers powerful and customized GUI tools for experiment building. Most of the researchers are already familiar with or have access to MATLAB in their university. A tool built in this environment will have data acquisition, visualization, and processing capabilities all in one place which significantly reduces the prototype building time. However, for an individual with no access to MATLAB, the high cost of MATLAB can be the biggest setback in using this tool.
Arduino family of boards can be easily integrated with MATLAB using official support packages to create a plug and play system (MATLAB Support Package for Arduino Hardware Documentation - MathWorks India, n.d.). However, this flexibility of prototyping comes at a cost of random timing jitters in communication between Arduino and MATLAB which causes latency issues in real-time data acquisition. In this paper, the authors present AfDaq1, a MATLAB based GUI tool for real-time data acquisition from Arduino. The GUI is developed using the GUIDE tool available in MATLAB. For interacting with the Arduino, a set of commands is used which are provided by “MATLAB Support Package for Arduino Hardware”2 (Arduino Support from MATLAB - Hardware Support - MATLAB & Simulink, n.d.). The timing jitter associated with various commands and sub-processes in the system was measured and descriptive statistics were computed. MAE (Mean Absolute Error) and the recorded sampling rate are used in the benchmark to define the selection criteria for system performance. A maximum of 5 channels (Analog or Digital) can be recorded simultaneously. The acquired data is displayed in real-time over a customizable scrolling plot at a maximum sampling rate of 10 Hz when acquiring from all 5 channels simultaneously. The tool also offers real-time data manipulation. The acquired data can be locally saved for offline processing. This is a plug and play system and the experimenter can be quickly up and running with the data acquisition process. The developed tool acquired data and analysis scripts used to compute results are released in the open-source domain for the researchers and to strengthen the replicability of the project.