I understand that every audio waveform will be different but in terms of frequency and amplitude what can I expect? The audio source is an audio jack connected to an Ipod or computer audio jack. What I plan to build is a device that will light some LED's when say a frequency below 700 Hz is embedded into the waveform, however not sure what the waveform is composed of. Is it possible to have filters decompose the waveform into the different frequencies?

  • \$\begingroup\$ I'm not really sure what you're asking, but if you want to detect frequencies below 700 Hz you can use the Fast Fourier Transform (digital), or an aggressive lowpass filter and an envelope detector (analog). \$\endgroup\$ Jan 18 '15 at 20:36
  • \$\begingroup\$ Yes, filters can decompose the signal. Filter design is a big topic and I am not an expert. But the basic idea is that the selectivity of filters is not perfect. They transition gradually from a pass band to a reject band. The more elements you add to your filter, the more steep the transition can be. There are also issues such as phase linearity, smoothness (the filter, when looked at in the frequency domain, may have ripple in it) etc. If you just want to light up some LED's, then you don't need to worry too much about ripple or smoothness. Digital Signal processing can also be used. \$\endgroup\$
    – mkeith
    Jan 19 '15 at 0:05
  • \$\begingroup\$ I think you need a 'scope. You can make a cheap audio scope with a computer and sound card. \$\endgroup\$ Jan 19 '15 at 2:33

A waveform for audio can be seen in two ways, the Frequency Domain and the Time Domain. Any common audio application tends to have a visualizer that can show either.

This image shows a simplified view of how different frequencies meld into each other and change the waveform.

(source: electronics-tutorials.ws)

To cut off part of a waveform, you would use a band pass filter, which only allows a certain section of frequencies (bands) to pass through. A common consumer example of these are EQs, audio equalizers. They can be simple Bass/Mid/Treble or larger multi-frequency ones.

They allow you to Cut Off or Boost/Amplify certain frequencies.

Now more to your point, you want to light leds with only frequencies below 700Hz. Using a bandpass filter, a lowpass essentially, you can cut off most of the frequencies present, and the rest will light your leds. They will flash mostly based on the amplitude of the waveform in those frequencies, using them like a turn on signal. This is called a Color Organ.

This circuit has a pre-amp, and three bands, using a lowpass, a midpass, and a highpass Resistor Capacitor circuit, connected to a transistor and led for each. This covers Treble, Mids, and Bass. They can be done independently, you only need one. You can use a more specific, custom bandpass RC filter (google for calculators) to filter close to the frequency you want.

There is also the LM3914/5/6, which is a linear, logarithmic, and dedicated VU-meter IC. You can use a bandpass before the input to only measure the strength of those frequencies you choose.

Newer options involve an IC (like the MSGEQ07) that takes an analog signal, digitizes with an ADC, and spits out frequency band information digitally, for use with a microcontroller. This of course, is a bit more complicated/involved, but makes for a great project.

  • \$\begingroup\$ Fantastic answer really appreciate you taking your time to provide all the great info. \$\endgroup\$
    – AlanZ2223
    Aug 5 '15 at 20:40

700Hz or below calls for a low pass filter. If it's music, the waveform will be packed with fundamentals and harmonics of virtually all frequencies from 20Hz to 20kHz.

If you are wanting a specific frequency to provide control using a triac or other transistor configuration, you will want to build a narrow bandpass filter.


Are you trying to make a circuit that does this?

You will require a design with a number of stages to transform the data of the sound into a usable form.

  1. The sound needs to be supplied at a sufficient voltage via some headphone jack/amplifier.

  2. Low Pass at a frequency sufficiently below 700Hz such that frequencies at and above 700Hz do not influence your output. Many circuits are available to you. The simplest is a resistor and a capacitor. This is called an RC filter.

Now that we have the part of the sound we're interested in we need to convert that into data the light can use.

  1. Rectify the signal. A sound wave will consist of positive and negative deviations around a mean value (usually/hopefully zero). We only want to know when this sub-700Hz part of the signals amplitude is large. We don't care if it is positive or negative. So we rectify the signal. This is the process of making all of the negative parts positive or making all the negative parts zero. This can be performed with a half wave rectifier (requiring 1 diode) or a full wave rectifier (requiring 4 diodes.).

  2. Now that will result in a very 'bumpy' signal that won't drive an LED very well. We want to smooth it out. This can be achieved with a capacitor to ground. This will get charged up during the peaks of the sound and in the valleys of the sound wave the capacitor will dissipate that energy.

  3. Now all you need to do is use this signal to drive the LED. You will possibly need to amplify the signal with a bjt or fet.

  • \$\begingroup\$ The question is "What does the output waveform from audio source look like?". So include something to answer that also. \$\endgroup\$
    – nidhin
    Feb 19 '15 at 15:01
  • 1
    \$\begingroup\$ I just ignored the title because it actually didn't make any sense to me. I suppose the question that might have been intended was: "How do I make a spectrum analyzer?" but that was not this question. The answer to that question is: write a program to calculate the FFT and display that as a graph. Or use averages of specific ranges and assign them to each LED. \$\endgroup\$ Feb 19 '15 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.