Mixed-signal oscilloscope Control via script: Operating the oscilloscope in Linux mode

A guest post by Richard Oed 6 min Reading Time

Related Vendors

Demanding measurements require measuring instruments with high configurability, flexibility, and connectivity. The Linux mode of the Analog Discovery Pro ADP3450 mixed-signal oscilloscope offers all these capabilities.

The Analog Discovery Pro ADP 3450 from Digilent offers enough flexibility for even the most demanding tasks.(Image: Digilent)
The Analog Discovery Pro ADP 3450 from Digilent offers enough flexibility for even the most demanding tasks.
(Image: Digilent)

In the following scenario: Just a few more measurements and you can hand over your current project to your sales team for presentation to potential customers. But the measurements are complicated to configure, and you have noticed some irregularities in the last few days. To get everything under control, you need a reliable measuring device that can be controlled via script to conduct complex and repetitive tests automatically. Perhaps you'd also like to integrate your device into a larger system to quickly respond to external events and save data live in the cloud or on a hard drive.

Image 2: Four high-speed USB 2.0 ports, a device-mode USB connection, and an Ethernet connection provide connectivity.
(Image:Digilent)

What might such an oscilloscope look like? And does something like this even exist? The answer to the last question is "Yes," and the device is the Analog Discovery Pro ADP3450 by Digilent. It is a true mixed-signal oscilloscope with a sampling rate of up to 0.5 GSamples/s and features four analog single-ended channels with a resolution of 14 bits each. Thus, the device offers the same performance as conventional laboratory testing equipment. In addition, the multifunctional device includes a two-channel arbitrary waveform generator, two external trigger inputs, and 16 digital inputs and outputs. Connection to a host computer is made via USB interface or RJ-45 Ethernet. A version with only two analog inputs, the ADP3250, is also available.

A software supports multiple instruments

The device can be controlled using Digilent's free WaveForms software. The application is compatible with Windows, macOS, and Linux operating systems and offers the look and feel of traditional laboratory equipment. WaveForms provides 13 software instruments:

  • an oscilloscope,

  • a signal and pattern generator,

  • a data logger,

  • static I/Os,

  • a voltmeter,

  • power supplies,

  • a curve tracer, and

  • various analyzers.

With the software instruments, a variety of signals, even from different fields, can be captured, recorded, analyzed, documented, and generated. To conduct even more demanding tests, the WaveForms application features a mathematical channel and a script editor, with which the instruments can be programmed in JavaScript.

More possibilities with a Software Development Kit

If the script editor does not offer enough customization options for the necessary context, or a higher level of automation is needed beyond the capabilities of the editor, a Software Development Kit (SDK) is also available. A dynamic library is provided for the programming interfaces (APIs) of this SDK, with which code can be written in Python, C/C++, C#, or Visual Basic. By writing one's own program, custom functions can be developed that are specifically tailored to the desired needs.

But what if further customizations or additional connectivity options are required? In this case, the Analog Discovery Pro ADP3450, with its Linux mode, offers additional flexibility and configuration options, as tests and measurements can be conducted directly on the device. Upon startup, the ADP3450 boots into a pre-installed terminal-based Debian Linux distribution and the entire setup behaves like an embedded system. In this mode, users benefit from enhanced network capability, either through Ethernet or, if necessary, by adding a suitable Wi-Fi dongle.

High connectivity for every need

Image 2: Cloud services such as ThingSpeak allow for the visualization of data streams.
(Image:Digilent)

In Linux mode, the four high-speed USB 2.0 ports are active. Peripheral devices such as FAT/FAT32-formatted flash drives can be connected to these ports, on which the captured data can be locally saved, for example, in CSV format. Alternatively, the measurements can be streamed to a cloud-based service like ThingSpeak from MathWorks for storage, display, and analysis. Or to any other third-party logging environment. All these features render an additional host device, such as a Raspberry Pi or a PC, unnecessary.

And if you need to communicate with the ADP3450, you can always connect via a serial terminal program such as PuTTY or Tera Term. Internet connectivity for remote access and the Internet of Things (IoT) is also available. Moreover, it is possible to update the Linux operating system installed on the device via the WaveForms software and a connected USB drive. New versions are provided by Digilent itself. For testing, the programming languages available are Python, C/C++, C#, or Visual Basic. With these routines, the full functionality of the WaveForms SDK is available, and they can also be part of a larger measurement environment. Since no host is involved, the test results are available very quickly. The complexity of automated scripts can far exceed the possibilities available in standard mode along with the WaveForms application. Additionally, it is possible to integrate the ADP3450 into other applications and easily access it from there.

Mobile power supply and measurements on the go

It is also possible to read parameters or measurements from another device via Ethernet, Wi-Fi, or cloud services. This way, a measurement can be initiated as soon as another testing device reports that a predefined threshold has been exceeded. Or tests can be scheduled to run only at a specific time of day. This is helpful for finding that one, truly annoying error that only occurs at the twelfth stroke after midnight.

Subscribe to the newsletter now

Don't Miss out on Our Best Content

By clicking on „Subscribe to Newsletter“ I agree to the processing and use of my data according to the consent form (please expand for details) and accept the Terms of Use. For more information, please see our Privacy Policy. The consent declaration relates, among other things, to the sending of editorial newsletters by email and to data matching for marketing purposes with selected advertising partners (e.g., LinkedIn, Google, Meta)

Unfold for details of your consent

With a Wi-Fi dongle and a mobile power supply (the ADP3450 requires 19 V), measurements can be taken on the go. Alternatively, the device can be accessed remotely. For this, the device needs to be within a company network. With the appropriate configuration, it can also be connected via a virtual private network (VPN). In short, the Linux mode of the ADP3450 simplifies the implementation of complex or repetitive testing and measuring tasks, regardless of the development phase of a project.

Starting in Linux mode is simple

Image 3: Switching to Linux mode is done through the WaveForms application.
(Image:Digilent)

You might wonder: And how do I start the ADP3450 in Linux mode? It's pretty straightforward. The first step is to connect to the device using a serial terminal program. It's recommended to do this before booting into Linux mode. This avoids missing important boot messages, such as the login prompt. To ensure the connection works as expected, set the virtual serial port in the program to 115200 baud, 8 bits, 1 stop bit, and no parity. The physical connection between the device and the host PC is made using a standard USB cable that connects to the USB Device Mode socket on the back of the ADP3450.

Once the connection is established, launch the WaveForms application, open the Device Manager, and select the "Linux" option. Then click on "Apply & Reboot." Next, monitor the boot messages on the serial terminal. After the boot process is complete, the login screen appears. Use the username and password specified in the ADP3450 reference manual. Since these are the same for all Analog Discovery Pro devices, it makes sense to replace them with your own. This is especially important if the device will be connected to the internet. This prevents others from being able to access the oscilloscope.

Once logged in, you can get started. The next step is to connect Analog Discovery Pro to the internet, either through the Ethernet port or a Wi-Fi dongle. Digilent lists compatible devices on its reference pages, where you can also find instructions on how to establish the connection. Perhaps you would like to install Python and start writing scripts, or log into a cloud logging environment to stream data. For these purposes too, the Digilent website provides explanations that help with specific testing and measuring tasks.