Spectrum Analyser Display

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
wdickenson
 
Posts: 184
Joined: Fri Nov 16, 2012 8:43 pm

Spectrum Analyser Display

Post by wdickenson »

I would like to build a basic spectrum analyser, something that can take a sound, convert it digitally, then display the wave. I have used the UNO and FFT to drive a neopixel light display so I am good with the basic code, but for this, I need one of the screens. Looking at the 2.8" TFT Touch Shield for Arduino with Resistive Touch Screen, it would seem that it should work nicely. But before I dive into a project that won't work well, I have a few questions.

Will that display refresh fast enough ? I need a minimum of 5x per second, 10x would be preferred. My plan was to use about 128 separate buckets and then just sample as fast as I can get it to run. This is going to be a simple line from 0 to Y based on the frequency value and 0-X with 128 lines.

Will the Uno have enough speed for this. I would think so but frankly, displaying color organ type things vs graphics is a bit new to me.

I have a reference signal that will be displayed at the same time. So visually, one should be able to see if the two waves match. Ths stretch side would be to change color if the two are within tolerance.

Any other suggestions or pitfalls would be appreciated. I won't have a lot of time on this one so my usual "try,try try" method may not be feasible. (and if anyone has done this, please tell me how ! )
Thanks

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Spectrum Analyser Display

Post by adafruit_support_rick »

If you use a hardware-accelerated graphics driver, like the RA8875, I think you might have enough horsepower on a Uno. That's just a guess, however. You would really have to try it to find out.

If you can run your FFT fast enough, the added overhead of drawing lines on the RA8875 should not be a killer.

https://www.adafruit.com/product/1590

User avatar
chipaudette
 
Posts: 13
Joined: Mon Jun 04, 2012 9:45 am

Re: Spectrum Analyser Display

Post by chipaudette »

I did some benchmarking tests to evaluate the speed of FFTs on various platforms, including the Arduino Uno, the Arduino M0, and the Teensy. If you're interested in seeing the findings, you can check out :

https://openaudio.blogspot.com/2016/09/ ... speed.html

The Uno is quite slow, and its limited amount of RAM makes it difficult to do longer FFTs. With the generic C FFT routine that I was using ("KissFFT"), I could not complete a 128-point FFT on the Uno. There are several FFT routines out there that are more tailored for the Uno, so you can probably find one that works with 128-points.

For my 64-point FFTs, my Uno could do 99 FFTs per second (using the typical Uno Int16 data type). Extrapolating out to 128 points, I'd guess that you'd be able to do ~45-50 FFTs per second, which is definitely fast enough for the slow update rates that you were hoping for.

Updating the graphics on your display is also an important speed consideration (as already discussed). I have no experience there.

Chip

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”