Resonance is an universal and fascinating physical phenomenon. Ever since I was a kid I've "played" with resonance of everyday objects, like poles or handrails.
This was the first prototype of a device I've had in mind for a while now, which automatically detects and reproduces the resonant frequency of surfaces its placed on, via mechanical vibrations generated by a voice coil and an accelerometer for measuring the vibration frequencies.
Test run of the Universal Resonator prototype.
For the prototype I used an Arduino Uno, which was all that I had available. The Arduino Uno is a very rudimentar board, with barely any memory and processing power.
It's impossible to run the traditional (Short-Time) Fast Fourier Transform in real time on an Arduino Uno. This is especially true if you are interested in a high-resolution spectrum at lower frequencies, as the FFT algorithm requires a huge amount of samples to be stored in memory. That wouldn't work for me!
Therefore, for this project, I developed my own custom and (as far as I know) novel algorithm for spectral analysis, which I called "Lazy" Discrete Fourier Transform (LDFT). The LDFT is capable of running in real time on an Arduino Uno, with enough processing power to spare for running a real-time spectrum display! All of this with 128 16-bit frequency bins with 1 Hz resolution!
Real-time spectrum analysis and display on an Arduino Uno, thanks to my custom LDFT algorithm and OLED control software.
Strictly speaking, the LDFT algorithm is not as efficient or general as the FFT, it is just specialized enough at obtaining low-latency low-frequency estimates of the spectrum. I plan on developing the algorithm more formally, since perhaps it is worth publishing?
I also had to study the OLED datasheet and roll out my very own code for controlling it in order to have enough processing power and memory to run the rest of the software.
The LDFT algorithm can be optimized to deal only with the lower frequencies, which allows for very fine spectral resolutions. This video compares the spectral resolution of FFT and LDFT at lower frequencies and the same number of bins.
This project will be developed further into the future, using a better microcontroller, a more powerful custom voice coil and a compact package.