Go Down

Topic: Spectrum analysis of the signal from 3.5 jack (Read 1 time) previous topic - next topic

comunity

Mar 26, 2020, 06:51 pm Last Edit: Mar 26, 2020, 09:29 pm by comunity
Please help me to find the working circuit, sketch, and libraries to get music audio from an ordinary player via 3.5 jack into Arduino (Nano), split it into up to 8 bands, depending on music frequencies and store band volume values in an array for later use. I had spent several days trying to find something working but was completely unlucky ((

I'm an advanced coder but completely newbie in electronics and FFT and don't even expect to understand them. I need a working sample/example as simple as it possible: wire schema, copy-paste code to IDE, compile it to the board and, for example, see debug print in the serial monitor which is synchronous showing high values on the loud sounds and low ones during silence for every of 8 spectrum bands separately.

I will be very grateful for any proper guides/links.

DVDdoug

#1
Mar 26, 2020, 09:28 pm Last Edit: Mar 26, 2020, 09:29 pm by DVDdoug
I've never used FFT/FHT but you'll need to bias the audio signal because the Arduino can't read the negative half of the waveform.   The "standard" bias schematic is attached to the bottom of this post.   The DC bias can be subtracted-out in software, or since DC is zero-Hz you can simply ignore the zero-Hz FFT bin.

If you can get by with 7-bands consider trying the MSGEQ7 chip.  (I've never used that either.)    Your software will be about 1/100th as complicated as FFT (although there are FFT libraries so you don't have to write all of the FFT code yourself).   The MEGEQ7 chip can handle the AC audio input without bias.

Go Up