What if DSP education could be hands-on?
Many courses on digital signal processing (DSP) focus on the theory: formulas and algorithms are written out by hand, and solutions are verified through plotting or charting results. In reality, DSP is only useful in the real world – from audio processors applying sound effects, to modems encoding data into radio waves.
A hands-on approach to learning DSP would allow students to see the effects of their algorithms in real time, greatly enhancing their learning. Some courses use microcontroller development boards to achieve this, but that often creates tangents into programming peripherals and configuring pins and clocks that detracts from the primary topic. This also creates dependency on expensive lab equipment to generate input signals and capture the resulting outputs.
What DSP PAW provides
DSP PAW builds on top of a common development board to give students an affordable and versatile DSP platform. This platform connects over USB to any Windows or Linux-based computer running the project’s IDE, creating a portable and feature-filled algorithm design environment.
Algorithms are written in plain C++, with a `process_data` function that takes in the input sample buffer and returns an output sample buffer. This allows even novice programmers to enter the world of DSP: see how the below example uses just a few lines of code to create a 2X amplification algorithm:
Sample* process_data(Samples samples)
{
for (int i = 0; i < SIZE; i++) {
samples[i] = samples[i] * 2 - 2048;
}
return samples;
}
The firmware
The DSP PAW firmware provides the USB and DSP functionality required for algorithm design through the IDE. Firmware programming is only done once; DSP algorithms are received later over USB and managed by the firmware, abstracting microcontroller details away and allowing users to focus primarily on algorithm design.
The firmware is built on top of the ChibiOS real-time operating system. This allows for real-time processing of input signals by the uploaded algorithm for immediate results. Algorithm execution is also “sandboxed”, so the platform can recover from common errors or faults induced by the algorithm.
The hardware
The project’s hardware functionalities are achieved through a custom “add-on” board that is built to be compatible with STMicroelectronics’ NUCLEO line of development boards. DSP PAW currently only supports the NUCLEO-L476RG variant of this product line, but other variants can be added with some effort. In the past the NUCLEO-H743ZI variant was supported, which allowed for high-performance algorithms given its 480MHz processing speed, math co-processor, and 5x available RAM.
The add-on board packs in many features:
- 0.1” headers and 3.5mm jacks for interfacing with input and output signals
- Circuitry to protect analog pins and support a +/- 3.3V signal range
- Two potentiometers that can be used to adjust algorithm parameters during execution
- A status LED
The software
The IDE provides an interface for writing, executing, and analyzing DSP algorithms. It is written in C++ using the cross-platform wxWidgets graphics library (tested on Windows and Linux systems).
The following features are made available through the IDE:
- Write, compile, upload, and execute DSP algorithms
- Configure sampling rate (8-96 kS/s) and buffer size (up to 4,096)
- Measure algorithm execution time
- View algorithm disassembly
- Signal capture: watch input and output signals in real time, or record output signal to a .csv file
- Signal generator: can source from a sample list, y=x formula, or WAV audio file
- Included examples for topics including convolution and filters (FIR averaging, IIR echo)
Entirely open-source
All components of DSP PAW are currently released under the GNU GPL version 3 license. Source code and schematics are available from the GitHub project links.
DSP PAW...
Read more »
This looks really great and i'd be up for buying one if you make them available for purchase.