Purely Analog Audio Spectrum Analyzer - Help. - Page 1
Forum section: electronics / projects

author: erezmaster
author_rank: Contributor
timestamp: May 07, 2013, 04:54:45 pm
content: Hello guys,I am willing to build a LED based Music spectrum analyzerthat will be based on a MCU.The idea is to do it purely Analog,simply because I dont know what is FFT at all.I am going to build it using Active filters, Peak Detector and an ADC.I'm going to address one at a time each row of the led matrix by turn and activate the required amount of LEDs according to the ADC output.Question is:Is it possible and worth the time?May you please give me some tips?(Note that I am a beginner.)Simple idea picture is provided.Thanks a lot

author: Zad
author_rank: Super Contributor
timestamp: May 07, 2013, 05:11:35 pm
content: If you want to do it all in analogue, why use a micro at all? Back in the old days (i.e. 1990s and before) we used banks of bandpass filters and a nice cheap and easy LM3915 log detector / LED driver.

author: erezmaster
author_rank: Contributor
timestamp: May 07, 2013, 06:52:56 pm
content: Thanks for your reply.Thing is,the LM3915 does all the work, I prefer to go a bit deeper that why I want to use an MCU.another reason is that this IC can drive up to 10 LEDs , I intend to do a 16x20 Matrix.More replies are most very welcome.

author: Unknown
author_rank: Unknown
timestamp: May 07, 2013, 07:50:59 pm
content: The LM3915 can be cascaded, as many times you like;see pdf down-load data sheet; look for page 7 (Mode Pin Functional Description) and Cascading...http://www.datasheetcatalog.org/datasheet/nationalsemiconductor/DS005104.PDFThis will allow you to provide more LEDs, with your octave filters as channels, directly to the LM3915 inputs.

author: bradleytron
author_rank: Regular Contributor
timestamp: May 07, 2013, 08:11:04 pm
content: Should you be willing to check out anon analogsolution: (Sorry, can't resist throwing this in.)If you are willing to venture into FFT and want a cheap yet powerful audio spectrum analyzer based on a free program and your sound card:Not sure if your ultimate intent is only to do this with analog but as an additional method which does involve FFT in the audio spectrum I like a program called Audio Spectrum Analyzer ("Spectrum Lab") together with a good sound card. You could disable the waterfall display and enable/maximize the frequency domain display to show the audio spectrum for any signal applied to your sound card. It has tons of other features so it makes a great introductory tool for FFT and spectral analysis.http://www.qsl.net/dl4yhf/spectra1.htmlB

author: oPossum
author_rank: Super Contributor
timestamp: May 07, 2013, 08:40:08 pm
content: Here is a schematic of a 70's vintage 10 band audio spectrum analyzer:http://www.compendiumarcana.com/forumpics/Analyzer.pngThe column scanning and window comparator circuits could easily be replace with a microcontroller.Going beyond 10 bands will require using third or fourth order filters.

author: senso
author_rank: Frequent Contributor
timestamp: May 07, 2013, 09:38:52 pm
content: I have made such a thing, with an atmega328p and the FFT library from ELM-CHAN, and used at the time one 16x2 char lcd with custom chars to make the bars, it worked almost perfectly, except that my input was a bit hit and miss, due to non understanding what the op-amp was doing and dodgy connections in the breadboard.

author: kizzap
author_rank: Unknown
timestamp: May 08, 2013, 01:28:53 am
content: Ironically this is something that I am working on myself atm. 31 band Spectrum analyser using 31 bandpass filters with peak detection, some '238s and 4051's, the LM3915/6 combo and an atmega to control the timing of the thing.I would go about using some logic instead of the MCU for the timing, but I figured just for ease to go straight to the MCU and be able to upload any modifications i need for it.I just did a price list for the thing last night, and just for the components its going to cost over $130. (and then that again for the boards.) Be aware that you will need a lot of board space if you plan to use bandpass filters.My next iteration I will probably go with the FFT method, as it should reduce the board size dramatically.I also got real bored so I made a render (thanks to Eagle3D and povray):

author: Harvs
author_rank: Super Contributor
timestamp: May 08, 2013, 03:50:54 am
content: Quote from: Zad on May 07, 2013, 05:11:35 pmOn digikey:$LM3915 ~= $STM32F0xxxjust saying...

author: Skimask
author_rank: Super Contributor
timestamp: May 08, 2013, 04:17:05 am
content: My take on a 127 band audio spectrum analyzer using a PIC18F452 @ 40Mhz...1x PIC18F452, 1x 10Mhz oscillator, 1x LM324 opamp, a few cap's and resistors, 1x graphic LCD, a handful of wires, a battery, done...WARNING: Turn down the volume before playing!Yes, absolutely crap video quality, but it's all I had at that time.

author: erezmaster
author_rank: Contributor
timestamp: May 08, 2013, 02:44:01 pm
content: Thank you guys for your wonderful replies.I'm still considering using only analog approach.Still do want to be sure, is it possible to make it with an MCU, considering the matrix could lag due to it being 20 bands in an analog approach?One of you mentioned I might have to use a multiple cascades of filters in the filtration technique,May some one explain why one filter (with the right Q) for each band won't suffice?Your help is not taken for granted,Thanks a lot!

author: Zad
author_rank: Super Contributor
timestamp: May 08, 2013, 03:22:50 pm
content: Quote from: Harvs on May 08, 2013, 03:50:54 amIf budget is your driving factor then analogue isn't the way to go anyway (nor is buying from Digikey really). I can run WinAmp and press ctrl-shift-K and get a realtime voiceprint for no money at all, but to do so would be to entirely miss the point.www.ebay.com/itm/10PCS-LM3915-LM3915N-LM3915N-1-IC-DRIVER-DOT-BAR-DISPLAY-18-DIP-NEW-GOOG-QUALITY-/290765682042"Goog quality" doesn't instil confidence, but when buying from Shenzen you are probably getting locally produced stuff anyway.You need cascaded filters to get the tight Q really.If you want to take out the analogue filters but not go FFT, you can always use FIR filters. One micro would probably do it, but you could use one per octave or per channel if you wanted, and drive a huge string of LEDs directly or with charlieplexing.http://en.wikipedia.org/wiki/Fir_filter

author: smashedProton
author_rank: Frequent Contributor
timestamp: May 08, 2013, 05:40:46 pm
content: If you use a micro, just go and use an fft. You can use a bunch of comparators. (Look at the internal diagram of the chip)

author: erezmaster
author_rank: Contributor
timestamp: May 09, 2013, 01:33:41 pm
content: Quote from: Zad on May 08, 2013, 03:22:50 pmThank you,Money isn't my driving factor at all.What do you mean by saying - 'the tight Q' ?

author: GK
author_rank: Super Contributor
timestamp: May 09, 2013, 01:41:48 pm
content: Look up "multiple feedback bandpass filter". I designed and built a "toy" analyzer with "purely analogue" filters:http://www.users.on.net/~glenk/asamk1/asamk1.htm

author: erezmaster
author_rank: Contributor
timestamp: May 09, 2013, 02:25:11 pm
content: Wow GK,That project is just astonishing.Will help me a lot, thank you.

author: kizzap
author_rank: Unknown
timestamp: May 10, 2013, 12:33:05 am
content: these two websites might help btw:http://sim.okawa-denshi.jp/en/OPtazyuBakeisan.htmhttp://sound.westhost.com/project136.htmgood luck!!

author: erezmaster
author_rank: Contributor
timestamp: May 10, 2013, 09:34:01 am
content: kizzap,you've just nailed it, thank you so much.Any more ideas or tips, are most welcome.