We’ve done quite a bit with Google Sheets and signal processing: we’ve generated signals, created filters, and computed quadrature signals. We can pull all that together into an educational model for two SDRs talking to each other, but it’s going to require two parts: modulation and demodulation. Guess what? We can do that with a spreadsheet.
The first step is to generate a reference clock for the carrier. You’ll need a cosine wave (I) and sine wave (Q). Of course, you also need the time base. That’s columns A-C in the spreadsheet and works like other signal generation we’ve seen.
Continue reading “DSP Spreadsheet: Talking To Yourself Using IQ”
In previous installments of DSP Spreadsheet, we’ve looked at generating signals, mixing them, and filtering them. If you start trying to work with DSP, though, you’ll find a topic that always rears its head: IQ signals. It turns out, these aren’t as hard as they appear at first and, as usual, we’ll tackle them in a spreadsheet.
What does IQ stand for? The I stands for “in phase” and the Q stands for quadrature. By convention, the I signal is a cosine wave and the Q signal is a sine wave. Another way to say that is that the I and Q signals are 90 degrees out of phase. By manipulating the amplitude of I and Q, you can create complex modulation or, conversely, demodulate signals. We’ll see a spreadsheet that shows that completely next time.
Continue reading “DSP Spreadsheet: IQ Diagrams”
Circuit simulation and software workbooks like Matlab and Jupyter are great for being able to build things without a lot of overhead. But these all have some learning curve and often use clever tricks, abstractions, or library calls to obscure what’s really happening. Sometimes it is clearer to build math models in a spreadsheet.
You might think that spreadsheets aren’t built for doing frequency calculation and visualization but you’re wrong. That’s exactly what they’re made for — performing simple but repetative math and helping make sense of the results.
In this installment of the DSP Spreadsheet series, I’m going to talk about two simple yet fundamental things you’ll need to create mathematical models of signals: generating signals and mixing them. Since it is ubiquitous, I’ll use Google Sheets. Most of these examples will work on any spreadsheet, but at least everyone can share a Google Sheets document. Along the way, we’ll see a neat spreadsheet trick I should probably use more often.
Continue reading “DSP Spreadsheet: Frequency Mixing”
There’s an old saying: Tell me and I forget, teach me and I may remember, involve me and I learn. I’m guilty of this in a big way — I was never much on classroom learning. But if I build something or write some code, I’m more likely to understand how it works and why.
Circuit simulation and software workbooks like Matlab and Jupyter are great for being able to build things without a lot of overhead. But these all have some learning curve and often use clever tricks, abstractions, or library calls to obscure what’s really happening. Sometimes it is easier to build something in a spreadsheet. In fact, I often do little circuit design spreadsheets or even digital design because it forces me to create a mathematical model which, in turn, helps me understand what’s really going on.
In this article I’m going to use Google Sheets — although you could do the same tricks in just about any spreadsheet — to generate some data and apply a finite impulse response (FIR) filter to it. Of course, if you had a spreadsheet of data from an instrument, this same technique would work, too.
Continue reading “DSP Spreadsheet: FIR Filtering”
The guitar ‘Toing’ sound from the ’70s was epic, and for the first time listener it was enough to get a bunch of people hooked to the likes of Aerosmith. Reverb units were all the rage back then, and for his DSP class project, [nebk] creates a reverb filter using Matlab and ports it to C++.
Digital reverb was introduced around the 1960s by Manfred Schroeder and Ben Logan. The system consists of essentially all pass filters that simply add a delay element to the input signal and by clubbing a bunch together and then feeding them to a mixer. The output is then that echoing ‘toing’ that made the ’80s love the guitar so much. [Nebk]’s take on it enlists the help of the Raspberry Pi and C++ to implement the very same thing.
In his writeup, [nebk] goes through the explaining the essentials of a filter implementation in the digital domain and how the cascaded delay units accumulate the delay to become a better sounding system. He also goes on to add an FIR low pass filter to cut off the ringing which was consequent of adding a feedback loop. [nebk] uses Matlab’s filter generation tool for the LP filter which he includes the code for. After testing the design in Simulink, he moves to writing the whole thing in C++ complete with the filter classes that allows reading of audio files and then spitting out ‘reverbed’ audio files out.
The best thing about this project is the fact that [nebk] creates filter class templates for others to play with. It allows those who are playing/working with Matlab to transition to the C++ side with a learning curve that is not as steep as the Himalayas. The project has a lot to learn from and is great for beginners to get their feet wet. The code is available on [GitHub] for those who want to give it a shot and if you are just interested in audio effects on the cheap, be sure to check out the Ikea Reverb Plate that is big and looks awesome.
Field recorders, or backpackable audio recorders with a few XLR jacks and an SD card slot, are a niche device, and no matter what commercial field recorder you choose you’ll always compromise on what features you want versus what features you’ll get. [Ben Biles] didn’t feel like compromising so he built his own multichannel audio DSP field recorder. It has a four channel balanced master outputs, with two stereo headphone outputs, eight or more inputs, digital I/O, and enough routing for multitrack recording.
Mechanically, the design of the system is a 3D printed box studded on every side with various connectors and patch points. This is what you get when you want a lot of I/O, and yep, those are panel mount connectors so get ready to pony up on the price of your connectors. The analog front end is a backplane sort of thing on a piece of perfboard, containing an eight channel differential I/O.
Of course any audio recorder is awful to use unless there’s a great user interface, and for that you can’t get any better than a high-resolution touchscreen on a phone. This led [Ben] to use Bluetooth to connect to an app showing the gain, levels, a toggle for phantom power, and a checkbox for line or microphone. If that’s not enough there are also some MIDI knobs for volume, because MIDI is still great for user input. It’s everything you want in a portable recording rig, and yes, there is a soundcloud demo. You can also check out a demo video below.
Continue reading “The Multichannel Field Recorder You Can Build Right Now”
Effects pedals: for some an object of overwhelming addiction, but for many, an opportunity to hack. Anyone who plays guitar (or buys presents for someone who does) knows of the infinite choice of pedals available. There are so many pedals because nailing the tone you hear in your head is an addictive quest, an itch that must be scratched. Rising to meet this challenge are a generation of programmable pedals that can tweak effects in clever ways.
With this in mind, [ElectroSmash] are back at it with another open source offering: the pedalSHIELD MEGA. Aimed at musicians and hackers who want to learn more about audio, DSP and programming, this is an open-hardware/open-software shield for the Arduino MEGA which transforms it into an effects pedal.
The hardware consists of an analog input stage which amplifies and filters the incoming signal before passing it to the Arduino, as well as an output stage which does the DAC-ing from the Arduino’s PWM outputs, and some more filtering/amplifying. Two 8-bit PWM outputs are used simultaneously to make pseudo 16-bit resolution — a technique you can read more about in their handy forum guide.
The list of effects currently implemented covers all the basics you’d expect, and provides a good starting point for writing custom effects. Perhaps a library for some of the commonly used config/operations would be useful? Naturally, there are some computational constraints when using an Arduino for DSP, though it’s up to you whether this is a frustrating fact, or an opportunity to write some nicely optimised code.
[ElectroSmash] don’t just do pedals either: here’s their open source guitar amp.
Continue reading “Stomping On Microcontrollers: Arduino Mega Guitar Effects Pedal”