For any of your larger sized files, you can be certain that most providers will keep files in the cloud to save storage space. That way, you’ll have access to everything no matter where you’re trying to get to it from.
The “Internet of Things” (IoT) is a new trend where a large number of embedded devices are connected to the Internet via the cloud. These devices communicate sometimes with people and sometimes with other devices, often to provide sensor data and other measurement information to cloud storage and cloud computing resources. On the cloud, the data is processed and analyzed to gain important insights.
Using the cloud and cloud-based computer is relatively cheap, so it’s no wonder that it is becoming a popular resource in embedded design. As IoT evolves, embedded systems are staking their own claim on the cloud. Whether it be home-brewed projects to or more intricate designs or measurements, cloud computing is becoming more prevalent. Have you ever wanted to get in on the action? With the Digilent Analog Discovery 2, WaveForms software, and Raspberry Pi 4, you can send measured data and signals directly to the ThingSpeak.com cloud and eventually analyze them.
Analog Discovery 2 is portable analog measurement tool, small enough to fit in your pocket but powerful enough to replace a stack of lab equipment. Driven by the free WaveForms software, Analog Discovery 2 can be configured to work as any one of several traditional instruments including an Oscilloscope, Waveform Generator, Power Supply, Voltmeter, Data Logger, Logic Analyzer, Pattern Generator, Static I/O, Spectrum Analyzer, Network Analyzer, Impedance Analyzer, and Protocol Analyzer
WaveForms is a software developed by Digilent and intended for use with the Analog Discovery 2 and the Analog Discovery Studio. WaveForms provides a user interface for a 2-channel oscilloscope, logic analyzer, arbitrary waveform generator, digital I/O, and more. It’s free to download and compatible with Mac (Apple), Windows, and Linux (32-bit, 64-bit, and ARM).
How to Install WaveForms
Step 1: Download WaveForms
This tutorial will guide you through the steps involved in the installation process on a Raspberry Pi 4 Model B after downloading it from the website. We will be using the Raspberry Pi 4 Model B 1GB version within this tutorial. The 2GB and the 4GB versions of the Raspberry Pi 4 Model B also work with this tutorial.
Download the correct installation file for WaveForms for your distribution of Linux. Since we are using a Raspberry Pi 4 Model B with the Raspbian OS, we will choose the Debian flavor of the ARM build.
Step 2: Download Adept 2
Download the correct version of Adept 2. Make sure that the version of the Adept install file is the same as WaveForms. We chose the ARM version for WaveForms, so we will use the ARM version of both the Runtime and Utilities for Adept.
Step 3: Install both Adept 2 and Waveforms
NOTE: If you don’t have an Analog Discovery 2 plugged in, a window will pop up with a warning stating that no device was detected. You don’t need to have a device to run the software, so go ahead and click “OK” to proceed.
Step 9: Run Demo Mode in WaveForms
The device manager will now open. Click on “Demo Mode”, and then click “Select”.
Step 10: Demo Mode Oscilloscope
As mentioned previously, if you don’t have an Analog Discovery 2 yet, that’s okay. You can still run WaveForms in demo mode and get a feel for the interface and capabilities.
The below image is a demo of the oscilloscope displaying a sine and square wave.
Step 11: Plug in Analog Discovery 2
If you plug in the Analog Discovery 2, a window will pop up indicating that it was detected. Select “OK” to proceed.
Step 12: Device Manager
If you open the device manager, or you have the Analog Discovery 2 plugged in when WaveForms is open, the window displayed in the image below will appear. Select the Analog Discovery 2 just as you did for demo mode.
Now that you are connected and have WaveForms installed, you can view the tutorials for each Instrument on the WaveForms Resource Center.
Sending Data from WaveForms SDK to ThingSpeak.com
ThingSpeak, created by MathWorks, is an online platform for collecting, viewing, and analyzing data in the cloud. This guide runs through the steps required to send data captured by your WaveForms SDK compatible Digilent Test and Measurement Device up to ThingSpeak.
Go to thingspeak.com and sign in or sign up.
In the Channels menu select My Channels and create a New Channel.
Configure the channel settings, name, and fields:
Under API Keys, note the Write API Key that will be needed to push data to the server from the custom application or script:
Download the AnalogImpedance.py script, then edit it and replace the “8C####BU” with the Write API Key, as seen below:
url = "https://api.thingspeak.com/update?api_key=8C############BU"
Run the script on Windows, macOS, Linux desktop, or on an embedded device like Raspberry Pi:
Once the data has been sent to ThingSpeak, the default charts can be seen in the Private View and Public View tabs:
Now that data can be transferred between the test and measurement device and ThingSpeak, the script can be modified as needed for your project.
For more information on WaveForms SDK, see its Resource Center.
One Comment on “Analyze Measurement Data on Cloud Using Raspberry Pi 4 and Analog Discovery 2”
How are you !
I will try to test it in the next days for my students.
Yours DORU from Romania
Prof.dr. Doru Ursutiu
Associate Member AOSR
IGIP “NIKOLA TESLA” Golden Chain for
outstanding results for Engineering Education
IGIP Honoris Causa (ING.PAED.IGIP)
AE of IEEE Transactions in Education
“Transilvania” University of Brasov
Str. Oltenia nr.2A
RO-500209, Brasov, Romania