# Handling analog (line audio) signal for single LED brightness indication, single supply (IC)? [closed]

I would like to make a simple indicator, that takes line-level audio, and drives a single LED, such that the LEDs brightness varies with the audio level, powered by +5V single supply. (As such, I'm not interested in LM3916 Dot/Bar Display Driver kind of indicators)

Let's assume I have line level +4 dBu as audio input, which has a peak of ±1.73 V (Line level - Wikipedia.

EDIT: Attempting to put this as a mapping example: I'm aware that human perception of "loudness/volume" is logarithmic, note sure whether perception of brightness is too. So basically, if I have, say, a 20Hz or 1kHz sinusoid that peaks at ±1.73 V ("max"), I would want the LED to shine at max recommended brightness; if the sinusoid peaks at whatever voltage, so its loudness is perceived as half from the previous "max" example, then the LED should shine at half perceived brightness from the "max" case; for 0V DC audio input (muted), LED should not shine. I cannot express specific requirements about responsivity, but the LED should generally pulse in the rhythm of music (i.e. kick drums and other accents would cause a pulse of increased perceived brightness) - similar to this https://www.youtube.com/watch?v=GBdO7ugAqdI - except I want to handle only a single, usual, round 5 mm LED (not a strip as in the video).

The more I think of this, the more I find it is not exactly trivial:

• If I just stick an LED on the line signal directly (plus appropriate resistor, so recommended current flows at +1.73V), then the typical currents pulled by a LED, say 20 mA, would likely degrade the line signal
• Therefore, I'd need to at least buffer the signal - but if I just use a voltage follower fed by a single supply, I'll lose the negative "semiperiods" of the audio signal; plus if we take VDon = 0.6V of the LED, then the diode would shine only in the positive "semiperiod", and only between there where Vdon is crossed and the max voltage.
• There are some ICs that provide RMS to DC, but all I've found seems to accept input only up to 200 mV RMS, so then I'd additionally need to attenuate the line-level signal (and I'd probably have to scale the DC output as well, so it fits the diode)
• If not RMS, then I'd want to use envelope follower / peak detector ( as the one noted in Creating a "Sharp" Turn on for LEDs ), but then I need at least a second opamp to buffer the detected envelope signal before driving LEDs
• There are schematics like https://hackaday.io/project/1765-led-strip-flashing-to-music where the audio signal directly drives transistors that eventually control the LED current, but I'd have to recalculate all those components to make sure they'd be optimal for line level driving LED within spec
• I could in principle do the equivalent of: ADC of the audio signal -> calculate envelope/peak detection/RMS in microcontroller software -> use this to control PWM out -> use a digital buffer on the PWM signal to drive a LED; then I only need to calculate the series resistor in respect to the supply that drives the LED; but the rest of the processing chain is just overkill

Note that I do not have requirements for high quality of such an indication, just that its sort of perceived as decent - which is why I find it difficult to decide which technique to focus on; I wouldn't want to spend time working on something, if a ready-made solution exists.

I sort of expected that there would be ICs on the market, that could: possibly be set to accept either differential or single-ended analog input; possibly accept a trimmer pot for signal scaling; accept input for a power supply that drives the LEDs (in my case, there is only one +5V supply, though); and be capable of handling positive or negative input voltages even if powered by single-supply (strictly positive voltages) - and provide an output to which a LED and a resistor calculated in respect to the supply (or even a standalone LED, towards either supply or ground) can be attached; abstracting away the actual technique (say, whether PWM is used internally or not) inside the chip. In short, ICs that would be "easy" to set up, in some sense. But I haven't found anything resembling that.

So, are there ICs on the market, that would do something like this?

Since it seems to be common practice to buffer digital signals for LED driving with ICs named like "non-inverting CMOS buffer" SN74AC244N; maybe I have a terminology problem, and simply have been using the wrong words to look for such an IC...

But if there aren't such ICs, what would be the recommended way to handle the line audio signal, so it can be used to drive LED brightness indication?

## closed as off-topic by Harry Svensson, Michel Keijzers, Finbarr, PeterJ, Voltage SpikeMar 14 '18 at 15:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

• You can do this in a Browser using the JavaScript window.webkitAudioContext. Then use a phone or tablet as your LED display. – Misunderstood Mar 8 '18 at 2:40
• I have a thought or two about a simple circuit that isn't destroyed yet by everything you wrote. However... you've provided no indication that you understand human brightness perceptions (different scotopic vs photopic) are logarithmic (with some strange modifications I won't get into.) Using either LED current or PWM duty cycle, can you provide a small table mapping those to mean line level (over some period you specify, as in 20 ms for example or with some simple decay tau?) Anything? An equation? I can't research your desires for you. (And making it more general means more time and parts.) – jonk Mar 8 '18 at 3:52
• @Misunderstood - haha, thanks :) I'ts a bit overkill, though :) – sdaau Mar 8 '18 at 6:55
• @jonk - Re: "destroyed yet by everything you wrote": I really cannot see what is so controversial about what I wrote - all I want to say is: "I'm aware that these techniques exist applicable to audio->brightness, I'm surprised there isn't an IC for this - is there an IC for this that I don't know about; if not, which technique should I focus on"... Otherwise - no, I don't understand human brightness perceptions, and just to be clear, I have no expectations you or anyone else research anything for me - I just wanted a hint, a helpful pointer, as in: "look here and there" ... – sdaau Mar 8 '18 at 6:59
• ... @jonk: ... ans as far as mapping goes, my requirements don't go further than "I do not have requirements for high quality of such an indication, just that its sort of perceived as decent"; so I guess - assuming audio signal was "peak detected", 0V of the envelope would map to 0mA of LED current, 1.7V of the envelope would map to 20 mA. Since I already have listed some circuits/techniques, just a pointer of which one of those should I research further is enough; given that, AFAICT, there is no IC for this particular purpose. – sdaau Mar 8 '18 at 7:11