Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Audio-controlled LED

  1. Aug 12, 2005 #1
    I have held the dream for a long time of LEDs being controlled by an audio signal. You know, when the music gets louder, the LED gets brighter. Not just 'fully on' or 'fully off', but different levels of brightness. However, I don't know how to build this circuit.

    I think the audio signal would have to be split into two paths one going to the speakers and the other going to the circuit. The circuit would be powered and light up the LED, but be controlled by the audio signal.

    Okay, so the 'power supply' part would have to be controlled by the varying AC voltage of the audio signal. Let's just establish some numbers for the LEDs to make the discussion consistent: 2600mcd intensity, forward max voltage 3.3V, forward max DC current: 30mA, max reverse voltage 5V.

    I know a few basic concepts of electronic circuits, but I'm jumping in feet-first to try to learn. I know several camera batteries have a voltage rating of three. I suspect this would be the proper way to power the LED (along with a current-limiting resistor), but unfortunately I don't have any bright ideas on how to get an audio signal to control a power supply to make it supply different voltages.

    In theory, I imagine something the audio signal controlling something like a potentiometer (used as a voltage divider). What I mean is, imagine that the audio signal could turn the nob on a potentiometer which divided the voltage supplied by the power supply – moving the slider all the way to the positive terminal when the audio signal is “loud”, and all the way to the negative when the audi signal is “quiet”. Problem is, the audio signal obviously cannot physically turn the knob or move the slider on a potentiometer. Is there some sort of other voltage-divider that could be controlled by a compelx AC signal such as audio?

    Thanks ahead of time for the help!

    Edit: on second thought, Would it be better cost-wise to use a 9V battery and two resistors to divide the voltage drop into 3 and 6, then just use the 3V as the main power for the LED? (the 3V would be what is controlled by the signal, just brainstorming)
    Last edited: Aug 12, 2005
  2. jcsd
  3. Aug 12, 2005 #2


    User Avatar

    Staff: Mentor

    I would suggest building your project as a battery-powered portable device, with a microphone input (instead of hard-wiring to your stereo), and LED pattern outputs. You can start to learn the basics of making such a device by building a couple of kits:

    http://www.transeltech.com/kits/kits1.html [Broken]

    Use something like the EBAA-1 "Audio Amplifier" kit to lear how to amplify a microphone's output to get useful voltages, and use something like the VM-110 "AC Voltage Monitor" kit to display the amplified audio.

    Once you start to get the hang of the basics, you could build a multi-channel audio analyzer, with columns of LEDs that correspond to different audio frequencies -- kind of like a simple LED-based audio spectrum analyzer. Fun for music, and also for talking into and singing into, etc. Have fun! -Mike-
    Last edited by a moderator: May 2, 2017
  4. Aug 12, 2005 #3
    Thank you, those kits are within my budget! One question: why would I use a microphone for the input? I suspect the impedance of the circuit I hope to build would be way, way higher than the speaker's impedance of 4ohms...so wouldn't that effectively mean very very little distortion?
  5. Aug 12, 2005 #4


    User Avatar

    Staff: Mentor

    Yeah, I was thinking more in terms of portabilty. If you make it battery powered with a microphone input, then you can use it with any stereo. I suppose you could maybe just have it connect to the headphone jack of the stereo and still maintain some portability.... Hey, it's your project after all, so just do what will be the best for you and the most fun and best learning experience. :biggrin:
  6. Aug 13, 2005 #5
    The reason I am doing this is because I have speakers for my car which have transparent cones. It would be very cool to be able to have them light up to the music.

    Anyhow, in the VAC-monitoring kit, it appears there are a bunch of resistors and two IC's that are doing all the work...Is that round thing in the lower left a capacitor?

    Let's just assume right now that I am capable of making a power supply with a max voltage of 3.3VDC...This may sound a bit odd, but could you share some of your knowledge with me on how to make this work? It would be much more effecient than spending money on kits. Don't get me wrong, I want to learn from this, but in my experience I learn best when someone can show me how it needs to be put together, and then if I don't get part of it, explain it to me.
  7. Aug 14, 2005 #6


    User Avatar
    Science Advisor
    Gold Member

    "...Is that round thing in the lower left a capacitor?"

    No. It's a potentiometer.

    "Let's just assume right now that I am capable of making a power supply with a max voltage of 3.3VDC..."

    Leds are not like light bulbs that you can dim by lowering the current. Leds are either on or off. To change the brightness, you can switch them "on and off" with an oscillator. Look up "duty cycle" to learn how this works.

  8. Aug 14, 2005 #7
    No, the brightness of an LED is determined by the current. Although not practical, the intensity can be controlled by varying the voltage. It is impractical do do it because the "safe" voltage region of operation transitions very rapidly to burn-up voltage. PRF control or a variable current source can be used.

  9. Aug 15, 2005 #8


    User Avatar

    Staff: Mentor

    The Vac and Vdc monitoring kits most likely use some simple comparator circuits to drive the LEDs. You can make simple comparators with just CMOS logic gates, or you can use real quad comparators (LM339A, for example). You process the incoming signal in some way (amplitude, frequency, whatever), and then present the signal(s) to the comparators, with each comparator generally comparing against a different voltage threshold.

    For example, for a simple Vdc LED display with 4 LEDs, you could use a single LM339, with a voltage divider presenting different reference voltages to each comparator's "-" input. You then bring your external DC voltage into the "+" inputs of the 4 comparators through resistors, and as the DC voltage increases past each of the 4 thresholds, LEDs 1-4 can be turned on by the comparator outputs.

    There are lots of practical considerations beyond this simplistic intro, of course. Like you have to check the output drive capability of the 339 to see if it can drive the LED directly, or if you need to buffer the signal. And you'll want to think about whether you want to use logic to turn off the lower LEDs as you turn on the next-higher LED. Kind of the difference between a bargraph type display and a walking LED display. Plus, you probably should include hysteresis feedback from the comparator outputs back to their respective "+" inputs to avoid buzzing around the trip points.

    So the simplest LED display would be to use comparators and simple signal processing. The next level up would be to do more signal processing (like filtering of the audio to get low-mid-high frequency info to drive different color LEDs or something), but still use comparators to convert from the analog audio signal to the digital drive signals for the LEDs. The next level up is where it gets really fun, where you use an A-to-D converter circuit and a microprocessor and signal processing to do the audio-to-digital LED drive conversion... :biggrin:

    Anyway, I hope that helps some. Check out some application notes for the LM339A comparator and similar devices to see if those start to give you some ideas. Best, -Mike-
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook