Electronic – Audio to Low-Pass Filter to Comparator to LED = Fading LED based on the Frequency

audio

If I were to pass an audio signal through a Low-Pass filter with a cutoff frequency of 200 Hz (bass), and then send that signal to a comparator, then use this signal to drive an LED, would the LED be able to change its brightness based on the frequency? For example, a high frequency would drive the LED brighter than a lower frequency.

edit: The audio signal would be some sort of music from a computer.

Best Answer

Caveat: The answer proposed below is not the simplest way to achieve your results, but perhaps more precise and less finicky to get stable results out of, than other methods not involving a microcontroller. This solution is significantly a learner's approach that I have suggested to students before.


A method of obtaining fairly tight audio spectrum separation for your purpose is to use the MSGEQ7 seven-band graphic equalizer IC.

The MSGEQ7 outputs a voltage proportional to the deviation from pole frequency in each of its 7 bands, with the first pole being at 63 Hz, probably ideal for bass the visualization requirement. A simple buffer configuration op-amp on the output will address the 1 MOhm output impedance requirement of this IC.

(Optional) The output can be fed to a op-amp or transistor based transconductance amplifier (or transconductance amplifier IC specifically designed for LED driving e.g. TI OPA660) if you want precise current control on your LED - LED intensity relates to the current through it, not so much the voltage across it.

In order to have the MSGEQ7 monitor only its first band, at power-on a 100 nS pulse on RESET followed by a single 20 microsecond pulse to the STROBE pin will set the device to its first (63 Hz) band and leave it there. A monostable multivibrator using the 555 timer can be used to provide each of the two required pulses.

The required 145 to 180 KHz clock signal can be generated off a 555 timer as well. The MSGEQ7 part is very forgiving of pulse duration and clock frequency variation, so you have flexibility in resistor / capacitor selection for the two monostables and the astable oscillator.

A single NE558 quad timer IC provides the 3 required 555 timers in a single package, leaving one 555 unused.


Additional enhancements:

The design above can be easily expanded to provide indication for any of the 7 audio bands supported by the MSGEQ7 IC, or even all of them by using a demultiplexer on the output.