This week I focused on constructing the hardware/software bridge that transmits the real-time quantities of the experiments (e.g. induced voltage of the Faraday’s law experiment) to the web application. Since Arduinos have much worse oscilloscope performance than the portable ADALMs in terms of sampling speed, accuracy, and reliability, and we already have some experience working with them, I decided to look into ways to directly collect readings from an ADALM’s oscilloscope to a csv file so that Aaron can let the web application read the data in the csv file and display it on the web app.
I discovered three main methods to output data collected with an ADALM:
-
Use the scripting ability of Scopy (software for ADALM): We can write scripts in javascript and then use the Debugger Instrument in Scopy to run these scripts.
-
Use libm2k, a C++ library, to write C++ applications that capture and generate data from the host computer.
- Install Python bindings for libm2k and write Python programs to capture data.
I attempted the first method initially, and was able to have Scopy run automatically and write data to a csv file. However, although Scopy displays the correct oscilloscope plot, the data written to the csv file is always 0. I suspect the issue may have to do with the USB connection via a dongle.
I then tried the third method, but there were not Python bindings for MacOS 13 currently, so I will re-attempt this method with another machine.
The second method posed the most significant learning curve, as I have no experience with C++. After failing to compile an example cpp file, I decided to not spend too much time learning C++ and instead focus on the other two methods first.
I am behind the schedule by a few days as constructing the hardware/software bridge took much longer than expected. To catch up, I plan to spend more time working on it in the next few days before the interim demo. If a connection using ADALM cannot be set up properly, I will pivot towards using Arduinos, though this option comes with its own shortcomings.