Engineering Roundtable - Audio Spectrum Analysis and Fire!

Check out the latest edition of "Engineering Roundtable."

Favorited Favorite 0

In today's edition of "Engineering Roundtable," SparkFun Engineer Chris Taylor guides you through the use of a microcontroller to perform audio spectrum analysis. He explains the basics of working with the audio spectrum, and ultimately links up his project with a propane torch. Why? Well...why not? Check it out:



You can find the Vimeo version here

Feel free to leave any comments or questions in the comments section below and we'll do our best to answer them! Thanks for watching and we'll see you again soon with another edition of "Engineering Roundtable!"

Comments 12 comments

  • thatguychris / about 11 years ago / 1

    Excellent video, Chris! You mentioned that when gathering data for an FFT that you want to gather as much data as possible. When doing audio recording, we always use the rule of thumb that your sample rate needs to be at least twice that of the highest frequency you wish to reproduce. Depending on how the hardware/software controls sample rate, but if it's 16MHz, you might be wasting a bunch of cycles. To analyze up to 20KHz, you would only need to sample at 40KHz...I think...

    • Member #270322 / about 11 years ago / 1

      it's more than a rule of thumb, it's a bare minimum. If you go lower than that you'll have an aliasing effect (higher frequencies leaking to lower frequency).

      • noworries / about 11 years ago * / 1

        As a practical matter, if you are interested in accurately sampling audio from a few Hz up to 20 kHz, you have to sample at a rate higher than twice the highest frequency you desire to sample. Why? The anti-aliasing filter that precedes the A/D converter will have a transition band between its pass band and its stop band which will allow some, but not all of the signal to pass. If you design the filter so the stop band is at 20 kHz, no aliasing will occur, but the audio in the upper part of the audio spectrum will be in the transition band and be inaccurately sampled. If you design the filter with its pass band ending at 20 kHz, any noise in the transition band will be aliased if you sample at 40 kHz. This is why CDs audio is sampled at 44.1 kHz. When designing the antialiasing filter, any signal with a frequency greater than 1/2 the sample frequency must be reduced to less than 1/2 the LSB value of the A/D converter to avoid aliasing.

      • thatguychris / about 11 years ago / 1

        That makes sense, if your sample rate is in phase with the wave, you wouldn't never ready the valley. No matter where it was in phase though, it would just look like a line...

        Thoughts on applying the same rule to FFT resolution? I did some reading, the chip has a clock input, so you would manage it there, not based on the microprocessor speed.

        • MikeGrusin / about 11 years ago / 1

          FYI the clock input on the MSGEQ7 doesn't drive the internal signal processing; it is used to switch the single analog output between the 7 frequency bands. The chip is otherwise self-contained.

  • noworries / about 11 years ago / 1

    For digitally detecting a single tone, the use of the Goertzel algorithm is far more efficient than a FFT. For example, this algorithm is often used to detect DTMF tones on general purpose processors. While there are only eight tones that make all the DTMF digits, to avoid speech being detected most implementations look for the second harmonic of each tone as well and only show a valid digit when proper fundamental tones are present in the absence of their second harmonics. (Speech is rich in harmonic energy, while valid DTMF digits are not.)

  • Far_Seeker / about 11 years ago / 1

    The forge torch disclaimer reminded me of a certain scene from The Incredibles. You know the one where the little old lady is "not" being told, in great detail, how to navigate the complex bureaucracy of the insurance agency a former superhero currently works at. ;)

  • dingonv / about 11 years ago / 1

    Hey Chris, what solenoid valve did you use on that? We used asco redhats for the sunken ship at BM this year, but they are very pricey for smaller projects. Thanks.

    • I'm actually not sure about the brand of solenoid. I walked into Grainger and had the guys there spec it out for me. It was only $70, but it had compression threads as opposed to the pipe threading I needed for the pipe, so finding adapters was a real headache. The Asco valve you used might be the best bet, because everything I've found online that is spec'd for flammable gas at that kind of pressure is comparable in price.

      • dingonv / about 11 years ago / 1

        yeah, for pressurized gas you need pipe or flare fittings not compression. Learned that in fire effects safety class.

  • whoopsie-daisy / about 11 years ago / 1

    This reminds me of a project I did many years ago with Discolitez (remember Winamp?). I had a three headed torch responding to bass, mids, and highs. The who thing made my wife nervous and it got shelved before I built a 32 head unit. I ran at tank pressure for 12-15 foot(4-5 meter) flames. Not that anybody should try this! I still have a board in the basement with 32 light sockets filled with 40 watt bulbs attached. This video has me thinking I should port this over to a microcontroller.

  • Just looking at the title, without even watching the video, I am hoping for a glorious Ruben's Tube!

Related Posts

Recent Posts

Why L-Band?


All Tags